Added backend-fail-maxsize failure message and use it instead of the vague "could...
authorAaron Schulz <aaron@users.mediawiki.org>
Thu, 8 Mar 2012 22:51:43 +0000 (22:51 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Thu, 8 Mar 2012 22:51:43 +0000 (22:51 +0000)
includes/filerepo/backend/FileBackendStore.php
languages/messages/MessagesEn.php
maintenance/language/messages.inc

index c1be307..d45371c 100644 (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'] ) );
index f96a4b5..3c682a5 100644 (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".',
index 42de29f..f60208f 100644 (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',