X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FUserRightsProxy.php;h=a19f6984f257f32c2030584ab5ad7ca9b621305d;hb=df59d0feb31f0868ce634bd6707085d5fada70cc;hp=3be58473207ca9e052807ad817d823a0267def6e;hpb=8e30e6663afe287e3a1380b3f2dc4df72fbf5d5f;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/UserRightsProxy.php b/includes/UserRightsProxy.php index 3be5847320..a19f6984f2 100644 --- a/includes/UserRightsProxy.php +++ b/includes/UserRightsProxy.php @@ -114,7 +114,8 @@ class UserRightsProxy { */ private static function newFromLookup( $database, $field, $value, $ignoreInvalidDB = false ) { global $wgSharedDB, $wgSharedTables; - // If the user table is shared, perform the user query on it, but don't pass it to the UserRightsProxy, + // If the user table is shared, perform the user query on it, + // but don't pass it to the UserRightsProxy, // as user rights are normally not shared. if ( $wgSharedDB && in_array( 'user', $wgSharedTables ) ) { $userdb = self::getDB( $wgSharedDB, $ignoreInvalidDB ); @@ -277,8 +278,8 @@ class UserRightsProxy { array( 'user_id' => $this->id ), __METHOD__ ); - global $wgMemc; + $cache = ObjectCache::getMainWANInstance(); $key = wfForeignMemcKey( $this->database, false, 'user', 'id', $this->id ); - $wgMemc->delete( $key ); + $cache->delete( $key ); } }