Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F7751
bug_28034.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
bzimport
Nov 21 2014, 11:32 PM
2014-11-21 23:32:43 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
bug_28034.patch
View Options
Index: specials/SpecialUpload.php
===================================================================
--- specials/SpecialUpload.php (revision 83968)
+++ specials/SpecialUpload.php (working copy)
@@ -451,8 +455,8 @@
$permErrors = $this->mUpload->verifyPermissions( $wgUser );
if( $permErrors !== true ) {
$code = array_shift( $permErrors[0] );
- $this->showRecoverableUploadError( wfMsgExt( $code,
- 'parseinline', $permErrors[0] ) );
+ $this->showRecoverableUploadError( wfMsgExt( $code[0],
+ 'parseinline', $code[1] ) );
return;
}
Index: upload/UploadBase.php
===================================================================
--- upload/UploadBase.php (revision 83968)
+++ upload/UploadBase.php (working copy)
@@ -1101,14 +1101,14 @@
*
* @param $user User
*
- * @return mixed true on success, error string on failure
+ * @return mixed true on success, array on failure
*/
private function checkOverwrite( $user ) {
// First check whether the local file can be overwritten
$file = $this->getLocalFile();
if( $file->exists() ) {
if( !self::userCanReUpload( $user, $file ) ) {
- return 'fileexists-forbidden';
+ return array( 'fileexists-forbidden', $file->getName() );
} else {
return true;
}
@@ -1119,7 +1119,7 @@
*/
$file = wfFindFile( $this->getTitle() );
if ( $file && !$user->isAllowed( 'reupload-shared' ) ) {
- return 'fileexists-shared-forbidden';
+ return array( 'fileexists-shared-forbidden', $file->getName() );
}
return true;
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
7280
Default Alt Text
bug_28034.patch (1 KB)
Attached To
Mode
T30034: uploading file to local wiki when file exists on shared repository (commons) gives spurious info in the warning message
Attached
Detach File
Event Timeline
Log In to Comment