Merge "Title::moveToInternal doesn't return anything, but it does throw an exception"
authorAaron Schulz <aschulz@wikimedia.org>
Sat, 19 May 2012 07:55:54 +0000 (07:55 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sat, 19 May 2012 07:55:54 +0000 (07:55 +0000)
includes/Title.php

index cf428f9..807fcc1 100644 (file)
@@ -3489,12 +3489,7 @@ class Title {
                $protected = $this->isProtected();
 
                // Do the actual move
-               $err = $this->moveToInternal( $nt, $reason, $createRedirect );
-               if ( is_array( $err ) ) {
-                       # @todo FIXME: What about the File we have already moved?
-                       $dbw->rollback( __METHOD__ );
-                       return $err;
-               }
+               $this->moveToInternal( $nt, $reason, $createRedirect );
 
                // Refresh the sortkey for this row.  Be careful to avoid resetting
                // cl_timestamp, which may disturb time-based lists on some sites.
@@ -3570,6 +3565,7 @@ class Title {
         * @param $reason String The reason for the move
         * @param $createRedirect Bool Whether to leave a redirect at the old title.  Ignored
         *   if the user doesn't have the suppressredirect right
+        * @throws MWException
         */
        private function moveToInternal( &$nt, $reason = '', $createRedirect = true ) {
                global $wgUser, $wgContLang;