Index: trunk/phase3/includes/Article.php |
— | — | @@ -1835,14 +1835,11 @@ |
1836 | 1836 | } |
1837 | 1837 | $comment = $wgContLang->ucfirst( wfMsgForContent( $comment_type, $this->mTitle->getPrefixedText() ) ); |
1838 | 1838 | |
1839 | | - # Only restrictions with the 'protect' right can cascade... |
1840 | | - # Otherwise, people who cannot normally protect can "protect" pages via transclusion |
1841 | | - foreach( $limit as $action => $restriction ) { |
1842 | | - # FIXME: can $restriction be an array or what? (same as fixme above) |
1843 | | - if( $restriction != 'protect' && $restriction != 'sysop' ) { |
1844 | | - $cascade = false; |
1845 | | - break; |
1846 | | - } |
| 1839 | + foreach( $limit as $action => $restrictions ) { |
| 1840 | + # Check if the group level required to edit also can protect pages |
| 1841 | + # Otherwise, people who cannot normally protect can "protect" pages via transclusion |
| 1842 | + $cascade = ( $cascade && isset($wgGroupPermissions[$restrictions]['protect']) && |
| 1843 | + $wgGroupPermissions[$restrictions]['protect'] ); |
1847 | 1844 | } |
1848 | 1845 | |
1849 | 1846 | $cascade_description = ''; |
— | — | @@ -1893,8 +1890,7 @@ |
1894 | 1891 | # Update the protection log |
1895 | 1892 | $log = new LogPage( 'protect' ); |
1896 | 1893 | if( $protect ) { |
1897 | | - $log->addEntry( $modified ? 'modify' : 'protect', $this->mTitle, |
1898 | | - trim( $reason . " [$updated]$cascade_description$expiry_description" ) ); |
| 1894 | + $log->addEntry( $modified ? 'modify' : 'protect', $this->mTitle, trim( $reason . " [$updated]$cascade_description$expiry_description" ) ); |
1899 | 1895 | } else { |
1900 | 1896 | $log->addEntry( 'unprotect', $this->mTitle, $reason ); |
1901 | 1897 | } |