From c29b5243ab8f255c3ded4785551e9cd0f29cabd7 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Sun, 21 Dec 2008 08:49:45 +0000 Subject: [PATCH] Improve markpatrolled hook --- 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 c9daed90fe..41f5587c0b 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -897,7 +897,7 @@ $variableIDs: array of strings of Skin::makeVariablesScript 'MarkPatrolled': before an edit is marked patrolled -$rcid: ID of the revision to be marked patrolled +$rc: RecentChange object 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 010770cc43..ff4624fc76 100644 --- a/includes/RecentChange.php +++ b/includes/RecentChange.php @@ -268,7 +268,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->getAttribute('rc_id'), &$wgUser, false)) ) { + if( !wfRunHooks('MarkPatrolled', array($this, &$wgUser, false)) ) { $errors[] = array('hookaborted'); } // Users without the 'autopatrol' right can't patrol their -- 2.20.1