Temporary(?) optimization; only update templatelinks on view if the page has cascading restrictions.
This commit is contained in:
parent
6ca171e7b8
commit
0c0c0eff81
1 changed files with 7 additions and 1 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue