mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-07-26 01:34:09 -04:00
* 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.
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user