dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update more docs and type hints to use IDatabase
[lhc/web/wiklou.git]
/
includes
/
UserRightsProxy.php
diff --git
a/includes/UserRightsProxy.php
b/includes/UserRightsProxy.php
index
1b9e4b6
..
3a3eb53
100644
(file)
--- a/
includes/UserRightsProxy.php
+++ b/
includes/UserRightsProxy.php
@@
-31,7
+31,7
@@
class UserRightsProxy {
*
* @see newFromId()
* @see newFromName()
*
* @see newFromId()
* @see newFromName()
- * @param
DatabaseB
ase $db Db connection
+ * @param
IDatab
ase $db Db connection
* @param string $database Database name
* @param string $name User name
* @param int $id User ID
* @param string $database Database name
* @param string $name User name
* @param int $id User ID
@@
-146,7
+146,7
@@
class UserRightsProxy {
*
* @param string $database
* @param bool $ignoreInvalidDB If true, don't check if $database is in $wgLocalDatabases
*
* @param string $database
* @param bool $ignoreInvalidDB If true, don't check if $database is in $wgLocalDatabases
- * @return
DatabaseB
ase|null If invalid selection
+ * @return
IDatab
ase|null If invalid selection
*/
public static function getDB( $database, $ignoreInvalidDB = false ) {
global $wgDBname;
*/
public static function getDB( $database, $ignoreInvalidDB = false ) {
global $wgDBname;
@@
-278,8
+278,9
@@
class UserRightsProxy {
array( 'user_id' => $this->id ),
__METHOD__ );
array( 'user_id' => $this->id ),
__METHOD__ );
- global $wgMemc;
$key = wfForeignMemcKey( $this->database, false, 'user', 'id', $this->id );
$key = wfForeignMemcKey( $this->database, false, 'user', 'id', $this->id );
- $wgMemc->delete( $key );
+ $this->db->onTransactionPreCommitOrIdle( function() use ( $key ) {
+ ObjectCache::getMainWANInstance()->delete( $key );
+ } );
}
}
}
}