Index: trunk/phase3/includes/Article.php |
— | — | @@ -1884,13 +1884,10 @@ |
1885 | 1885 | |
1886 | 1886 | # Only restrictions with the 'protect' right can cascade... |
1887 | 1887 | # Otherwise, people who cannot normally protect can "protect" pages via transclusion |
1888 | | - foreach( $limit as $action => $restriction ) { |
1889 | | - # FIXME: can $restriction be an array or what? (same as fixme above) |
1890 | | - if( $restriction != 'protect' && $restriction != 'sysop' ) { |
1891 | | - $cascade = false; |
1892 | | - break; |
1893 | | - } |
1894 | | - } |
| 1888 | + $editrestriction = isset( $limit['edit'] ) ? array( $limit['edit'] ) : $this->mTitle->getRestrictions( 'edit' ); |
| 1889 | + # The schema allows multiple restrictions |
| 1890 | + if(!in_array('protect', $editrestriction) && !in_array('sysop', $editrestriction)) |
| 1891 | + $cascade = false; |
1895 | 1892 | $cascade_description = ''; |
1896 | 1893 | if( $cascade ) { |
1897 | 1894 | $cascade_description = ' ['.wfMsgForContent('protect-summary-cascade').']'; |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -218,6 +218,8 @@ |
219 | 219 | * Added complimentary function for addHandler() called removeHandler() for removing events |
220 | 220 | * Improved security of file uploads for IE clients, using a reverse-engineered |
221 | 221 | algorithm very similar to IE's content detection algorithm. |
| 222 | +* Cascading protection no longer requires that both edit and move are restricted |
| 223 | + to sysop, just edit=sysop is enough |
222 | 224 | |
223 | 225 | === Bug fixes in 1.14 === |
224 | 226 | |