X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FTitle.php;h=213572b95bc245c70958c18ae17cbe32394d5439;hb=53779578b44575ef91feb3fad488f09b52f737d7;hp=5e1e8c61156ab55041c88f5833b18575eb06ed9b;hpb=5e4facec788bd45586c66a04b6fcb26c83f46902;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Title.php b/includes/Title.php index 5e1e8c6115..213572b95b 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -4391,16 +4391,19 @@ class Title implements LinkTarget { 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() );