diff options
Diffstat (limited to 'modules/comment/controllers/comments.php')
-rw-r--r-- | modules/comment/controllers/comments.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/comment/controllers/comments.php b/modules/comment/controllers/comments.php index fcef1832..e19a2ec1 100644 --- a/modules/comment/controllers/comments.php +++ b/modules/comment/controllers/comments.php @@ -30,7 +30,7 @@ class Comments_Controller extends REST_Controller { $comments = ORM::factory("comment") ->where("item_id", $item->id) - ->where("published", 1) + ->where("state", "published") ->orderby("created", "desc") ->find_all(); @@ -68,7 +68,8 @@ class Comments_Controller extends REST_Controller { print json_encode( array("result" => "success", - "resource" => $comment->published ? url::site("comments/{$comment->id}") : NULL, + "resource" => $comment->state == "published" ? url::site("comments/{$comment->id}") : + NULL, "form" => comment::get_add_form($item)->__toString())); } else { print json_encode( |