wiki.techinc.nl/includes/changes/Hook/MarkPatrolledHook.php
Matěj Suchánek fa045ecdde Suppress RecentChange::doMarkPatrolled when autopatrol is requested
The result of the method has been inappropriate and
surprising since rc_patrolled was changed to distinguish
between manually patrolled and autopatrolled changes
(T184791).

When called with $auto = true, it would mark the change
as manually patrolled (not autopatrolled), but it would
not log it as such in patrol log and would still require
'autopatrol' right (not 'patrol').

Change-Id: I0bd6f2cf317d2b1c8dd50b7998724a57f5f549fb
2022-12-03 17:16:50 +00:00

30 lines
816 B
PHP

<?php
namespace MediaWiki\Hook;
use User;
/**
* This is a hook handler interface, see docs/Hooks.md.
* Use the hook name "MarkPatrolled" to register handlers implementing this interface.
*
* @stable to implement
* @ingroup Hooks
*/
interface MarkPatrolledHook {
/**
* This hook is called before an edit is marked patrolled.
*
* @since 1.35
*
* @param int $rcid ID of the revision to be marked patrolled
* @param User $user User marking the revision as patrolled
* @param bool $wcOnlySysopsCanPatrol Always false
* @param bool $auto Always false
* @param string[] &$tags Tags to be applied to the patrol log entry
* @return bool|void True or no return value to continue or false to abort
*/
public function onMarkPatrolled( $rcid, $user, $wcOnlySysopsCanPatrol, $auto,
&$tags
);
}