Index: trunk/phase3/includes/Article.php |
— | — | @@ -1962,6 +1962,16 @@ |
1963 | 1963 | * action=protect handler |
1964 | 1964 | */ |
1965 | 1965 | public function protect() { |
| 1966 | + global $wgUser, $wgOut; |
| 1967 | + |
| 1968 | + # Check permissions |
| 1969 | + $permission_errors = $this->mTitle->getUserPermissionsErrors( 'protect', $wgUser ); |
| 1970 | + |
| 1971 | + if( count( $permission_errors ) > 0 ) { |
| 1972 | + $wgOut->showPermissionsErrorPage( $permission_errors ); |
| 1973 | + return; |
| 1974 | + } |
| 1975 | + |
1966 | 1976 | $form = new ProtectionForm( $this ); |
1967 | 1977 | $form->execute(); |
1968 | 1978 | } |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -111,6 +111,8 @@ |
112 | 112 | * Fixed the circular template inclusion check, was broken when the loop |
113 | 113 | involved redirects. Without this, infinite recursion within the parser is |
114 | 114 | possible. |
| 115 | +* (bug 18677) Give proper error message when viewing &action=protect without |
| 116 | + sufficient rights |
115 | 117 | |
116 | 118 | |
117 | 119 | == API changes in 1.16 == |