http://www.mediawiki.org/wiki/Special:Code/MediaWiki/76242
Revision: 76242
Author: hashar
Date: 2010-11-07 11:54:48 +0000 (Sun, 07 Nov 2010)
Log Message:
-----------
Follow up r65500 : invalidate Title protection cache.
Modified Paths:
--------------
trunk/phase3/includes/Title.php
Modified: trunk/phase3/includes/Title.php
===================================================================
--- trunk/phase3/includes/Title.php 2010-11-07 11:37:21 UTC (rev 76241)
+++ trunk/phase3/includes/Title.php 2010-11-07 11:54:48 UTC (rev 76242)
@@ -1602,6 +1602,10 @@
return $this->mTitleProtection;
}
+ private function invalidateTitleProtectionCache() {
+ unset( $this->mTitleProtection );
+ }
+
/**
* Update the title protection status
*
@@ -1650,6 +1654,8 @@
$dbw->delete( 'protected_titles', array( 'pt_namespace'
=> $namespace,
'pt_title' => $title ), __METHOD__ );
}
+ $this->invalidateTitleProtectionCache();
+
# Update the protection log
if ( $dbw->affectedRows() ) {
$log = new LogPage( 'protect' );
@@ -1676,6 +1682,7 @@
array( 'pt_namespace' => $this->getNamespace(),
'pt_title' => $this->getDBkey() ),
__METHOD__
);
+ $this->invalidateTitleProtectionCache();
}
/**
@@ -2058,6 +2065,7 @@
}
if ( $purgeExpired ) {
Title::purgeExpiredRestrictions();
+ $this->invalidateTitleProtectionCache();
}
wfProfileOut( __METHOD__ );
@@ -2177,6 +2185,7 @@
if ( $purgeExpired ) {
Title::purgeExpiredRestrictions();
+ $this->invalidateTitleProtectionCache();
}
}
@@ -2211,6 +2220,7 @@
$this->mRestrictions['create']
= explode( ',', trim( $title_protection['pt_create_perm'] ) );
} else { // Get rid of the old
restrictions
Title::purgeExpiredRestrictions();
+
$this->invalidateTitleProtectionCache();
}
} else {
$this->mRestrictionsExpiry['create'] =
Block::decodeExpiry( '' );
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs