Include the reason when firing the TitleMoveComplete hook
authorSam Smith <git@samsmith.io>
Mon, 17 Feb 2014 13:02:54 +0000 (13:02 +0000)
committerSam Smith <git@samsmith.io>
Mon, 17 Feb 2014 14:30:15 +0000 (14:30 +0000)
As with the ArticleDeletionComplete hook, include the reason for
moving the title (article) when firing the TitleMoveComplete hook.

See I98703f99a47d5786b7a567df954ba09f6d8862ff for a supporting use
case.

Change-Id: I875446dddacff7e5a52a0b6e577e6a46a9ae2e6f

docs/hooks.txt
includes/Title.php

index 627fcab..9268f83 100644 (file)
@@ -2539,6 +2539,7 @@ $nt: new title
 $user: user who did the move
 $pageid: database ID of the page that's been moved
 $redirid: database ID of the created redirect
+$reason: reason for the move
 
 'TitleReadWhitelist': Called at the end of read permissions checks, just before
 adding the default error message if nothing allows the user to read the page. If
index ab79d6d..e6960ad 100644 (file)
@@ -3904,7 +3904,7 @@ class Title {
 
                $dbw->commit( __METHOD__ );
 
-               wfRunHooks( 'TitleMoveComplete', array( &$this, &$nt, &$wgUser, $pageid, $redirid ) );
+               wfRunHooks( 'TitleMoveComplete', array( &$this, &$nt, &$wgUser, $pageid, $redirid, $reason ) );
                return true;
        }