From d14d312d0699677a00c71e38b9d3ce26d6629597 Mon Sep 17 00:00:00 2001 From: Jozef Selesi Date: Sun, 23 Nov 2008 00:24:56 +0000 Subject: * 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. --- modules/comment/controllers/comments.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/comment/controllers/comments.php') 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: -- cgit v1.2.3