Merge "Fix 'Tags' padding to keep it farther from the edge and document the source...
[lhc/web/wiklou.git] / includes / installer / WebInstaller.php
index 8fb9807..4142e6f 100644 (file)
@@ -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 '<a href="' . htmlspecialchars( $url ) . '">' .
-                       htmlspecialchars( $linkText ) .
-                       '</a>';
+               return Html::element( 'a', [ 'href' => $url ], $linkText );
        }
 
        /**