r81572 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81571‎ | r81572 | r81573 >
Date:21:06, 5 February 2011
Author:brion
Status:ok
Tags:
Comment:
Add a @fixme comment on FormatJson::encode(); the '$isHtml' parameter's purpose and function is not documented, but it seems to map to a pretty-printing parameter on Services_JSON(). If that's its purpose, it should be renamed and documented. Since it's a bare boolean parameter with no clear purpose in calls when "true" or "false" is passed bare, it probably also wants a nice legible constant value or two.
Modified paths:
  • /trunk/phase3/includes/json/FormatJson.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/json/FormatJson.php
@@ -16,6 +16,11 @@
1717 *
1818 * @param $value Mixed: the value being encoded. Can be any type except a resource.
1919 * @param $isHtml Boolean
 20+ *
 21+ * @fixme "$isHtml" parameter's purpose is not documented. It appears to
 22+ * map to a parameter labeled "pretty-print output with indents and
 23+ * newlines" in Services_JSON::encode(), which has no string relation
 24+ * to HTML output.
2025 *
2126 * @return string
2227 */

Status & tagging log