summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/comment/controllers/comments.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/modules/comment/controllers/comments.php b/modules/comment/controllers/comments.php
index 8c3f8428..2f5c902f 100644
--- a/modules/comment/controllers/comments.php
+++ b/modules/comment/controllers/comments.php
@@ -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", "resource" => $comment));
+ print json_encode(array("result" => "success", "data" => $comment));
} else {
$view = new View("comment.html");
$view->comment = $comment;
@@ -116,7 +116,7 @@ class Comments_Controller extends REST_Controller {
} else {
print json_encode(
array("result" => "error",
- "html" => $form));
+ "html" => $form->__toString()));
}
}
@@ -128,8 +128,7 @@ class Comments_Controller extends REST_Controller {
rest::http_content_type(rest::JSON);
$comment->delete();
- print json_encode(
- array("result" => "success"));
+ print json_encode(array("result" => "success"));
}
/**