API: Expose wfIsBadImage() in prop=imageinfo
authorKunal Mehta <legoktm@member.fsf.org>
Sun, 16 Oct 2016 20:18:05 +0000 (13:18 -0700)
committerKunal Mehta <legoktm@member.fsf.org>
Wed, 14 Dec 2016 08:29:32 +0000 (00:29 -0800)
commit3413839cb802999ba47a03f93557d1862e6de4c4
tree2ca2fe7a2f7c16c2652251adb7994fb1401c100c
parentebc1345990182e6eba6a95a8d2c43dc32ab41ad0
API: Expose wfIsBadImage() in prop=imageinfo

If iiprop=badfile is set, expose the wfIsBadImage() status as a boolean.
This is mainly intended for use by Parsoid, but could be useful for
other API users too. The context title can be set by using the
badfilecontextitle parameter.

Also be a little more paranoid and make sure wfIsBadImage() always
returns a boolean.

Bug: T148343
Change-Id: I3432ead92b8d2a17de5243285f2760fc39b501ae
includes/GlobalFunctions.php
includes/api/ApiQueryImageInfo.php
includes/api/i18n/en.json
includes/api/i18n/qqq.json