Fix the way we dump out comment in _show().

This commit is contained in:
Bharat Mediratta
2008-12-25 01:06:37 +00:00
parent cdcd8bf377
commit 7a9d4a2224
+1 -1
View File
@@ -86,7 +86,7 @@ class Comments_Controller extends REST_Controller {
*/
public function _show($comment) {
if (rest::output_format() == "json") {
print json_encode(array("result" => "success", "data" => $comment));
print json_encode(array("result" => "success", "data" => $comment->as_array()));
} else {
$view = new View("comment.html");
$view->comment = $comment;