summaryrefslogtreecommitdiff
path: root/modules/comment/controllers/comments.php
diff options
context:
space:
mode:
authorJozef Selesi <jozefs@users.sourceforge.net>2008-11-23 00:24:56 +0000
committerJozef Selesi <jozefs@users.sourceforge.net>2008-11-23 00:24:56 +0000
commitd14d312d0699677a00c71e38b9d3ce26d6629597 (patch)
tree088bb2333e878b96ab4d17cc959440189a118d90 /modules/comment/controllers/comments.php
parentd93d37a10c289d9ffe99e765c45f47209686c893 (diff)
* Individual comment views now output valid Atom 1.0 entries:
http://example.gallery.com/index.php/comments/{comment_id}?_format=atom * Changed Content-Type of Atom feeds and entries to XML for easier debugging. * Added an Atom helper class with some common functions and cleaned up entry and feed generation code a bit in the comment helper. * Style fixes.
Diffstat (limited to 'modules/comment/controllers/comments.php')
-rw-r--r--modules/comment/controllers/comments.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/comment/controllers/comments.php b/modules/comment/controllers/comments.php
index 3838f7f0..989ad177 100644
--- a/modules/comment/controllers/comments.php
+++ b/modules/comment/controllers/comments.php
@@ -62,8 +62,7 @@ class Comments_Controller extends REST_Controller {
* @see Rest_Controller::_show($resource)
*/
public function _show($comment) {
- $output_format = rest::output_format();
- switch ($output_format) {
+ switch (rest::output_format()) {
case "xml":
rest::http_content_type(rest::XML);
print xml::to_xml($comment->as_array(), array("comment"));
@@ -75,7 +74,8 @@ class Comments_Controller extends REST_Controller {
break;
case "atom":
- rest::http_content_type(rest::ATOM);
+ rest::http_content_type(rest::XML);
+ print comment::get_atom_entry($comment);
break;
default: