X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Finstaller%2FWebInstaller.php;h=4142e6f26683623c20ae3fed903896fbeeefad00;hb=138298b397b308ad6e4bfc7088884d90e8ac1e37;hp=8fb980791e787685465e103b6bd7a57943daf36c;hpb=11a8e0160034e4e0a7398f8b858b4fcff23c7ab7;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/installer/WebInstaller.php b/includes/installer/WebInstaller.php index 8fb980791e..4142e6f266 100644 --- a/includes/installer/WebInstaller.php +++ b/includes/installer/WebInstaller.php @@ -529,7 +529,7 @@ class WebInstaller extends Installer { public function getAcceptLanguage() { global $wgLanguageCode, $wgRequest; - $mwLanguages = Language::fetchLanguageNames(); + $mwLanguages = Language::fetchLanguageNames( null, 'mwfile' ); $headerLanguages = array_keys( $wgRequest->getAcceptLang() ); foreach ( $headerLanguages as $lang ) { @@ -717,7 +717,7 @@ class WebInstaller extends Installer { */ public function showHelpBox( $msg /*, ... */ ) { $args = func_get_args(); - $html = call_user_func_array( [ $this, 'getHelpBox' ], $args ); + $html = $this->getHelpBox( ...$args ); $this->output->addHTML( $html ); } @@ -742,7 +742,7 @@ class WebInstaller extends Installer { public function showStatusMessage( Status $status ) { $errors = array_merge( $status->getErrorsArray(), $status->getWarningsArray() ); foreach ( $errors as $error ) { - call_user_func_array( [ $this, 'showMessage' ], $error ); + $this->showMessage( ...$error ); } } @@ -758,7 +758,7 @@ class WebInstaller extends Installer { */ public function label( $msg, $forId, $contents, $helpData = "" ) { if ( strval( $msg ) == '' ) { - $labelText = ' '; + $labelText = '\u{00A0}'; } else { $labelText = wfMessage( $msg )->escaped(); } @@ -1047,7 +1047,7 @@ class WebInstaller extends Installer { $items[$value] = Xml::radio( $params['controlName'], $value, $checked, $itemAttribs ) . - ' ' . + '\u{00A0}' . Xml::tags( 'label', [ 'for' => $id ], $this->parse( isset( $params['itemLabels'] ) ? wfMessage( $params['itemLabels'][$value] )->plain() : @@ -1121,13 +1121,13 @@ class WebInstaller extends Installer { * @return string */ protected function getDocUrl( $page ) { - $url = "{$_SERVER['PHP_SELF']}?page=" . urlencode( $page ); + $query = [ 'page' => $page ]; if ( in_array( $this->currentPageName, $this->pageSequence ) ) { - $url .= '&lastPage=' . urlencode( $this->currentPageName ); + $query['lastPage'] = $this->currentPageName; } - return $url; + return $this->getUrl( $query ); } /** @@ -1142,9 +1142,7 @@ class WebInstaller extends Installer { public function docLink( $linkText, $attribs, $parser ) { $url = $this->getDocUrl( $attribs['href'] ); - return '' . - htmlspecialchars( $linkText ) . - ''; + return Html::element( 'a', [ 'href' => $url ], $linkText ); } /**