A distinct log action is provided for automatic patrols.
The old 'auto' param is preserved so that old log entries can still
be correctly identified in logs and API queries.
With I6a61175f9a111c03d15b4d41751c818e3a411ff6, this enables us to
filter new manual patrol entries in logs.
Old automatic entries will be in the wrong list, but still marked
as automatic.
Bug: T27799
Change-Id: I05d962fa3ec45039122bb7e370b7e3fb8bbaa3c8
'move/move' => 'MoveLogFormatter',
'move/move_redir' => 'MoveLogFormatter',
'patrol/patrol' => 'PatrolLogFormatter',
+ 'patrol/autopatrol' => 'PatrolLogFormatter',
'protect/modify' => 'ProtectLogFormatter',
'protect/move_prot' => 'ProtectLogFormatter',
'protect/protect' => 'ProtectLogFormatter',
'event' => [ 'event' ],
'revision' => [ 'revision' ],
],
+ 'patrol' => [
+ 'patrol' => [ 'patrol' ],
+ 'autopatrol' => [ 'autopatrol' ],
+ ],
'protect' => [
'protect' => [ 'protect' ],
'modify' => [ 'modify' ],
$user = $wgUser;
}
- $entry = new ManualLogEntry( 'patrol', 'patrol' );
+ $action = $auto ? 'autopatrol' : 'patrol';
+
+ $entry = new ManualLogEntry( 'patrol', $action );
$entry->setTarget( $rc->getTitle() );
$entry->setParameters( self::buildParams( $rc, $auto ) );
$entry->setPerformer( $user );
*/
class PatrolLogFormatter extends LogFormatter {
protected function getMessageKey() {
- $key = parent::getMessageKey();
$params = $this->getMessageParameters();
if ( isset( $params[5] ) && $params[5] ) {
- // Messages: logentry-patrol-patrol-auto
- $key .= '-auto';
+ $key = 'logentry-patrol-patrol-auto';
+ } else {
+ $key = 'logentry-patrol-patrol';
}
return $key;
"randomrootpage": "Random root page",
"log-action-filter-block": "Type of block:",
"log-action-filter-delete": "Type of deletion:",
+ "log-action-filter-patrol": "Type of patrol:",
"log-action-filter-protect": "Type of protection:",
"log-action-filter-upload": "Type of upload:",
"log-action-filter-all": "All",
"log-action-filter-delete-restore": "Page undeletion",
"log-action-filter-delete-event": "Log deletion",
"log-action-filter-delete-revision": "Revision deletion",
+ "log-action-filter-patrol-patrol": "Manual patrol",
+ "log-action-filter-patrol-autopatrol": "Automatic patrol",
"log-action-filter-protect-protect": "Protection",
"log-action-filter-protect-modify": "Protection modification",
"log-action-filter-protect-unprotect": "Unprotection",
"randomrootpage": "{{doc-special|RandomRootPage}}",
"log-action-filter-block": "Which type of action to filter for in this log",
"log-action-filter-delete": "Which type of action to filter for in this log",
+ "log-action-filter-patrol": "Which type of action to filter for in this log",
"log-action-filter-protect": "Which type of action to filter for in this log",
"log-action-filter-upload": "Which type of action to filter for in this log",
"log-action-filter-all": "All types of action are allowed",
"log-action-filter-delete-restore": "Action to filter for in this log",
"log-action-filter-delete-event": "Action to filter for in this log",
"log-action-filter-delete-revision": "Action to filter for in this log",
+ "log-action-filter-patrol-patrol": "Action to filter for in this log",
+ "log-action-filter-patrol-autopatrol": "Action to filter for in this log",
"log-action-filter-protect-protect": "Action to filter for in this log",
"log-action-filter-protect-modify": "Action to filter for in this log",
"log-action-filter-protect-unprotect": "Action to filter for in this log",