MediaWiki master
PatrolLog.php
Go to the documentation of this file.
1<?php
11namespace MediaWiki\Logging;
12
16
23class PatrolLog {
24
40 public static function record( $rc, $auto, UserIdentity $user, $tags = null ) {
41 wfDeprecated( __METHOD__, '1.47' );
42 // Do not log autopatrol actions: T184485
43 if ( $auto ) {
44 return false;
45 }
46
48 if ( !$rc instanceof RecentChange ) {
49 $services->getRecentChangeLookup()->getRecentChangeById( $rc );
50 if ( !$rc ) {
51 return false;
52 }
53 }
54
55 $services->getPatrolManager()->createPatrolLog( $rc, $user, $tags );
56
57 return true;
58 }
59}
60
62class_alias( PatrolLog::class, 'PatrolLog' );
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Logs a warning that a deprecated feature was used.
Class containing static functions for working with logs of patrol events.
Definition PatrolLog.php:23
static record( $rc, $auto, UserIdentity $user, $tags=null)
Record a log event for a change being patrolled.
Definition PatrolLog.php:40
Service locator for MediaWiki core services.
static getInstance()
Returns the global default instance of the top level service locator.
Utility class for creating and reading rows in the recentchanges table.
Interface for objects representing user identity.