if ( $wgExtensionAssetsPath === false ) {
$wgExtensionAssetsPath = "$wgScriptPath/extensions";
}
+if ( $wgResourceBasePath === null ) {
+ $wgResourceBasePath = $wgScriptPath;
+}
if ( $wgLogo === false ) {
- $wgLogo = "$wgStylePath/common/images/wiki.png";
+ $wgLogo = "$wgResourceBasePath/resources/assets/wiki.png";
}
if ( $wgUploadPath === false ) {
$wgGitInfoCacheDirectory = "{$wgCacheDirectory}/gitinfo";
}
+// Fix path to icon images after they were moved in 1.24
+if ( $wgRightsIcon ) {
+ $wgRightsIcon = str_replace(
+ "{$wgStylePath}/common/images/",
+ "{$wgResourceBasePath}/resources/assets/licenses/",
+ $wgRightsIcon
+ );
+}
+
if ( isset( $wgFooterIcons['copyright'] )
&& isset( $wgFooterIcons['copyright']['copyright'] )
&& $wgFooterIcons['copyright']['copyright'] === array()
&& $wgFooterIcons['poweredby']['mediawiki']['src'] === null
) {
$wgFooterIcons['poweredby']['mediawiki']['src'] =
- "$wgStylePath/common/images/poweredby_mediawiki_88x31.png";
+ "$wgResourceBasePath/resources/assets/poweredby_mediawiki_88x31.png";
}
/**
// Register skins
// Use a closure to avoid leaking into global state
-call_user_func( function() use ( $wgValidSkinNames ) {
+call_user_func( function () use ( $wgValidSkinNames ) {
$factory = SkinFactory::getDefaultInstance();
foreach ( $wgValidSkinNames as $name => $skin ) {
- $factory->register( $name, $skin, function() use ( $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() {
+ $factory->register( 'fallback', 'Fallback', function () {
return new SkinFallback;
} );
+ // Register a hidden skin for api output
+ $factory->register( 'apioutput', 'ApiOutput', function () {
+ return new SkinApi;
+ } );
} );
$wgSkipSkins[] = 'fallback';
+$wgSkipSkins[] = 'apioutput';
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;
$wgTitle = null;
/**
- * @deprecated 1.24 Use DeferredUpdates::addUpdate instead
+ * @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' );