$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";
}
$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 );
}
}
$wgCookiePrefix = strtr( $wgCookiePrefix, '=,; +."\'\\[', '__________' );
- $wgUseEnotif = $wgEnotifUserTalk || $wgEnotifWatchlist;
+ if ( $wgEnableEmail ) {
+ $wgUseEnotif = $wgEnotifUserTalk || $wgEnotifWatchlist;
+ } else {
+ // Disable all other email settings automatically if $wgEnableEmail
+ // is set to false. - bug 63678
+ $wgAllowHTMLEmail = false;
+ $wgEmailAuthentication = false; // do not require auth if you're not sending email anyway
+ $wgEnableUserEmail = false;
+ $wgEnotifFromEditor = false;
+ $wgEnotifImpersonal = false;
+ $wgEnotifMaxRecips = 0;
+ $wgEnotifMinorEdits = false;
+ $wgEnotifRevealEditorAddress = false;
+ $wgEnotifUseJobQ = false;
+ $wgEnotifUseRealName = false;
+ $wgEnotifUserTalk = false;
+ $wgEnotifWatchlist = false;
+ unset( $wgGroupPermissions['user']['sendemail'] );
+ $wgUseEnotif = false;
+ $wgUserEmailUseReplyTo = false;
+ $wgUsersNotifiedOnAllChanges = array();
+ }
+
+ // Doesn't make sense to have if disabled.
+ if ( !$wgEnotifMinorEdits ) {
+ $wgHiddenPrefs[] = 'enotifminoredits';
+ }
if ( $wgMetaNamespace === false ) {
$wgMetaNamespace = str_replace( ' ', '_', $wgSitename );
$wgDebugToolbar = false;
}
- // Doesn't make sense to have if disabled.
- if ( !$wgEnotifMinorEdits ) {
- $wgHiddenPrefs[] = 'enotifminoredits';
- }
-
// We always output HTML5 since 1.22, overriding these is no longer supported
// we set them here for extensions that depend on its value.
$wgHtml5 = true;
$wgCookieSecure = ( WebRequest::detectProtocol() === 'https' );
}
-if ( $wgRC2UDPAddress ) {
- $wgRCFeeds['default'] = array(
- 'formatter' => 'IRCColourfulRCFeedFormatter',
- 'uri' => "udp://$wgRC2UDPAddress:$wgRC2UDPPort/$wgRC2UDPPrefix",
- 'add_interwiki_prefix' => &$wgRC2UDPInterwikiPrefix,
- 'omit_bots' => &$wgRC2UDPOmitBots,
- );
+// Back compatibility for $wgRateLimitLog deprecated with 1.23
+if ( $wgRateLimitLog && !array_key_exists( 'ratelimit', $wgDebugLogGroups ) ) {
+ $wgDebugLogGroups['ratelimit'] = $wgRateLimitLog;
+}
+
+if ( $wgProfileOnly ) {
+ $wgDebugLogGroups['profileoutput'] = $wgDebugLogFile;
+ $wgDebugLogFile = '';
}
wfProfileOut( $fname . '-defaults' );
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;
-}
-
-if ( $wgProfileOnly ) {
- $wgDebugLogGroups['profileoutput'] = $wgDebugLogFile;
- $wgDebugLogFile = '';
-}
-
wfProfileOut( $fname . '-defaults2' );
wfProfileIn( $fname . '-misc1' );
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' );
*/
$wgTitle = null;
+/**
+ * @deprecated since 1.24 Use DeferredUpdates::addUpdate instead
+ * @var array
+ */
$wgDeferredUpdateList = array();
- // Disable all other email settings automatically if $wgEnableEmail
- // is set to false. - bug 63678
- if ( !$wgEnableEmail ) {
- $wgAllowHTMLEmail = false;
- $wgEmailAuthentication = false; // do not require auth if you're not sending email anyway
- $wgEnableUserEmail = false;
- $wgEnotifFromEditor = false;
- $wgEnotifImpersonal = false;
- $wgEnotifMaxRecips = 0;
- $wgEnotifMinorEdits = false;
- $wgEnotifRevealEditorAddress = false;
- $wgEnotifUseJobQ = false;
- $wgEnotifUseRealName = false;
- $wgEnotifUserTalk = false;
- $wgEnotifWatchlist = false;
- unset( $wgGroupPermissions['user']['sendemail'] );
- $wgUserEmailUseReplyTo = false;
- $wgUsersNotifiedOnAllChanges = array();
- }
-
wfProfileOut( $fname . '-globals' );
wfProfileIn( $fname . '-extensions' );