X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2FTitle.php;h=3c51baebe2cc4611d1a266f662af119e9cb99905;hp=5e1e8c61156ab55041c88f5833b18575eb06ed9b;hb=e758226c91935a1df2b6fd3ed1f18922d8bfb45b;hpb=59e7337ea612d03d08b67e6ada707e3d7ced738d diff --git a/includes/Title.php b/includes/Title.php index 5e1e8c6115..3c51baebe2 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -1412,7 +1412,6 @@ class Title implements LinkTarget { $fragment, $this->getInterwiki() ); - } /** @@ -2926,7 +2925,6 @@ class Title implements LinkTarget { # 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; @@ -4391,16 +4389,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() ); @@ -4597,7 +4598,6 @@ class Title implements LinkTarget { : $wgExemptFromUserRobotsControl; return !in_array( $this->mNamespace, $bannedNamespaces ); - } /**