http://www.mediawiki.org/wiki/Special:Code/MediaWiki/58419

Revision: 58419
Author:   catrope
Date:     2009-11-02 08:29:26 +0000 (Mon, 02 Nov 2009)

Log Message:
-----------
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.

Modified Paths:
--------------
    trunk/phase3/includes/api/ApiQueryLogEvents.php
    trunk/phase3/includes/api/ApiQueryRecentChanges.php
    trunk/phase3/includes/api/ApiQueryRevisions.php

Modified: trunk/phase3/includes/api/ApiQueryLogEvents.php
===================================================================
--- trunk/phase3/includes/api/ApiQueryLogEvents.php     2009-11-02 04:08:47 UTC 
(rev 58418)
+++ trunk/phase3/includes/api/ApiQueryLogEvents.php     2009-11-02 08:29:26 UTC 
(rev 58419)
@@ -309,6 +309,7 @@
                        ),
                        'user' => null,
                        'title' => null,
+                       'tag' => null,
                        'limit' => array (
                                ApiBase :: PARAM_DFLT => 10,
                                ApiBase :: PARAM_TYPE => 'limit',
@@ -329,6 +330,7 @@
                        '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.',
                );
        }
 

Modified: trunk/phase3/includes/api/ApiQueryRecentChanges.php
===================================================================
--- trunk/phase3/includes/api/ApiQueryRecentChanges.php 2009-11-02 04:08:47 UTC 
(rev 58418)
+++ trunk/phase3/includes/api/ApiQueryRecentChanges.php 2009-11-02 08:29:26 UTC 
(rev 58419)
@@ -425,6 +425,7 @@
                        'excludeuser' => array(
                                ApiBase :: PARAM_TYPE => 'user'
                        ),
+                       'tag' => null,
                        'prop' => array (
                                ApiBase :: PARAM_ISMULTI => true,
                                ApiBase :: PARAM_DFLT => 'title|timestamp|ids',
@@ -495,6 +496,7 @@
                        ),
                        'type' => 'Which types of changes to show.',
                        'limit' => 'How many total changes to return.'
+                       'tag' => 'Only list changes tagged with this tag.',
                );
        }
 

Modified: trunk/phase3/includes/api/ApiQueryRevisions.php
===================================================================
--- trunk/phase3/includes/api/ApiQueryRevisions.php     2009-11-02 04:08:47 UTC 
(rev 58418)
+++ trunk/phase3/includes/api/ApiQueryRevisions.php     2009-11-02 08:29:26 UTC 
(rev 58419)
@@ -149,7 +149,7 @@
                        $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 @@
                        'excludeuser' => array(
                                ApiBase :: PARAM_TYPE => 'user'
                        ),
+                       'tag' => null,
                        'expandtemplates' => false,
                        'generatexml' => false,
                        'section' => null,
@@ -514,6 +515,7 @@
                        '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',
                );
        }
 



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to