r29742 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r29741‎ | r29742 | r29743 >
Date:13:57, 14 January 2008
Author:vasilievvv
Status:old
Tags:
Comment:
Revert accidentally commited image moving stuff
Modified paths:
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Title.php
@@ -2289,7 +2289,6 @@
22902290 * @return mixed true on success, message name on failure
22912291 */
22922292 public function isValidMoveOperation( &$nt, $auth = true ) {
2293 - global $wgUser;
22942293 if( !$this or !$nt ) {
22952294 return 'badtitletext';
22962295 }
@@ -2314,8 +2313,7 @@
23152314
23162315 if ( $auth && (
23172316 !$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' ) ) ) {
23202318 return 'protectedpage';
23212319 }
23222320
@@ -2358,17 +2356,6 @@
23592357 return $err;
23602358 }
23612359
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 -
23732360 $pageid = $this->getArticleID();
23742361 if( $nt->exists() ) {
23752362 $this->moveOverExistingRedirect( $nt, $reason, $createRedirect );
@@ -2608,11 +2595,6 @@
26092596 }
26102597
26112598 /**
2612 - * Moves image to new title
2613 - */
2614 - //private function moveImage
2615 -
2616 - /**
26172599 * Checks if $this can be moved to a given Title
26182600 * - Selects for update, so don't call it unless you mean business
26192601 *

Status & tagging log