Merge "Avoid master queries on image history view"
[lhc/web/wiklou.git] / includes / installer / Installer.php
index a10fb48..662469b 100644 (file)
@@ -538,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();
@@ -1123,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;
                }