Index: branches/werdna/restrictions-separation/includes/ProtectionForm.php |
— | — | @@ -39,7 +39,7 @@ |
40 | 40 | // but the db allows multiples separated by commas. |
41 | 41 | $this->mRestrictions[$action] = implode( '', $this->mTitle->getRestrictions( $action ) ); |
42 | 42 | } |
43 | | - $this->mCascade = $this->mTitle->areRestrictionsCascading(); |
| 43 | + $this->mCascade = $this->mTitle->getRestrictionCascadingFlags() & 1; |
44 | 44 | } |
45 | 45 | |
46 | 46 | // The form will be available in read-only to show levels. |
— | — | @@ -213,7 +213,9 @@ |
214 | 214 | |
215 | 215 | function buildCascadeInput() { |
216 | 216 | $id = 'mwProtect-cascade'; |
217 | | - return wfCheckLabel( wfMsg( 'protect-cascade' ), $id, $id, $this->mCascade, array ()); |
| 217 | + $ci = wfCheckLabel( wfMsg( 'protect-cascade' ), $id, $id, $this->mCascade, array ()); |
| 218 | + $id = 'mwProtect-cascadeonly'; |
| 219 | + $ci .= wfCheckLabel( wfMsg( 'protect-cascadeonly' ), $id, $id, $this->mCascade, array ()); |
218 | 220 | } |
219 | 221 | |
220 | 222 | function buildSubmit() { |
Index: branches/werdna/restrictions-separation/includes/Title.php |
— | — | @@ -50,7 +50,7 @@ |
51 | 51 | var $mArticleID; # Article ID, fetched from the link cache on demand |
52 | 52 | var $mLatestID; # ID of most recent revision |
53 | 53 | var $mRestrictions; # Array of groups allowed to edit this article |
54 | | - var $mCascadeRestrictions; |
| 54 | + var $mCascadeRestrictionFlags; |
55 | 55 | var $mRestrictionsLoaded; # Boolean for initialisation on demand |
56 | 56 | var $mPrefixedText; # Text form including namespace/interwiki, initialised on demand |
57 | 57 | var $mDefaultNamespace; # Namespace index when there is no namespace |
— | — | @@ -1383,12 +1383,12 @@ |
1384 | 1384 | } |
1385 | 1385 | } |
1386 | 1386 | |
1387 | | - function areRestrictionsCascading() { |
| 1387 | + function getRestrictionCascadingFlags() { |
1388 | 1388 | if (!$this->mRestrictionsLoaded) { |
1389 | 1389 | $this->loadRestrictions(); |
1390 | 1390 | } |
1391 | 1391 | |
1392 | | - return $this->mCascadeRestrictions; |
| 1392 | + return $this->mCascadeRestrictionFlags; |
1393 | 1393 | } |
1394 | 1394 | |
1395 | 1395 | /** |
— | — | @@ -1413,9 +1413,7 @@ |
1414 | 1414 | |
1415 | 1415 | $this->mRestrictions[$row->pr_type] = explode( ',', trim( $row->pr_level ) ); |
1416 | 1416 | |
1417 | | - if ($row->pr_cascade) { |
1418 | | - $this->mCascadeRestrictions = true; |
1419 | | - } |
| 1417 | + $this->mCascadeRestrictionFlags |= $row->pr_cascade; |
1420 | 1418 | } |
1421 | 1419 | |
1422 | 1420 | $this->mRestrictionsLoaded = true; |