Temporary(?) optimization; only update templatelinks on view if the page has cascading restrictions.

This commit is contained in:
Brion Vibber 2007-01-14 10:55:23 +00:00
parent 6ca171e7b8
commit 0c0c0eff81

View file

@ -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();