r105523 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105522‎ | r105523 | r105524 >
Date:09:07, 8 December 2011
Author:nikerabbit
Status:ok
Tags:
Comment:
Revert r97468 and implemented it in another way suggested by Tim
Modified paths:
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/GlobalFunctions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/GlobalFunctions.php
@@ -3210,8 +3210,10 @@
32113211 * @return String
32123212 */
32133213 function wfMemcKey( /*... */ ) {
 3214+ global $wgCachePrefix;
 3215+ $prefix = $wgCachePrefix === false ? wfWikiID() : $wgCachePrefix;
32143216 $args = func_get_args();
3215 - $key = wfWikiID() . ':' . implode( ':', $args );
 3217+ $key = $prefix . ':' . implode( ':', $args );
32163218 $key = str_replace( ' ', '_', $key );
32173219 return $key;
32183220 }
@@ -3241,10 +3243,8 @@
32423244 * @return String
32433245 */
32443246 function wfWikiID() {
3245 - global $wgDBprefix, $wgDBname, $wgWikiID;
3246 - if ( $wgWikiID !== false ) {
3247 - return $wgWikiID;
3248 - } elseif ( $wgDBprefix ) {
 3247+ global $wgDBprefix, $wgDBname;
 3248+ if ( $wgDBprefix ) {
32493249 return "$wgDBname-$wgDBprefix";
32503250 } else {
32513251 return $wgDBname;
Index: trunk/phase3/includes/DefaultSettings.php
@@ -4156,11 +4156,10 @@
41574157
41584158
41594159 /**
4160 - * Overwrite the caching key prefix with custom value. Do not set if using
4161 - * load balancer, since it depends on the key being in certain format.
 4160+ * Overwrite the caching key prefix with custom value.
41624161 * @since 1.19
41634162 */
4164 -$wgWikiID = false;
 4163+$wgCachePrefix = false;
41654164
41664165 /**
41674166 * Display the new debugging toolbar. This also enables profiling on database

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r97468Committing another live hack for which I'm tired of getting conflicts....nikerabbit11:21, 19 September 2011

Status & tagging log