API: Go back to using the good old str_replace() hacks rather than Title methods...
[lhc/web/wiklou.git] / includes / api / ApiMove.php
index 818f205..a3801bf 100644 (file)
@@ -80,12 +80,13 @@ class ApiMove extends ApiBase {
                        $this->dieUsageMsg(current($errors));
 
                $hookErr = null;
-               if( !wfRunHooks( 'AbortMove', array( $fromTitle, $toTitle, $wgUser, &$hookErr ) ) )
-                       $this->dieUsageMsg(array('hookaborted', $hookErr));
 
                $retval = $fromTitle->moveTo($toTitle, true, $params['reason'], !$params['noredirect']);
                if($retval !== true)
-                       $this->dieUsageMsg(array($retval));
+               {
+                       # FIXME: Title::moveTo() sometimes returns a string
+                       $this->dieUsageMsg(reset($retval));
+               }
 
                $r = array('from' => $fromTitle->getPrefixedText(), 'to' => $toTitle->getPrefixedText(), 'reason' => $params['reason']);
                if(!$params['noredirect'] || !$wgUser->isAllowed('suppressredirect'))
@@ -121,10 +122,6 @@ class ApiMove extends ApiBase {
                        $wgUser->removeWatch($toTitle);
                }
                $this->getResult()->addValue(null, $this->getModuleName(), $r);
-               
-               // This one is a problem as we don't have a special page, but some
-               // extensions may want to do something when the hook has succeeded.
-               //wfRunHooks( 'SpecialMovepageAfterMove', array( &$this , &$ot , &$nt ) )       ;
        }
 
        public function mustBePosted() { return true; }