X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FSetup.php;h=78655a45def1170c91949bae4e126d590c230b82;hb=a79442d6cf747e578575f80238f13dd0ee589bc2;hp=60033052a6a0eb716d95ed4a021e58a75f5097ab;hpb=78a3649058a4581f3c6149871e6e25639eb80b2c;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Setup.php b/includes/Setup.php index 60033052a6..78655a45de 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -78,6 +78,14 @@ if ( $wgExtensionAssetsPath === false ) { $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"; } @@ -98,6 +106,10 @@ if ( $wgDeletedDirectory === false ) { $wgDeletedDirectory = "{$wgUploadDirectory}/deleted"; } +if ( $wgGitInfoCacheDirectory === false && $wgCacheDirectory !== false ) { + $wgGitInfoCacheDirectory = "{$wgCacheDirectory}/gitinfo"; +} + if ( isset( $wgFileStore['deleted']['directory'] ) ) { $wgDeletedDirectory = $wgFileStore['deleted']['directory']; } @@ -106,7 +118,7 @@ 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( @@ -388,6 +400,11 @@ if ( $wgNewUserLog ) { $wgLogActionsHandlers['newusers/autocreate'] = 'NewUsersLogFormatter'; } +if ( $wgPageLanguageUseDB ) { + $wgLogTypes[] = 'pagelang'; + $wgLogActionsHandlers['pagelang/pagelang'] = 'PageLangLogFormatter'; +} + if ( $wgCookieSecure === 'detect' ) { $wgCookieSecure = ( WebRequest::detectProtocol() === 'https' ); } @@ -568,26 +585,33 @@ if ( !defined( 'MW_NO_SESSION' ) && !$wgCommandLineMode && 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 ) ); @@ -596,17 +620,13 @@ if ( !is_object( $wgAuth ) ) { 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"; - wfProfileOut( $fname . '-globals' ); wfProfileIn( $fname . '-extensions' );