summaryrefslogtreecommitdiff
path: root/modules/comment/helpers
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2008-11-20 17:51:12 +0000
committerTim Almdal <tnalmdal@shaw.ca>2008-11-20 17:51:12 +0000
commit8c06908f7f4e0bf6d55d4f6e2ee2c062b2f8190e (patch)
treed2f1fd0eb5d8fe9ab3356b7587b6be6118a5e2e3 /modules/comment/helpers
parentb78cee63950479abfa78df37a03388007f332543 (diff)
Use rest::http_content_type() instead of the header() method to set response content
Diffstat (limited to 'modules/comment/helpers')
-rw-r--r--modules/comment/helpers/comment.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/comment/helpers/comment.php b/modules/comment/helpers/comment.php
index 2d25df3f..8462159b 100644
--- a/modules/comment/helpers/comment.php
+++ b/modules/comment/helpers/comment.php
@@ -118,12 +118,12 @@ class Comment_Core {
switch (rest::output_format()) {
case "xml":
- header("Content-Type: application/xml");
+ rest::http_content_type(rest::XML);
return xml::to_xml($comments, array("comments", "comment"));
break;
case "json":
- header("Content-Type: application/json");
+ rest::http_content_type(rest::JSON);
foreach ($comments as $comment) {
$data[] = $comment->as_array();
}