* Do not show enotifminoredits preference, if disabled by $wgEnotifMinorEdits.
* AbortLogin returning "ABORTED" now handled. Also allows message identifier
for "ABORTED" reason to be returned and displayed to user.
-
+* (bug 28034) uploading file to local wiki when file exists on shared repository
+ (commons) gives spurious info in the warning message
+
=== API changes in 1.18 ===
* (bug 26339) Throw warning when truncating an overlarge API result
* (bug 14869) Add API module for accessing QueryPage-based special pages
$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;
}
$overwriteError = $this->checkOverwrite( $user );
if ( $overwriteError !== true ) {
- return array( array( $overwriteError ) );
+ return array( $overwriteError );
}
return true;
*
* @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;
}
*/
$file = wfFindFile( $this->getTitle() );
if ( $file && !$user->isAllowed( 'reupload-shared' ) ) {
- return 'fileexists-shared-forbidden';
+ return array( 'fileexists-shared-forbidden', $file->getName() );
}
return true;