$fragment,
$this->getInterwiki()
);
-
}
/**
# Cycle through all the restrictions.
foreach ( $rows as $row ) {
-
// Don't take care of restrictions types that aren't allowed
if ( !in_array( $row->pr_type, $restrictionTypes ) ) {
continue;
public function invalidateCache( $purgeTime = null ) {
if ( wfReadOnly() ) {
return false;
- }
-
- if ( $this->mArticleID === 0 ) {
+ } elseif ( $this->mArticleID === 0 ) {
return true; // avoid gap locking if we know it's not there
}
+ $dbw = wfGetDB( DB_MASTER );
+ $dbw->onTransactionPreCommitOrIdle( function () {
+ ResourceLoaderWikiModule::invalidateModuleCache( $this, null, null, wfWikiID() );
+ } );
+
$conds = $this->pageCond();
DeferredUpdates::addUpdate(
new AutoCommitUpdate(
- wfGetDB( DB_MASTER ),
+ $dbw,
__METHOD__,
function ( IDatabase $dbw, $fname ) use ( $conds, $purgeTime ) {
$dbTimestamp = $dbw->timestamp( $purgeTime ?: time() );
: $wgExemptFromUserRobotsControl;
return !in_array( $this->mNamespace, $bannedNamespaces );
-
}
/**