(bug 31777) Upload unknown error ``fileexists-forbidden''
authorumherirrender <umherirrender_de.wp@web.de>
Sun, 17 Jun 2012 20:31:08 +0000 (22:31 +0200)
committerumherirrender <umherirrender_de.wp@web.de>
Sun, 1 Jul 2012 17:35:31 +0000 (19:35 +0200)
adding messages to ApiBase::$messageMap and to message files for client
side localisation

Change-Id: I37e03130c6b90e4614514cd76b73eab6890eb82f

RELEASE-NOTES-1.20
includes/api/ApiBase.php
includes/api/ApiUpload.php
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php
maintenance/language/messages.inc

index 7f6abff..021e4e8 100644 (file)
@@ -153,6 +153,7 @@ upgrade PHP if you have not done so prior to upgrading MediaWiki.
 * (bug 32643) action=purge with forcelinkupdate no longer crashes when ratelimit is reached
 * The paraminfo module now also contains result properties for most modules
 * (bug 32348) Allow descending order for list=alllinks
+* (bug 31777) Upload unknown error ``fileexists-forbidden''
 
 === Languages updated in 1.20 ===
 
index 883a3c0..a6e3363 100644 (file)
@@ -1307,6 +1307,8 @@ abstract class ApiBase extends ContextSource {
                'specialpage-cantexecute' => array( 'code' => 'specialpage-cantexecute', 'info' => "You don't have permission to view the results of this special page" ),
                'invalidoldimage' => array( 'code' => 'invalidoldimage', 'info' => 'The oldimage parameter has invalid format' ),
                'nodeleteablefile' => array( 'code' => 'nodeleteablefile', 'info' => 'No such old version of the file' ),
+               'fileexists-forbidden' => array( 'code' => 'fileexists-forbidden', 'info' => 'A file with name "$1" already exists, and cannot be overwritten.' ),
+               'fileexists-shared-forbidden' => array( 'code' => 'fileexists-shared-forbidden', 'info' => 'A file with name "$1" already exists in the shared file repository, and cannot be overwritten.' ),
 
                // ApiEditPage messages
                'noimageredirect-anon' => array( 'code' => 'noimageredirect-anon', 'info' => "Anonymous users can't create image redirects" ),
index db1ee16..aaa4c85 100644 (file)
@@ -687,6 +687,8 @@ class ApiUpload extends ApiBase {
                                array( 'code' => 'stashfailed', 'info' => 'Stashing temporary file failed' ),
                                array( 'code' => 'internal-error', 'info' => 'An internal error occurred' ),
                                array( 'code' => 'asynccopyuploaddisabled', 'info' => 'Asynchronous copy uploads disabled' ),
+                               array( 'fileexists-forbidden' ),
+                               array( 'fileexists-shared-forbidden' ),
                        )
                );
        }
index 4f4fe72..c7d1ed0 100644 (file)
@@ -4844,6 +4844,8 @@ Otherwise, you can use the easy form below. Your comment will be added to the pa
 'api-error-emptypage'                     => 'Creating new, empty pages is not allowed.',
 'api-error-fetchfileerror'                => 'Internal error: Something went wrong while fetching the file.',
 'api-error-file-too-large'                => 'The file you submitted was too large.',
+'api-error-fileexists-forbidden'          => 'A file with name "$1" already exists, and cannot be overwritten.',
+'api-error-fileexists-shared-forbidden'   => 'A file with name "$1" already exists in the shared file repository, and cannot be overwritten.',
 'api-error-filename-tooshort'             => 'The filename is too short.',
 'api-error-filetype-banned'               => 'This type of file is banned.',
 'api-error-filetype-missing'              => 'The filename is missing an extension.',
index dbf6c84..3300d1f 100644 (file)
@@ -4721,6 +4721,8 @@ $4 is the gender of the target user.',
 'api-error-emptypage' => 'API error message that can be used for client side localisation of API errors.',
 'api-error-fetchfileerror' => 'API error message that can be used for client side localisation of API errors.',
 'api-error-file-too-large' => 'API error message that can be used for client side localisation of API errors.',
+'api-error-fileexists-forbidden' => 'API error message that can be used for client side localisation of API errors.',
+'api-error-fileexists-shared-forbidden' => 'API error message that can be used for client side localisation of API errors.',
 'api-error-filename-tooshort' => 'API error message that can be used for client side localisation of API errors.',
 'api-error-filetype-banned' => 'API error message that can be used for client side localisation of API errors.',
 'api-error-filetype-missing' => 'The word "extension" refers to the part behind the last dot in a file name, that by convention gives a hint about the kind of data format which a files contents are in.',
index 76984f2..2e381aa 100644 (file)
@@ -3702,6 +3702,8 @@ $wgMessageStructure = array(
                'api-error-empty-file',
                'api-error-emptypage',
                'api-error-fetchfileerror',
+               'api-error-fileexists-forbidden',
+               'api-error-fileexists-shared-forbidden',
                'api-error-file-too-large',
                'api-error-filename-tooshort',
                'api-error-filetype-banned',