MediaWiki  master
WebInstallerComplete.php
Go to the documentation of this file.
1 <?php
23 
25 
26  public function execute() {
27  // Pop up a dialog box, to make it difficult for the user to forget
28  // to download the file
29  $lsUrl = $this->getVar( 'wgServer' ) . $this->parent->getUrl( [ 'localsettings' => 1 ] );
30  if ( isset( $_SERVER['HTTP_USER_AGENT'] ) &&
31  strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE' ) !== false
32  ) {
33  // JS appears to be the only method that works consistently with IE7+
34  $this->addHTML( "\n<script>jQuery( function () { location.href = " .
35  Html::encodeJsVar( $lsUrl ) . "; } );</script>\n" );
36  } else {
37  $this->parent->request->response()->header( "Refresh: 0;url=$lsUrl" );
38  }
39 
40  $this->startForm();
41  $this->parent->disableLinkPopups();
42  $location = $this->parent->getLocalSettingsLocation();
43  $msg = 'config-install-done';
44  if ( $location !== false ) {
45  // config-install-done-path
46  $msg .= '-path';
47  }
48  $this->addHTML(
49  $this->parent->getInfoBox(
50  new HtmlArmor( wfMessage( $msg,
51  $lsUrl,
52  $this->getVar( 'wgServer' ) .
53  $this->getVar( 'wgScriptPath' ) . '/index.php',
54  Message::rawParam( $this->parent->makeDownloadLinkHtml() ),
55  $location ?: ''
56  )->parse() ), 'tick-32.png'
57  )
58  );
59  $this->addHTML( $this->parent->getInfoBox(
60  wfMessage( 'config-extension-link' )->plain() ) );
61 
62  $this->parent->restoreLinkPopups();
63  $this->endForm( false, false );
64  return '';
65  }
66 
67 }
wfMessage( $key,... $params)
This is the function for getting translated interface messages.
Marks HTML that shouldn't be escaped.
Definition: HtmlArmor.php:30
This class is a collection of static functions that serve two purposes:
Definition: Html.php:57
static rawParam( $raw)
Definition: Message.php:1143
Abstract class to define pages for the web installer.
endForm( $continue='continue', $back='back')
getVar( $var, $default=null)