From fc92a38146b9bbf96915a8f089d8e22d41ca6748 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Mon, 2 Nov 2009 08:29:26 +0000 Subject: [PATCH] Redo r58410, r58411 (attempts to to fix r58399) properly: isset vs. !is_null wasn't the problem, it's that the 'tag' parameter wasn't in the parameter list. --- includes/api/ApiQueryLogEvents.php | 2 ++ includes/api/ApiQueryRecentChanges.php | 2 ++ includes/api/ApiQueryRevisions.php | 4 +++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/includes/api/ApiQueryLogEvents.php b/includes/api/ApiQueryLogEvents.php index 3f83bdc7d4..357907401e 100644 --- a/includes/api/ApiQueryLogEvents.php +++ b/includes/api/ApiQueryLogEvents.php @@ -309,6 +309,7 @@ class ApiQueryLogEvents extends ApiQueryBase { ), 'user' => null, 'title' => null, + 'tag' => null, 'limit' => array ( ApiBase :: PARAM_DFLT => 10, ApiBase :: PARAM_TYPE => 'limit', @@ -329,6 +330,7 @@ class ApiQueryLogEvents extends ApiQueryBase { 'user' => 'Filter entries to those made by the given user.', 'title' => 'Filter entries to those related to a page.', 'limit' => 'How many total event entries to return.' + 'tag' => 'Only list event entries tagged with this tag.', ); } diff --git a/includes/api/ApiQueryRecentChanges.php b/includes/api/ApiQueryRecentChanges.php index 8e0ad4e86d..0d5d5db95d 100644 --- a/includes/api/ApiQueryRecentChanges.php +++ b/includes/api/ApiQueryRecentChanges.php @@ -425,6 +425,7 @@ class ApiQueryRecentChanges extends ApiQueryBase { 'excludeuser' => array( ApiBase :: PARAM_TYPE => 'user' ), + 'tag' => null, 'prop' => array ( ApiBase :: PARAM_ISMULTI => true, ApiBase :: PARAM_DFLT => 'title|timestamp|ids', @@ -495,6 +496,7 @@ class ApiQueryRecentChanges extends ApiQueryBase { ), 'type' => 'Which types of changes to show.', 'limit' => 'How many total changes to return.' + 'tag' => 'Only list changes tagged with this tag.', ); } diff --git a/includes/api/ApiQueryRevisions.php b/includes/api/ApiQueryRevisions.php index d862389a78..e705cea4b7 100644 --- a/includes/api/ApiQueryRevisions.php +++ b/includes/api/ApiQueryRevisions.php @@ -149,7 +149,7 @@ class ApiQueryRevisions extends ApiQueryBase { $this->addFields('ts_tags'); } - if( isset($params['tag']) ) { + if( !is_null($params['tag']) ) { $this->addTables('change_tag'); $this->addJoinConds(array('change_tag' => array('INNER JOIN', array('rev_id=ct_rev_id')))); $this->addWhereFld('ct_tag' , $params['tag']); @@ -484,6 +484,7 @@ class ApiQueryRevisions extends ApiQueryBase { 'excludeuser' => array( ApiBase :: PARAM_TYPE => 'user' ), + 'tag' => null, 'expandtemplates' => false, 'generatexml' => false, 'section' => null, @@ -514,6 +515,7 @@ class ApiQueryRevisions extends ApiQueryBase { 'continue' => 'When more results are available, use this to continue', 'diffto' => array('Revision ID to diff each revision to.', 'Use "prev", "next" and "cur" for the previous, next and current revision respectively.'), + 'tag' => 'Only list revisions tagged with this tag', ); } -- 2.20.1