put SpecialMovepageAfterMove hook after success message output
authoraude <aude.wiki@gmail.com>
Wed, 7 Nov 2012 12:56:54 +0000 (12:56 +0000)
committeraude <aude.wiki@gmail.com>
Wed, 7 Nov 2012 12:56:54 +0000 (12:56 +0000)
- this doesn't change behaviour of the hook (e.g. as used in PageTriage and other places),
while allowing extra output to be added to special page by extensions upon page move success.

Change-Id: I6dea0d2bc068561874b471e916e55397a157ffb0

includes/specials/SpecialMovepage.php

index af3dbf3..ce2633f 100644 (file)
@@ -464,8 +464,6 @@ class MovePageForm extends UnlistedSpecialPage {
                        DoubleRedirectJob::fixRedirects( 'move', $ot, $nt );
                }
 
-               wfRunHooks( 'SpecialMovepageAfterMove', array( &$this, &$ot, &$nt ) );
-
                $out = $this->getOutput();
                $out->setPageTitle( $this->msg( 'pagemovedsub' ) );
 
@@ -484,6 +482,8 @@ class MovePageForm extends UnlistedSpecialPage {
                        $newLink )->params( $oldText, $newText )->parseAsBlock() );
                $out->addWikiMsg( $msgName );
 
+               wfRunHooks( 'SpecialMovepageAfterMove', array( &$this, &$ot, &$nt ) );
+
                # Now we move extra pages we've been asked to move: subpages and talk
                # pages.  First, if the old page or the new page is a talk page, we
                # can't move any talk pages: cancel that.