installer: Remove redundant $key variable
[lhc/web/wiklou.git] / includes / installer / Installer.php
index 029f67d..63b251a 100644 (file)
@@ -686,15 +686,15 @@ 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,
                        ] );
-               } catch ( MediaWiki\Services\ServiceDisabledException $e ) {
+               } catch ( Wikimedia\Services\ServiceDisabledException $e ) {
                        $html = '<!--DB access attempted during parse-->  ' . htmlspecialchars( $text );
                }
 
@@ -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';",
                        ],
                ];
 
@@ -1464,6 +1463,7 @@ abstract class Installer {
        /**
         * Installs the auto-detected extensions.
         *
+        * @suppress SecurityCheck-OTHER It thinks $exts/$IP is user controlled but they are not.
         * @return Status
         */
        protected function includeExtensions() {