abstract class FormSpecialPage extends SpecialPage {
/**
* The sub-page of the special page.
- * @var string
+ * @var string|null
*/
protected $par = null;
/**
* 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 );
/**
* Maybe do something interesting with the subpage parameter
- * @param string $par
+ * @param string|null $par
*/
protected function setParameter( $par ) {
$this->par = $par;
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() ) {