Last modified: 2014-01-30 18:55:50 UTC
When using action=query&meta=filerepoinfo the boolean attributes like local, fetchDescription or initialCapital does not follow the api rules for boolean. Api rules for boolean in xml is a existing attribute for true and no attribute for false, but in this module a value of 1 is true and nothing is false, which can be missleading. For json all looks okay, because the true/false is reported as is and not formatted to a string representing value like on xml.
If only it weren't for backwards compatibility, it'd be nice to actually return booleans as booleans everywhere in the non-XML formats rather than the silly present-with-falsey-value/absent that comes legacy from the XML format.
Yah, but mixed style is also bad, and when the one false looks like the other true, that is very bad. That sounds like a idea for version 2.
Change 108315 had a related patch set uploaded by Umherirrender: treat true as empty string, skip false in xml format https://gerrit.wikimedia.org/r/108315
Change 108315 merged by jenkins-bot: treat true as empty string, skip false in xml format https://gerrit.wikimedia.org/r/108315
successfully merged, the xml format will now adjust the output for booleans, so trues are now empty strings and false skipped. This allows using booleans for the other formats, which can make code path a bit easier (in the future), because no extra ifs are needed to add empty strings to the output, instead you can use the condition as is.