jenkins-bot has submitted this change and it was merged.

Change subject: Fixes for title move hook found in production
......................................................................


Fixes for title move hook found in production

- Helps to use the right object
- Remove pointless typehinting for a param we don't even use

Change-Id: Ia54268d8a50d495dc6cb6d917351a989c4adea98
(cherry picked from commit ade806389ff5f9c0fd40c4dad0bc784a9deadfae)
---
M includes/Hooks.php
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Chad: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/Hooks.php b/includes/Hooks.php
index b446623..c50dda9 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -316,13 +316,13 @@
         * @param User $user User who made the move
         * @param int $oldid The page id of the old page.
         */
-       public static function onTitleMoveComplete( Title &$title, Title 
&$newtitle, User &$user, $oldid ) {
+       public static function onTitleMoveComplete( Title &$title, Title 
&$newtitle, &$user, $oldid ) {
                // If the page exists, update it, it's probably a redirect now.
                // If not, it was deleted when moved, so make sure to delete it.
                JobQueueGroup::singleton()->push( $title->exists() ?
                        new LinksUpdateJob( $title, array( 'addedLinks' => 
array(),
                                'removedLinks' => array(), 'prioritize' => true 
) ) :
-                       new DeletePagesJob( $page->getTitle(), array( 'id' => 
$oldid ) )
+                       new DeletePagesJob( $title, array( 'id' => $oldid ) )
                );
 
                return true;

-- 
To view, visit https://gerrit.wikimedia.org/r/132101
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia54268d8a50d495dc6cb6d917351a989c4adea98
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: wmf/1.24wmf3
Gerrit-Owner: Chad <ch...@wikimedia.org>
Gerrit-Reviewer: Chad <ch...@wikimedia.org>
Gerrit-Reviewer: Manybubbles <never...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to