$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";
}
$wgDeletedDirectory = "{$wgUploadDirectory}/deleted";
}
-if ( isset( $wgFileStore['deleted']['directory'] ) ) {
- $wgDeletedDirectory = $wgFileStore['deleted']['directory'];
+if ( $wgGitInfoCacheDirectory === false && $wgCacheDirectory !== false ) {
+ $wgGitInfoCacheDirectory = "{$wgCacheDirectory}/gitinfo";
}
if ( isset( $wgFooterIcons['copyright'] )
&& isset( $wgFooterIcons['copyright']['copyright'] )
&& $wgFooterIcons['copyright']['copyright'] === array()
) {
- if ( isset( $wgCopyrightIcon ) && $wgCopyrightIcon ) {
+ if ( $wgCopyrightIcon ) {
$wgFooterIcons['copyright']['copyright'] = $wgCopyrightIcon;
} elseif ( $wgRightsIcon || $wgRightsText ) {
$wgFooterIcons['copyright']['copyright'] = array(
* Initialise $wgLocalFileRepo from backwards-compatible settings
*/
if ( !$wgLocalFileRepo ) {
- if ( isset( $wgFileStore['deleted']['hash'] ) ) {
- $deletedHashLevel = $wgFileStore['deleted']['hash'];
- } else {
- $deletedHashLevel = $wgHashedUploadDirectory ? 3 : 0;
- }
+ $deletedHashLevel = $wgHashedUploadDirectory ? 3 : 0;
$wgLocalFileRepo = array(
'class' => 'LocalRepo',
'name' => 'local',
// Blacklisted file extensions shouldn't appear on the "allowed" list
$wgFileExtensions = array_values( array_diff ( $wgFileExtensions, $wgFileBlacklist ) );
-if ( $wgArticleCountMethod === null ) {
- $wgArticleCountMethod = $wgUseCommaCount ? 'comma' : 'link';
-}
-
if ( $wgInvalidateCacheOnLocalSettingsChange ) {
// @codingStandardsIgnoreStart Generic.PHP.NoSilencedErrors.Discouraged - No GlobalFunction here yet.
$wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', @filemtime( "$IP/LocalSettings.php" ) ) );
$wgLogActionsHandlers['newusers/autocreate'] = 'NewUsersLogFormatter';
}
+if ( $wgPageLanguageUseDB ) {
+ $wgLogTypes[] = 'pagelang';
+ $wgLogActionsHandlers['pagelang/pagelang'] = 'PageLangLogFormatter';
+}
+
if ( $wgCookieSecure === 'detect' ) {
$wgCookieSecure = ( WebRequest::detectProtocol() === 'https' );
}
}
// Back compatibility for $wgRateLimitLog deprecated with 1.23
-if ( $wgRateLimitLog && ! array_key_exists( 'ratelimit', $wgDebugLogGroups ) ) {
+if ( $wgRateLimitLog && !array_key_exists( 'ratelimit', $wgDebugLogGroups ) ) {
$wgDebugLogGroups['ratelimit'] = $wgRateLimitLog;
}
wfProfileOut( $fname . '-session' );
wfProfileIn( $fname . '-globals' );
+/**
+ * @var Language $wgContLang
+ */
$wgContLang = Language::factory( $wgLanguageCode );
$wgContLang->initEncoding();
$wgContLang->initContLang();
// Now that variant lists may be available...
$wgRequest->interpolateTitle();
+
+/**
+ * @var User $wgUser
+ */
$wgUser = RequestContext::getMain()->getUser(); // BackCompat
/**
- * @var $wgLang Language
+ * @var Language $wgLang
*/
$wgLang = new StubUserLang;
/**
- * @var OutputPage
+ * @var OutputPage $wgOut
*/
$wgOut = RequestContext::getMain()->getOutput(); // BackCompat
/**
- * @var $wgParser Parser
+ * @var Parser $wgParser
*/
$wgParser = new StubObject( 'wgParser', $wgParserConf['class'], array( $wgParserConf ) );
wfRunHooks( 'AuthPluginSetup', array( &$wgAuth ) );
}
-# Placeholders in case of DB error
+/**
+ * @var Title $wgTitle
+ */
$wgTitle = null;
$wgDeferredUpdateList = array();
-// Enable default skins.
-// This is hacky and bad, the require_once calls should eventually be generated by the installer
-// and placed in LocalSettings.php.
-require_once "$wgStyleDirectory/MonoBook/MonoBook.php";
-require_once "$wgStyleDirectory/Vector/Vector.php";
+// 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' );