Wikia code/includes/Setup.php

From mediawiki.org
--- D:\Programming\SVN\mediawiki\branches\REL1_16\phase3\includes\Setup.php	2011-07-18 22:31:28.082031300 +0100
+++ D:\Programming\SVN\wikia\trunk\includes\Setup.php	2011-08-17 15:28:46.446289100 +0100
@@ -58,6 +59,8 @@
 	$wgFileStore['deleted']['directory'] = "{$wgUploadDirectory}/deleted";
 }
 
+if( $wgExtensionsPath === false ) $wgExtensionsPath = "$wgScriptPath/extensions";
+
 /**
  * Unconditional protection for NS_MEDIAWIKI since otherwise it's too easy for a
  * sysadmin to set $wgNamespaceProtection incorrectly and leave the wiki insecure.
@@ -97,23 +100,17 @@
 if ( $wgUseSharedUploads ) {
 	if ( $wgSharedUploadDBname ) {
 		$wgForeignFileRepos[] = array(
-			'class' => 'ForeignDBRepo',
+			'class' => 'ForeignDBViaLBRepo',
 			'name' => 'shared',
 			'directory' => $wgSharedUploadDirectory,
 			'url' => $wgSharedUploadPath,
 			'hashLevels' => $wgHashedSharedUploadDirectory ? 2 : 0,
 			'thumbScriptUrl' => $wgSharedThumbnailScriptPath,
 			'transformVia404' => !$wgGenerateThumbnailOnParse,
-			'dbType' => $wgDBtype,
-			'dbServer' => $wgDBserver,
-			'dbUser' => $wgDBuser,
-			'dbPassword' => $wgDBpassword,
-			'dbName' => $wgSharedUploadDBname,
-			'dbFlags' => ($wgDebugDumpSql ? DBO_DEBUG : 0) | DBO_DEFAULT,
-			'tablePrefix' => $wgSharedUploadDBprefix,
 			'hasSharedCache' => $wgCacheSharedUploads,
 			'descBaseUrl' => $wgRepositoryBaseUrl,
 			'fetchDescription' => $wgFetchCommonsDescriptions,
+			'wiki' => $wgSharedUploadDBname,
 		);
 	} else {
 		$wgForeignFileRepos[] = array(
@@ -137,7 +134,7 @@
 		'hashLevels'              => 2,
 		'fetchDescription'        => true,
 		'descriptionCacheExpiry'  => 43200,
-		'apiThumbCacheExpiry'     => 86400,
+		'apiThumbCacheExpiry'     => 0, // eloy, change back when fixed
 	);
 }
 
@@ -305,8 +302,12 @@
 
 $wgContLang = new StubContLang;
 
+if (defined('DONT_INTERPOLATE_TITLE')) {
+// rt#22195
+} else {
 // Now that variant lists may be available...
 $wgRequest->interpolateTitle();
+}
 
 $wgUser = new StubUser;
 $wgLang = new StubUserLang;