Merge "resourceloader: Move per-page function calls to startup.js"
[lhc/web/wiklou.git] / includes / installer / Installer.php
index a954008..5c3d1d0 100644 (file)
@@ -336,14 +336,16 @@ abstract class Installer {
         * The messages will be in wikitext format, which will be converted to an
         * output format such as HTML or text before being sent to the user.
         * @param string $msg
+        * @param mixed ...$params
         */
-       abstract public function showMessage( $msg /*, ... */ );
+       abstract public function showMessage( $msg, ...$params );
 
        /**
         * Same as showMessage(), but for displaying errors
         * @param string $msg
+        * @param mixed ...$params
         */
-       abstract public function showError( $msg /*, ... */ );
+       abstract public function showError( $msg, ...$params );
 
        /**
         * Show a message to the installing user by using a Status object
@@ -694,6 +696,7 @@ abstract class Installer {
                                'enableSectionEditLinks' => false,
                                'unwrap' => true,
                        ] );
+                       $html = Parser::stripOuterParagraph( $html );
                } catch ( Wikimedia\Services\ServiceDisabledException $e ) {
                        $html = '<!--DB access attempted during parse-->  ' . htmlspecialchars( $text );
                }
@@ -1201,9 +1204,11 @@ abstract class Installer {
                                }
 
                                try {
-                                       $text = Http::get( $url . $file, [ 'timeout' => 3 ], __METHOD__ );
+                                       $text = MediaWikiServices::getInstance()->getHttpRequestFactory()->
+                                               get( $url . $file, [ 'timeout' => 3 ], __METHOD__ );
                                } catch ( Exception $e ) {
-                                       // Http::get throws with allow_url_fopen = false and no curl extension.
+                                       // HttpRequestFactory::get can throw with allow_url_fopen = false and no curl
+                                       // extension.
                                        $text = null;
                                }
                                unlink( $dir . $file );
@@ -1607,9 +1612,7 @@ abstract class Installer {
                }
                if ( $status->isOk() ) {
                        $this->showMessage(
-                               'config-install-success',
-                               $this->getVar( 'wgServer' ),
-                               $this->getVar( 'wgScriptPath' )
+                               'config-install-db-success'
                        );
                        $this->setVar( '_InstallDone', true );
                }