* @var array
*/
protected $envPreps = array(
- 'envPrepExtension',
'envPrepServer',
'envPrepPath',
);
'wgGitBin',
'IP',
'wgScriptPath',
- 'wgScriptExtension',
'wgMetaNamespace',
'wgDeletedDirectory',
'wgEnableUploads',
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();
} 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;
}
*/
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.
*/