$this->dieUsageMsg(array('canthide'));
if($params['noemail'] && !$wgUser->isAllowed('blockemail'))
$this->dieUsageMsg(array('cantblock-email'));
- if(wfReadOnly())
- $this->dieUsageMsg(array('readonlytext'));
$form = new IPBlockForm('');
$form->BlockAddress = $params['user'];
private static function getPermissionsError(&$title, $token) {
global $wgUser;
- // Check wiki readonly
- if (wfReadOnly()) return array(array('readonlytext'));
// Check permissions
$errors = $title->getUserPermissionsErrors('delete', $wgUser);
if (!$wgUser->isAllowed('writeapi'))
$this->dieUsage('You\'re not allowed to edit this ' .
'wiki through the API', 'writeapidenied');
+ if (wfReadOnly())
+ $this->dieUsageMsg(array('readonlytext'));
}
/**
$this->dieUsageMsg(array('sessionfailure'));
if(!$wgUser->isAllowed('block'))
$this->dieUsageMsg(array('cantunblock'));
- if(wfReadOnly())
- $this->dieUsageMsg(array('readonlytext'));
$id = $params['id'];
$user = $params['user'];
$this->dieUsageMsg(array('permdenied-undelete'));
if($wgUser->isBlocked())
$this->dieUsageMsg(array('blockedtext'));
- if(wfReadOnly())
- $this->dieUsageMsg(array('readonlytext'));
if(!$wgUser->matchEditToken($params['token']))
$this->dieUsageMsg(array('sessionfailure'));