Merge "Show change tags on diffs"
[lhc/web/wiklou.git] / includes / WikiPage.php
index 1a46b3e..8cf98ed 100644 (file)
@@ -2345,9 +2345,14 @@ class WikiPage implements Page, IDBAccessObject {
                                return Status::newGood();
                        }
 
-                       // Only certain restrictions can cascade... Otherwise, users who cannot normally protect pages
-                       // could "protect" them by transcluding them on protected pages they are allowed to edit.
+                       // Only certain restrictions can cascade...
                        $editrestriction = isset( $limit['edit'] ) ? array( $limit['edit'] ) : $this->mTitle->getRestrictions( 'edit' );
+                       foreach ( array_keys( $editrestriction, 'sysop' ) as $key ) {
+                               $editrestriction[$key] = 'editprotected'; // backwards compatibility
+                       }
+                       foreach ( array_keys( $editrestriction, 'autoconfirmed' ) as $key ) {
+                               $editrestriction[$key] = 'editsemiprotected'; // backwards compatibility
+                       }
 
                        $cascadingRestrictionLevels = $wgCascadingRestrictionLevels;
                        foreach ( array_keys( $cascadingRestrictionLevels, 'sysop' ) as $key ) {