Merge "Allow third party code to hook-up MIME type detection"
[lhc/web/wiklou.git] / includes / Setup.php
index 783ef3f..78655a4 100644 (file)
@@ -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(
@@ -573,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 ) );
 
@@ -601,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' );