Merge "Avoid master queries on image history view"
[lhc/web/wiklou.git] / includes / installer / Installer.php
index 955f24d..662469b 100644 (file)
@@ -146,7 +146,6 @@ abstract class Installer {
         * @var array
         */
        protected $envPreps = array(
-               'envPrepExtension',
                'envPrepServer',
                'envPrepPath',
        );
@@ -177,7 +176,6 @@ abstract class Installer {
                'wgGitBin',
                'IP',
                'wgScriptPath',
-               'wgScriptExtension',
                'wgMetaNamespace',
                'wgDeletedDirectory',
                'wgEnableUploads',
@@ -540,6 +538,10 @@ abstract class Installer {
                global $wgAutoloadClasses;
                $wgAutoloadClasses = array();
 
+               // LocalSettings.php should not call functions, except wfLoadSkin/wfLoadExtensions
+               // Define the required globals here, to ensure, the functions can do it work correctly.
+               global $wgExtensionDirectory, $wgStyleDirectory;
+
                MediaWiki\suppressWarnings();
                $_lsExists = file_exists( "$IP/LocalSettings.php" );
                MediaWiki\restoreWarnings();
@@ -1125,12 +1127,12 @@ abstract class Installer {
                } elseif ( $c <= 0x7FF ) {
                        return chr( 0xC0 | $c >> 6 ) . chr( 0x80 | $c & 0x3F );
                } elseif ( $c <= 0xFFFF ) {
-                       return chr( 0xE0 | $c >> 12 ) . chr( 0x80 | $c >> 6 & 0x3F )
-                       . chr( 0x80 | $c & 0x3F );
+                       return chr( 0xE0 | $c >> 12 ) . chr( 0x80 | $c >> 6 & 0x3F ) .
+                               chr( 0x80 | $c & 0x3F );
                } elseif ( $c <= 0x10FFFF ) {
-                       return chr( 0xF0 | $c >> 18 ) . chr( 0x80 | $c >> 12 & 0x3F )
-                       . chr( 0x80 | $c >> 6 & 0x3F )
-                       . chr( 0x80 | $c & 0x3F );
+                       return chr( 0xF0 | $c >> 18 ) . chr( 0x80 | $c >> 12 & 0x3F ) .
+                               chr( 0x80 | $c >> 6 & 0x3F ) .
+                               chr( 0x80 | $c & 0x3F );
                } else {
                        return false;
                }
@@ -1227,19 +1229,6 @@ abstract class Installer {
         */
        abstract protected function envGetDefaultServer();
 
-       /**
-        * Environment prep for setting the preferred PHP file extension.
-        */
-       protected function envPrepExtension() {
-               // @todo FIXME: Detect this properly
-               if ( defined( 'MW_INSTALL_PHP5_EXT' ) ) {
-                       $ext = '.php5';
-               } else {
-                       $ext = '.php';
-               }
-               $this->setVar( 'wgScriptExtension', $ext );
-       }
-
        /**
         * Environment prep for setting $IP and $wgScriptPath.
         */