Revision: 43617
Author: brion
Date: 2008-11-17 18:13:11 +0000 (Mon, 17 Nov 2008)
Log Message:
-----------
* API siteinfo query no longer throws an exception for empty sifilter parameter.
The parameter is defined as being one of two values ('local' or '!local'), but
comes back as array() if it was specified but empty... which then got
overly-strictly checked against 'false', which was used internally for the case
where it's unspecified, and an exception thrown internally.
Now the filter parameter is nicely ignored whether it's unspecified or
specified as empty, which is good clear behavior.
As before, other values return a standard API error about invalid values being
passed.
Modified Paths:
--------------
trunk/phase3/RELEASE-NOTES
trunk/phase3/includes/api/ApiQuerySiteinfo.php
Modified: trunk/phase3/RELEASE-NOTES
===================================================================
--- trunk/phase3/RELEASE-NOTES 2008-11-17 18:08:48 UTC (rev 43616)
+++ trunk/phase3/RELEASE-NOTES 2008-11-17 18:13:11 UTC (rev 43617)
@@ -343,6 +343,7 @@
path naming (/thumbs/hash/file), retired 'apiThumbCacheDir' as a result.
* (bug 5530) Consistency between character encoding in {{PAGENAMEE}},
{{SUBPAGENAMEE}} and {{FULLPAGENAMEE}}
+* API siteinfo query no longer throws an exception for empty sifilter
parameter.
=== API changes in 1.14 ===
Modified: trunk/phase3/includes/api/ApiQuerySiteinfo.php
===================================================================
--- trunk/phase3/includes/api/ApiQuerySiteinfo.php 2008-11-17 18:08:48 UTC
(rev 43616)
+++ trunk/phase3/includes/api/ApiQuerySiteinfo.php 2008-11-17 18:13:11 UTC
(rev 43617)
@@ -194,7 +194,7 @@
$this->addWhere( 'iw_local = 1' );
elseif( $filter === '!local' )
$this->addWhere( 'iw_local = 0' );
- elseif( $filter !== false )
+ elseif( $filter )
ApiBase :: dieDebug( __METHOD__, "Unknown
filter=$filter" );
$this->addOption( 'ORDER BY', 'iw_prefix' );
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs