Redo r58410, r58411 (attempts to to fix r58399) properly: isset vs. !is_null wasn...
authorRoan Kattouw <catrope@users.mediawiki.org>
Mon, 2 Nov 2009 08:29:26 +0000 (08:29 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Mon, 2 Nov 2009 08:29:26 +0000 (08:29 +0000)
includes/api/ApiQueryLogEvents.php
includes/api/ApiQueryRecentChanges.php
includes/api/ApiQueryRevisions.php

index 3f83bdc..3579074 100644 (file)
@@ -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.',
                );
        }
 
index 8e0ad4e..0d5d5db 100644 (file)
@@ -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.',
                );
        }
 
index d862389..e705cea 100644 (file)
@@ -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',
                );
        }