X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecialpage%2FFormSpecialPage.php;h=939460f78e7f5675019c56313dd7edb616f06edb;hb=ee09d4f0ee2e592e721f00805735afcb9e3e7e22;hp=81a0036e836c9711df47ef1b33831f4e794687df;hpb=067b22566476639d404d1caaf9a460a4a0a398fe;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specialpage/FormSpecialPage.php b/includes/specialpage/FormSpecialPage.php index 81a0036e83..939460f78e 100644 --- a/includes/specialpage/FormSpecialPage.php +++ b/includes/specialpage/FormSpecialPage.php @@ -31,7 +31,7 @@ abstract class FormSpecialPage extends SpecialPage { /** * The sub-page of the special page. - * @var string + * @var string|null */ protected $par = null; @@ -166,7 +166,7 @@ abstract class FormSpecialPage extends SpecialPage { /** * Basic SpecialPage workflow: get a form, send it to the user; get some data back, * - * @param string $par Subpage string if one was specified + * @param string|null $par Subpage string if one was specified */ public function execute( $par ) { $this->setParameter( $par ); @@ -188,7 +188,7 @@ abstract class FormSpecialPage extends SpecialPage { /** * Maybe do something interesting with the subpage parameter - * @param string $par + * @param string|null $par */ protected function setParameter( $par ) { $this->par = $par; @@ -203,9 +203,11 @@ abstract class FormSpecialPage extends SpecialPage { protected function checkExecutePermissions( User $user ) { $this->checkPermissions(); - if ( $this->requiresUnblock() && $user->isBlocked() ) { + if ( $this->requiresUnblock() ) { $block = $user->getBlock(); - throw new UserBlockedError( $block ); + if ( $block && $block->isSitewide() ) { + throw new UserBlockedError( $block ); + } } if ( $this->requiresWrite() ) {