http://www.mediawiki.org/wiki/Special:Code/MediaWiki/89693

Revision: 89693
Author:   reedy
Date:     2011-06-07 21:28:47 +0000 (Tue, 07 Jun 2011)
Log Message:
-----------
Revert r87292

Modified Paths:
--------------
    trunk/phase3/includes/User.php
    trunk/phase3/includes/specials/SpecialUserlogin.php
    trunk/phase3/includes/specials/SpecialUserrights.php

Modified: trunk/phase3/includes/User.php
===================================================================
--- trunk/phase3/includes/User.php      2011-06-07 21:26:33 UTC (rev 89692)
+++ trunk/phase3/includes/User.php      2011-06-07 21:28:47 UTC (rev 89693)
@@ -1743,7 +1743,7 @@
                        $wgMemc->set( $key, $val ? 1 : 0, 1800 );
                }
                if ( $changed ) {
-                       $this->invalidateCache( true );
+                       $this->invalidateCache();
                }
        }
 
@@ -1776,15 +1776,13 @@
         * Immediately touch the user data cache for this account.
         * Updates user_touched field, and removes account data from memcached
         * for reload on the next hit.
-        *
-        * @param $doDatabaseUpdate bool Do you really need to update the 
database? Really?
         */
-       function invalidateCache( $doDatabaseUpdate = false ) {
+       function invalidateCache() {
                if( wfReadOnly() ) {
                        return;
                }
                $this->load();
-               if( $this->mId && $doDatabaseUpdate ) {
+               if( $this->mId ) {
                        $this->mTouched = self::newTouchedTimestamp();
 
                        $dbw = wfGetDB( DB_MASTER );
@@ -2247,7 +2245,7 @@
                $this->mGroups[] = $group;
                $this->mRights = User::getGroupPermissions( 
$this->getEffectiveGroups( true ) );
 
-               $this->invalidateCache( true );
+               $this->invalidateCache();
        }
 
        /**
@@ -2269,7 +2267,7 @@
                $this->mGroups = array_diff( $this->mGroups, array( $group ) );
                $this->mRights = User::getGroupPermissions( 
$this->getEffectiveGroups( true ) );
 
-               $this->invalidateCache( true );
+               $this->invalidateCache();
        }
 
        /**

Modified: trunk/phase3/includes/specials/SpecialUserlogin.php
===================================================================
--- trunk/phase3/includes/specials/SpecialUserlogin.php 2011-06-07 21:26:33 UTC 
(rev 89692)
+++ trunk/phase3/includes/specials/SpecialUserlogin.php 2011-06-07 21:28:47 UTC 
(rev 89693)
@@ -658,7 +658,7 @@
                                        $wgUser->setOption( 'rememberpassword', 
$this->mRemember ? 1 : 0 );
                                        $wgUser->saveSettings();
                                } else {
-                                       $wgUser->invalidateCache( true );
+                                       $wgUser->invalidateCache();
                                }
                                $wgUser->setCookies();
                                self::clearLoginToken();

Modified: trunk/phase3/includes/specials/SpecialUserrights.php
===================================================================
--- trunk/phase3/includes/specials/SpecialUserrights.php        2011-06-07 
21:26:33 UTC (rev 89692)
+++ trunk/phase3/includes/specials/SpecialUserrights.php        2011-06-07 
21:28:47 UTC (rev 89693)
@@ -231,7 +231,7 @@
                $newGroups = array_unique( $newGroups );
 
                // Ensure that caches are cleared
-               $user->invalidateCache( true );
+               $user->invalidateCache();
 
                wfDebug( 'oldGroups: ' . print_r( $oldGroups, true ) );
                wfDebug( 'newGroups: ' . print_r( $newGroups, true ) );


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to