r44969 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44968‎ | r44969 | r44970 >
Date:20:56, 23 December 2008
Author:brion
Status:ok
Tags:
Comment:
Revert r44867 "Improve markpatrolled hook"
Incompatible change to existing hook (changing types of parameters passed)
Modified paths:
  • /trunk/phase3/docs/hooks.txt (modified) (history)
  • /trunk/phase3/includes/RecentChange.php (modified) (history)

Diff [purge]

Index: trunk/phase3/docs/hooks.txt
@@ -891,7 +891,7 @@
892892 of Skin::makeVariablesScript
893893
894894 'MarkPatrolled': before an edit is marked patrolled
895 -$rc: RecentChange object of the revision to be marked patrolled
 895+$rcid: ID of the revision to be marked patrolled
896896 $user: the user (object) marking the revision as patrolled
897897 $wcOnlySysopsCanPatrol: config setting indicating whether the user
898898 needs to be a sysop in order to mark an edit patrolled
Index: trunk/phase3/includes/RecentChange.php
@@ -270,7 +270,7 @@
271271 // Automatic patrol needs "autopatrol", ordinary patrol needs "patrol"
272272 $right = $auto ? 'autopatrol' : 'patrol';
273273 $errors = array_merge( $errors, $this->getTitle()->getUserPermissionsErrors( $right, $wgUser ) );
274 - if( !wfRunHooks('MarkPatrolled', array($this, &$wgUser, false)) ) {
 274+ if( !wfRunHooks('MarkPatrolled', array($this->getAttribute('rc_id'), &$wgUser, false)) ) {
275275 $errors[] = array('hookaborted');
276276 }
277277 // Users without the 'autopatrol' right can't patrol their

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r44867Improve markpatrolled hookaaron08:49, 21 December 2008

Status & tagging log