# haven't bothered to log out before trying to create an account to
# evade it, but we'll leave that to their guilty conscience to figure
# out.
+ $errorParams = array(
+ $block->getTarget(),
+ $block->mReason ? $block->mReason : $this->msg( 'blockednoreason' )->text(),
+ $block->getByName()
+ );
+
+ if ( $block->getType() === Block::TYPE_RANGE ) {
+ $errorMessage = 'cantcreateaccount-range-text';
+ $errorParams[] = $this->getRequest()->getIP();
+ } else {
+ $errorMessage = 'cantcreateaccount-text';
+ }
+
throw new ErrorPageError(
'cantcreateaccounttitle',
- 'cantcreateaccount-text',
- array(
- $block->getTarget(),
- $block->mReason ? $block->mReason : $this->msg( 'blockednoreason' )->text(),
- $block->getByName()
- )
+ $errorMessage,
+ $errorParams
);
}
# Account creation failure
'cantcreateaccounttitle' => 'Cannot create account',
+'cantcreateaccount-range-text' => "Account creation from IP addresses in the range '''$1''', which includes your IP address ('''$4'''), has been blocked by [[User:$3|$3]].
+
+The reason given by $3 is ''$2''",
'cantcreateaccount-text' => "Account creation from this IP address ('''$1''') has been blocked by [[User:$3|$3]].
The reason given by $3 is ''$2''",
* $1 - target IP address
* $2 - reason or {{msg-mw|blockednoreason}}
* $3 - username',
+'cantcreateaccount-range-text' => "Used as more detailed version of the {{msg-mw|Cantcreateaccount-text}} error message, with the title {{msg-mw|cantcreateaccounttitle}}.
+* $1 - target IP range
+* $2 - reason or {{msg-mw|blockednoreason}}
+* $3 - username
+* $4 - current user's IP address",
# History pages
'viewpagelogs' => 'Link displayed in history of pages',
'cantcreateaccount' => array(
'cantcreateaccounttitle',
'cantcreateaccount-text',
+ 'cantcreateaccount-range-text',
),
'history' => array(
'viewpagelogs',