return $this->mTitleProtection;
}
+ private function invalidateTitleProtectionCache() {
+ unset( $this->mTitleProtection );
+ }
+
/**
* Update the title protection status
*
$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' );
array( 'pt_namespace' => $this->getNamespace(), 'pt_title' => $this->getDBkey() ),
__METHOD__
);
+ $this->invalidateTitleProtectionCache();
}
/**
}
if ( $purgeExpired ) {
Title::purgeExpiredRestrictions();
+ $this->invalidateTitleProtectionCache();
}
wfProfileOut( __METHOD__ );
if ( $purgeExpired ) {
Title::purgeExpiredRestrictions();
+ $this->invalidateTitleProtectionCache();
}
}
$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( '' );