aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/items.php')
-rw-r--r--include/items.php13
1 files changed, 10 insertions, 3 deletions
diff --git a/include/items.php b/include/items.php
index 8ca0eeb16..c7738c3ed 100644
--- a/include/items.php
+++ b/include/items.php
@@ -91,6 +91,7 @@ function get_feed_for(&$a, $dfrn_id, $owner_id, $last_update, $direction = 0) {
if(! strlen($last_update))
$last_update = 'now - 30 days';
+
$check_date = datetime_convert('UTC','UTC',$last_update,'Y-m-d H:i:s');
$r = q("SELECT `item`.*, `item`.`id` AS `item_id`,
@@ -109,8 +110,9 @@ function get_feed_for(&$a, $dfrn_id, $owner_id, $last_update, $direction = 0) {
dbesc($check_date),
dbesc($sort)
);
- if(! count($r))
- killme();
+
+ // Will check further below if this actually returned results.
+ // We will provide an empty feed in any case.
$items = $r;
@@ -135,7 +137,12 @@ function get_feed_for(&$a, $dfrn_id, $owner_id, $last_update, $direction = 0) {
'$namdate' => xmlify(datetime_convert('UTC','UTC',$owner['name-date'] . '+00:00' , ATOM_TIME))
));
-
+
+ if(! count($items)) {
+ $atom .= '</feed>' . "\r\n";
+ return $atom;
+ }
+
foreach($items as $item) {
// public feeds get html, our own nodes use bbcode