* Fixed the circular template inclusion check, was broken when the loop
involved redirects. Without this, infinite recursion within the parser is
possible.
+* (bug 18677) Give proper error message when viewing &action=protect without
+ sufficient rights
== API changes in 1.16 ==
* action=protect handler
*/
public function protect() {
+ global $wgUser, $wgOut;
+
+ # Check permissions
+ $permission_errors = $this->mTitle->getUserPermissionsErrors( 'protect', $wgUser );
+
+ if( count( $permission_errors ) > 0 ) {
+ $wgOut->showPermissionsErrorPage( $permission_errors );
+ return;
+ }
+
$form = new ProtectionForm( $this );
$form->execute();
}