aboutsummaryrefslogtreecommitdiffstats
path: root/mod/poco.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-10-27 01:54:52 -0700
committerFriendika <info@friendika.com>2011-10-27 01:54:52 -0700
commitabe96155b42f0f824d05d08126d0ced0d3c5ab38 (patch)
tree895905f32e79c1a46e7f124b667458ea4d02dc14 /mod/poco.php
parent31502207bd8361a5fa27cb10ea037e4cca5a5678 (diff)
downloadvolse-hubzilla-abe96155b42f0f824d05d08126d0ced0d3c5ab38.tar.gz
volse-hubzilla-abe96155b42f0f824d05d08126d0ced0d3c5ab38.tar.bz2
volse-hubzilla-abe96155b42f0f824d05d08126d0ced0d3c5ab38.zip
hmmm - why won't poco xml work
Diffstat (limited to 'mod/poco.php')
-rw-r--r--mod/poco.php14
1 files changed, 6 insertions, 8 deletions
diff --git a/mod/poco.php b/mod/poco.php
index d0e32816e..c354be863 100644
--- a/mod/poco.php
+++ b/mod/poco.php
@@ -1,6 +1,5 @@
<?php
-
function poco_init(&$a) {
if($a->argc > 1) {
@@ -67,9 +66,9 @@ function poco_init(&$a) {
if(x($_GET,'updatedSince'))
$ret['updateSince'] = 'false';
- $ret['startIndex'] = $startIndex;
- $ret['itemsPerPage'] = $itemsPerPage;
- $ret['totalResults'] = $totalResults;
+ $ret['startIndex'] = (string) $startIndex;
+ $ret['itemsPerPage'] = (string) $itemsPerPage;
+ $ret['totalResults'] = (string) $totalResults;
$ret['entry'] = array();
@@ -82,8 +81,8 @@ function poco_init(&$a) {
);
if((! x($_GET,'fields')) || ($_GET['fields'] === '@all'))
- foreach($fields_ret as $f)
- $f = true;
+ foreach($fields_ret as $k => $v)
+ $fields_ret[$k] = true;
else {
$fields_req = explode(',',$_GET['fields']);
foreach($fields_req as $f)
@@ -115,9 +114,8 @@ function poco_init(&$a) {
if($format === 'xml') {
header('Content-type: text/xml');
- echo replace_macros(get_markup_template('poco.xml',array('response' => $ret)));
+ echo replace_macros(get_markup_template('poco_xml.tpl',array_xmlify(array('$response' => $ret))));
http_status_exit(500);
-
}
if($format === 'json') {
header('Content-type: application/json');