Added backend-fail-maxsize failure message and use it instead of the vague "could not store" type message.

This commit is contained in:
Aaron Schulz 2012-03-08 22:51:43 +00:00
parent 1a5edfa6c0
commit bcdecf8fff
3 changed files with 3 additions and 1 deletions

View file

@ -67,7 +67,7 @@ abstract class FileBackendStore extends FileBackend {
final public function createInternal( array $params ) {
wfProfileIn( __METHOD__ );
if ( strlen( $params['content'] ) > $this->maxFileSizeInternal() ) {
$status = Status::newFatal( 'backend-fail-create', $params['dst'] );
$status = Status::newFatal( 'backend-fail-maxsize', $params['dst'] );
} else {
$status = $this->doCreateInternal( $params );
$this->clearCache( array( $params['dst'] ) );

View file

@ -2263,6 +2263,7 @@ If the problem persists, contact an [[Special:ListUsers/sysop|administrator]].',
'backend-fail-closetemp' => 'Could not close temporary file.',
'backend-fail-read' => 'Could not read file $1.',
'backend-fail-create' => 'Could not create file $1.',
'backend-fail-maxsize' => 'Could not create file $1 because it is larger than {{PLURAL:$2|$2 bytes|$2 byte}}.',
'backend-fail-readonly' => 'The storage backend "$1" is currently read-only. The reason given was: "$2"',
'backend-fail-synced' => 'The file "$1" is in an inconsistent state within the internal storage backends',
'backend-fail-connect' => 'Could not connect to storage backend "$1".',

View file

@ -1365,6 +1365,7 @@ $wgMessageStructure = array(
'backend-fail-closetemp',
'backend-fail-read',
'backend-fail-create',
'backend-fail-maxsize',
'backend-fail-readonly',
'backend-fail-synced',
'backend-fail-connect',