$wgExtensionAssetsPath = "$wgScriptPath/extensions";
}
-// Enable default skins. Temporary, to be removed before 1.24 release.
-// This is hacky and bad, the require_once calls should eventually be generated by the installer
-// and placed in LocalSettings.php.
-// While this is in Setup.php, it needs to be done as soon as possible, as some of the setup code
-// depends on all extensions and skins being already required (bug 67318).
-require_once "$wgStyleDirectory/MonoBook/MonoBook.php";
-require_once "$wgStyleDirectory/Vector/Vector.php";
-
if ( $wgLogo === false ) {
$wgLogo = "$wgStylePath/common/images/wiki.png";
}
* Initialise $wgLocalFileRepo from backwards-compatible settings
*/
if ( !$wgLocalFileRepo ) {
- $deletedHashLevel = $wgHashedUploadDirectory ? 3 : 0;
$wgLocalFileRepo = array(
'class' => 'LocalRepo',
'name' => 'local',
'thumbScriptUrl' => $wgThumbnailScriptPath,
'transformVia404' => !$wgGenerateThumbnailOnParse,
'deletedDir' => $wgDeletedDirectory,
- 'deletedHashLevels' => $deletedHashLevel
+ 'deletedHashLevels' => $wgHashedUploadDirectory ? 3 : 0
);
}
/**
$wgSkipSkins[] = $wgSkipSkin;
}
+// Register skins
+// Use a closure to avoid leaking into global state
+call_user_func( function() use ( $wgValidSkinNames ) {
+ $factory = SkinFactory::getDefaultInstance();
+ foreach ( $wgValidSkinNames as $name => $skin ) {
+ $factory->register( $name, $skin, function() use ( $name, $skin ) {
+ $class = "Skin$skin";
+ return new $class( $name );
+ } );
+ }
+ // Register a hidden "fallback" skin
+ $factory->register( 'fallback', 'Fallback', function() {
+ return new SkinFallback;
+ } );
+} );
+$wgSkipSkins[] = 'fallback';
+
if ( $wgLocalInterwiki ) {
array_unshift( $wgLocalInterwikis, $wgLocalInterwiki );
}
$wgCookieSecure = ( WebRequest::detectProtocol() === 'https' );
}
-if ( $wgRC2UDPAddress ) {
- $wgRCFeeds['default'] = array(
- 'formatter' => 'IRCColourfulRCFeedFormatter',
- 'uri' => "udp://$wgRC2UDPAddress:$wgRC2UDPPort/$wgRC2UDPPrefix",
- 'add_interwiki_prefix' => &$wgRC2UDPInterwikiPrefix,
- 'omit_bots' => &$wgRC2UDPOmitBots,
- );
-}
-
wfProfileOut( $fname . '-defaults' );
// Disable MWDebug for command line mode, this prevents MWDebug from eating up
wfProfileOut( $fname . '-tempDir' );
}
-// $wgHTCPMulticastRouting got renamed to $wgHTCPRouting in MediaWiki 1.22
-// ensure back compatibility.
-if ( !$wgHTCPRouting && $wgHTCPMulticastRouting ) {
- $wgHTCPRouting = $wgHTCPMulticastRouting;
-}
-
-// Initialize $wgHTCPRouting from backwards-compatible settings that
-// comes from pre 1.20 version.
-if ( !$wgHTCPRouting && $wgHTCPMulticastAddress ) {
- $wgHTCPRouting = array(
- '' => array(
- 'host' => $wgHTCPMulticastAddress,
- 'port' => $wgHTCPPort,
- )
- );
-}
-
// Back compatibility for $wgRateLimitLog deprecated with 1.23
if ( $wgRateLimitLog && !array_key_exists( 'ratelimit', $wgDebugLogGroups ) ) {
$wgDebugLogGroups['ratelimit'] = $wgRateLimitLog;
wfProfileIn( $fname . '-session' );
-// If session.auto_start is there, we can't touch session name
-if ( !wfIniGetBool( 'session.auto_start' ) ) {
- session_name( $wgSessionName ? $wgSessionName : $wgCookiePrefix . '_session' );
-}
+if ( !defined( 'MW_NO_SESSION' ) && !$wgCommandLineMode ) {
+ // If session.auto_start is there, we can't touch session name
+ if ( !wfIniGetBool( 'session.auto_start' ) ) {
+ session_name( $wgSessionName ? $wgSessionName : $wgCookiePrefix . '_session' );
+ }
-if ( !defined( 'MW_NO_SESSION' ) && !$wgCommandLineMode &&
- ( $wgRequest->checkSessionCookie() || isset( $_COOKIE[$wgCookiePrefix . 'Token'] ) )
-) {
- wfSetupSession();
+ if ( $wgRequest->checkSessionCookie() || isset( $_COOKIE[$wgCookiePrefix . 'Token'] ) ) {
+ wfSetupSession();
+ }
}
wfProfileOut( $fname . '-session' );