Make wfForeignMemcKey consistent with wfMemcKey
authorErik Bernhardson <ebernhardson@wikimedia.org>
Tue, 2 Jul 2013 23:38:04 +0000 (16:38 -0700)
committerErik Bernhardson <ebernhardson@wikimedia.org>
Fri, 2 Aug 2013 23:50:05 +0000 (16:50 -0700)
The wfMemcKey function converts any spaces in the key into _, while
the wfForeignMemcKey does not.  As such they would not return the same
key in certain corner cases.

Change-Id: I520dacdce953414dee5907324c2c98db858bcd42

includes/GlobalFunctions.php

index a44e45b..30b36e3 100644 (file)
@@ -3384,7 +3384,7 @@ function wfForeignMemcKey( $db, $prefix /*, ... */ ) {
        } else {
                $key = $db . ':' . implode( ':', $args );
        }
-       return $key;
+       return str_replace( ' ', '_', $key );
 }
 
 /**