Index: trunk/phase3/includes/Article.php |
— | — | @@ -2829,7 +2829,13 @@ |
2830 | 2830 | $parserCache->save( $parserOutput, $this, $wgUser ); |
2831 | 2831 | } |
2832 | 2832 | |
2833 | | - if ( !wfReadOnly() ) { |
| 2833 | + if ( !wfReadOnly() && $this->mTitle->areRestrictionsCascading() ) { |
| 2834 | + // templatelinks table may have become out of sync, |
| 2835 | + // especially if using variable-based transclusions. |
| 2836 | + // For paranoia, check if things have changed and if |
| 2837 | + // so apply updates to the database. This will ensure |
| 2838 | + // that cascaded protections apply as soon as the changes |
| 2839 | + // are visible. |
2834 | 2840 | |
2835 | 2841 | # Get templates from templatelinks |
2836 | 2842 | $id = $this->mTitle->getArticleID(); |