Index: trunk/phase3/includes/Title.php |
— | — | @@ -2986,7 +2986,13 @@ |
2987 | 2987 | } |
2988 | 2988 | |
2989 | 2989 | // Image-specific checks |
2990 | | - $errors = array_merge( $errors, $this->validateFileMoveOperation( $nt ) ); |
| 2990 | + if ( $this->getNamespace() == NS_FILE ) { |
| 2991 | + $errors = array_merge( $errors, $this->validateFileMoveOperation( $nt ) ); |
| 2992 | + } |
| 2993 | + |
| 2994 | + if ( $nt->getNamespace() == NS_FILE && $this->getNamespace() != NS_FILE ) { |
| 2995 | + $errors[] = array( 'nonfile-cannot-move-to-file' ); |
| 2996 | + } |
2991 | 2997 | |
2992 | 2998 | if ( $auth ) { |
2993 | 2999 | $errors = wfMergeErrorArrays( $errors, |
— | — | @@ -3056,10 +3062,6 @@ |
3057 | 3063 | if ( !$wgUser->isAllowed( 'reupload-shared' ) && !$destfile->exists() && wfFindFile( $nt ) ) { |
3058 | 3064 | $errors[] = array( 'file-exists-sharedrepo' ); |
3059 | 3065 | } |
3060 | | - |
3061 | | - if ( $nt->getNamespace() == NS_FILE && $this->getNamespace() != NS_FILE ) { |
3062 | | - $errors[] = array( 'nonfile-cannot-move-to-file' ); |
3063 | | - } |
3064 | 3066 | |
3065 | 3067 | return $errors; |
3066 | 3068 | } |