r48976 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48975‎ | r48976 | r48977 >
Date:00:12, 29 March 2009
Author:mrzman
Status:ok
Tags:
Comment:
add option to search by filter ID to be consistent with UI, and change param descriptions to be less ambiguous
Modified paths:
  • /trunk/extensions/AbuseFilter/ApiQueryAbuseLog.php (modified) (history)

Diff [purge]

Index: trunk/extensions/AbuseFilter/ApiQueryAbuseLog.php
@@ -79,6 +79,7 @@
8080 $this->addWhereRange('afl_timestamp', $params['dir'], $params['start'], $params['end']);
8181
8282 $this->addWhereIf( array('afl_user_text' => $params['user']), isset($params['user']));
 83+ $this->addWhereIf( array('afl_filter' => $params['filter']), isset($params['filter']));
8384
8485 $title = $params['title'];
8586 if (!is_null($title)) {
@@ -150,6 +151,7 @@
151152 ),
152153 'user' => null,
153154 'title' => null,
 155+ 'filter' => null,
154156 'limit' => array(
155157 ApiBase :: PARAM_DFLT => 10,
156158 ApiBase :: PARAM_TYPE => 'limit',
@@ -179,8 +181,9 @@
180182 'start' => 'The timestamp to start enumerating from',
181183 'end' => 'The timestamp to stop enumerating at',
182184 'dir' => 'The direction in which to enumerate',
183 - 'title' => 'Filter entries to those occurring on a given page.',
184 - 'user' => 'Filter entries to those done by a given user or IP address.',
 185+ 'title' => 'Show only entries occurring on a given page.',
 186+ 'user' => 'Show only entries done by a given user or IP address.',
 187+ 'filter' => 'Show only entries that were caught by a given filter ID',
185188 'limit' => 'The maximum amount of entries to list',
186189 'prop' => 'Which properties to get',
187190 );

Status & tagging log