From: Victor Vasiliev Date: Mon, 14 Jan 2008 13:57:40 +0000 (+0000) Subject: Revert accidentally commited image moving stuff X-Git-Tag: 1.31.0-rc.0~50010 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=6c07b63f61b689b48c550a120103365d43f0a635;p=lhc%2Fweb%2Fwiklou.git Revert accidentally commited image moving stuff --- diff --git a/includes/Title.php b/includes/Title.php index 6326d74605..654de11a11 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -2289,7 +2289,6 @@ class Title { * @return mixed true on success, message name on failure */ public function isValidMoveOperation( &$nt, $auth = true ) { - global $wgUser; if( !$this or !$nt ) { return 'badtitletext'; } @@ -2314,8 +2313,7 @@ class Title { if ( $auth && ( !$this->userCan( 'edit' ) || !$nt->userCan( 'edit' ) || - !$this->userCan( 'move' ) || !$nt->userCan( 'move' ) || - $this->getNamespace() == NS_IMAGE && !$wgUser->isAllowed( 'upload' ) ) ) { + !$this->userCan( 'move' ) || !$nt->userCan( 'move' ) ) ) { return 'protectedpage'; } @@ -2358,17 +2356,6 @@ class Title { return $err; } - // If it's existent image, move it as image - if( $this->getNamespace() == NS_IMAGE && $nt->getNamespace() == NS_IMAGE && wfFindFile( $this ) ) { - $oldfile = wfFindFile( $this ); - $newfile = wfFindFile( $nt ); - var_dump( array( $oldfile, $newfile ) ); - if( $newfile ) { - return 'articleexists'; - } - return 'a'; - } - $pageid = $this->getArticleID(); if( $nt->exists() ) { $this->moveOverExistingRedirect( $nt, $reason, $createRedirect ); @@ -2607,11 +2594,6 @@ class Title { $this->purgeSquid(); } - /** - * Moves image to new title - */ - //private function moveImage - /** * Checks if $this can be moved to a given Title * - Selects for update, so don't call it unless you mean business