From: Niklas Laxström Date: Thu, 8 Dec 2011 09:07:10 +0000 (+0000) Subject: Revert r97468 and implemented it in another way suggested by Tim X-Git-Tag: 1.31.0-rc.0~26135 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/password.php?a=commitdiff_plain;h=2b79fc74e52a7dfa8676073337ca2ab2bbb338d3;p=lhc%2Fweb%2Fwiklou.git Revert r97468 and implemented it in another way suggested by Tim --- diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 1eefa55d65..932cf83c96 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -4156,11 +4156,10 @@ $wgParserTestRemote = false; /** - * Overwrite the caching key prefix with custom value. Do not set if using - * load balancer, since it depends on the key being in certain format. + * Overwrite the caching key prefix with custom value. * @since 1.19 */ -$wgWikiID = false; +$wgCachePrefix = false; /** * Display the new debugging toolbar. This also enables profiling on database diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 02c6c943b9..7624887516 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -3210,8 +3210,10 @@ function wfGetPrecompiledData( $name ) { * @return String */ function wfMemcKey( /*... */ ) { + global $wgCachePrefix; + $prefix = $wgCachePrefix === false ? wfWikiID() : $wgCachePrefix; $args = func_get_args(); - $key = wfWikiID() . ':' . implode( ':', $args ); + $key = $prefix . ':' . implode( ':', $args ); $key = str_replace( ' ', '_', $key ); return $key; } @@ -3241,10 +3243,8 @@ function wfForeignMemcKey( $db, $prefix /*, ... */ ) { * @return String */ function wfWikiID() { - global $wgDBprefix, $wgDBname, $wgWikiID; - if ( $wgWikiID !== false ) { - return $wgWikiID; - } elseif ( $wgDBprefix ) { + global $wgDBprefix, $wgDBname; + if ( $wgDBprefix ) { return "$wgDBname-$wgDBprefix"; } else { return $wgDBname;