From: Brion Vibber Date: Sun, 14 Jan 2007 10:55:23 +0000 (+0000) Subject: Temporary(?) optimization; only update templatelinks on view if the page has cascadin... X-Git-Tag: 1.31.0-rc.0~54418 X-Git-Url: http://git.cyclocoop.org/clavettes/images/siteon3.jpg?a=commitdiff_plain;h=0c0c0eff81fe8367c7ec431651440d9312871df9;p=lhc%2Fweb%2Fwiklou.git Temporary(?) optimization; only update templatelinks on view if the page has cascading restrictions. --- diff --git a/includes/Article.php b/includes/Article.php index 3a5ee31b18..ed7746d3ea 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -2829,7 +2829,13 @@ class Article { $parserCache->save( $parserOutput, $this, $wgUser ); } - if ( !wfReadOnly() ) { + if ( !wfReadOnly() && $this->mTitle->areRestrictionsCascading() ) { + // templatelinks table may have become out of sync, + // especially if using variable-based transclusions. + // For paranoia, check if things have changed and if + // so apply updates to the database. This will ensure + // that cascaded protections apply as soon as the changes + // are visible. # Get templates from templatelinks $id = $this->mTitle->getArticleID();