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