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;