Merge "Recalculate user default options for each test"
[lhc/web/wiklou.git] / includes / installer / Installer.php
index 20661f2..ea022bb 100644 (file)
@@ -686,10 +686,10 @@ abstract class Installer {
         * @return string
         */
        public function parse( $text, $lineStart = false ) {
-               global $wgParser;
+               $parser = MediaWikiServices::getInstance()->getParser();
 
                try {
-                       $out = $wgParser->parse( $text, $this->parserTitle, $this->parserOptions, $lineStart );
+                       $out = $parser->parse( $text, $this->parserTitle, $this->parserOptions, $lineStart );
                        $html = $out->getText( [
                                'enableSectionEditLinks' => false,
                                'unwrap' => true,
@@ -866,8 +866,7 @@ abstract class Installer {
                }
 
                if ( !$caches ) {
-                       $key = 'config-no-cache-apcu';
-                       $this->showMessage( $key );
+                       $this->showMessage( 'config-no-cache-apcu' );
                }
 
                $this->setVar( '_Caches', $caches );
@@ -1184,8 +1183,8 @@ abstract class Installer {
        public function dirIsExecutable( $dir, $url ) {
                $scriptTypes = [
                        'php' => [
-                               "<?php echo 'ex' . 'ec';",
-                               "#!/var/env php\n<?php echo 'ex' . 'ec';",
+                               "<?php echo 'exec';",
+                               "#!/var/env php\n<?php echo 'exec';",
                        ],
                ];
 
@@ -1502,7 +1501,7 @@ abstract class Installer {
                $data = $registry->readFromQueue( $queue );
                $wgAutoloadClasses += $data['autoload'];
 
-               /** @suppress PhanUndeclaredVariable $wgHooks is set by DefaultSettings */
+               // @phan-suppress-next-line PhanUndeclaredVariable $wgHooks is set by DefaultSettings
                $hooksWeWant = $wgHooks['LoadExtensionSchemaUpdates'] ?? [];
 
                if ( isset( $data['globals']['wgHooks']['LoadExtensionSchemaUpdates'] ) ) {
@@ -1608,9 +1607,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 );
                }
@@ -1633,8 +1630,7 @@ abstract class Installer {
        }
 
        /**
-        * Generate a secret value for variables using our CryptRand generator.
-        * Produce a warning if the random source was insecure.
+        * Generate a secret value for variables using a secure generator.
         *
         * @param array $keys
         * @return Status