From 3e69f5237d74605ca23eaed7901ad5cd5f66d9fb Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 23 Dec 2008 20:56:19 +0000 Subject: [PATCH] Revert r44867 "Improve markpatrolled hook" Incompatible change to existing hook (changing types of parameters passed) --- docs/hooks.txt | 2 +- includes/RecentChange.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/hooks.txt b/docs/hooks.txt index 7b57de4c7b..fa3c011fb6 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -891,7 +891,7 @@ $variableIDs: array of strings of Skin::makeVariablesScript 'MarkPatrolled': before an edit is marked patrolled -$rc: RecentChange object of the revision to be marked patrolled +$rcid: ID of the revision to be marked patrolled $user: the user (object) marking the revision as patrolled $wcOnlySysopsCanPatrol: config setting indicating whether the user needs to be a sysop in order to mark an edit patrolled diff --git a/includes/RecentChange.php b/includes/RecentChange.php index 1536dc6d63..f03fbcbb0b 100644 --- a/includes/RecentChange.php +++ b/includes/RecentChange.php @@ -270,7 +270,7 @@ class RecentChange // Automatic patrol needs "autopatrol", ordinary patrol needs "patrol" $right = $auto ? 'autopatrol' : 'patrol'; $errors = array_merge( $errors, $this->getTitle()->getUserPermissionsErrors( $right, $wgUser ) ); - if( !wfRunHooks('MarkPatrolled', array($this, &$wgUser, false)) ) { + if( !wfRunHooks('MarkPatrolled', array($this->getAttribute('rc_id'), &$wgUser, false)) ) { $errors[] = array('hookaborted'); } // Users without the 'autopatrol' right can't patrol their -- 2.20.1