From: Sam Smith Date: Mon, 17 Feb 2014 13:02:54 +0000 (+0000) Subject: Include the reason when firing the TitleMoveComplete hook X-Git-Tag: 1.31.0-rc.0~16888^2 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=6f1061562efb8cf4122318529513e23bec8795ef;p=lhc%2Fweb%2Fwiklou.git Include the reason when firing the TitleMoveComplete hook 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 --- diff --git a/docs/hooks.txt b/docs/hooks.txt index 627fcab124..9268f83be5 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -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 diff --git a/includes/Title.php b/includes/Title.php index ab79d6dd2b..e6960adee4 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -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; }