Index: trunk/phase3/includes/Title.php |
— | — | @@ -2289,7 +2289,6 @@ |
2290 | 2290 | * @return mixed true on success, message name on failure |
2291 | 2291 | */ |
2292 | 2292 | public function isValidMoveOperation( &$nt, $auth = true ) { |
2293 | | - global $wgUser; |
2294 | 2293 | if( !$this or !$nt ) { |
2295 | 2294 | return 'badtitletext'; |
2296 | 2295 | } |
— | — | @@ -2314,8 +2313,7 @@ |
2315 | 2314 | |
2316 | 2315 | if ( $auth && ( |
2317 | 2316 | !$this->userCan( 'edit' ) || !$nt->userCan( 'edit' ) || |
2318 | | - !$this->userCan( 'move' ) || !$nt->userCan( 'move' ) || |
2319 | | - $this->getNamespace() == NS_IMAGE && !$wgUser->isAllowed( 'upload' ) ) ) { |
| 2317 | + !$this->userCan( 'move' ) || !$nt->userCan( 'move' ) ) ) { |
2320 | 2318 | return 'protectedpage'; |
2321 | 2319 | } |
2322 | 2320 | |
— | — | @@ -2358,17 +2356,6 @@ |
2359 | 2357 | return $err; |
2360 | 2358 | } |
2361 | 2359 | |
2362 | | - // If it's existent image, move it as image |
2363 | | - if( $this->getNamespace() == NS_IMAGE && $nt->getNamespace() == NS_IMAGE && wfFindFile( $this ) ) { |
2364 | | - $oldfile = wfFindFile( $this ); |
2365 | | - $newfile = wfFindFile( $nt ); |
2366 | | - var_dump( array( $oldfile, $newfile ) ); |
2367 | | - if( $newfile ) { |
2368 | | - return 'articleexists'; |
2369 | | - } |
2370 | | - return 'a'; |
2371 | | - } |
2372 | | - |
2373 | 2360 | $pageid = $this->getArticleID(); |
2374 | 2361 | if( $nt->exists() ) { |
2375 | 2362 | $this->moveOverExistingRedirect( $nt, $reason, $createRedirect ); |
— | — | @@ -2608,11 +2595,6 @@ |
2609 | 2596 | } |
2610 | 2597 | |
2611 | 2598 | /** |
2612 | | - * Moves image to new title |
2613 | | - */ |
2614 | | - //private function moveImage |
2615 | | - |
2616 | | - /** |
2617 | 2599 | * Checks if $this can be moved to a given Title |
2618 | 2600 | * - Selects for update, so don't call it unless you mean business |
2619 | 2601 | * |