* (bug 16858) Revamped list=deletedrevs to make listing deleted contributions
and listing all deleted pages possible
* (bug 16844) Added clcategories parameter to prop=categories
+* (bug 15261, 16262) API no longer outputs invalid UTF-8
=== Languages updated in 1.15 ===
* Print results using the current printer
*/
protected function printResult($isError) {
+ $this->getResult()->cleanupUTF8();
$printer = $this->mPrinter;
$printer->profileIn();
ApiResult :: setElement($data, $name, $value); // Add named element
}
+ /**
+ * Ensure all values in this result are valid UTF-8.
+ */
+ public function cleanUpUTF8()
+ {
+ $data = & $this->getData();
+ array_walk_recursive($data, array('UtfNormal', 'cleanUp'));
+ }
+
public function execute() {
ApiBase :: dieDebug(__METHOD__, 'execute() is not supported on Result object');
}