aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-09-10 01:45:58 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-09-10 01:45:58 -0700
commit19661d4c2599c25f8bcf536932e888a27e3663e1 (patch)
treef91b395232619aba7a2ee500f1cc621ca32817c5
parent7d5ace644eb49282ba566e15c6c82d8bfc9244aa (diff)
downloadvolse-hubzilla-19661d4c2599c25f8bcf536932e888a27e3663e1.tar.gz
volse-hubzilla-19661d4c2599c25f8bcf536932e888a27e3663e1.tar.bz2
volse-hubzilla-19661d4c2599c25f8bcf536932e888a27e3663e1.zip
reverse sort order for public feeds
-rw-r--r--include/items.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/items.php b/include/items.php
index f11293e4a..dbe6493d4 100644
--- a/include/items.php
+++ b/include/items.php
@@ -66,6 +66,11 @@ function get_feed_for(&$a, $dfrn_id, $owner_id, $last_update) {
);
}
+ if($dfrn_id == '' || $dfrn_id == '*')
+ $sort = 'DESC';
+ else
+ $sort = 'ASC';
+
if(! strlen($last_update))
$last_update = 'now - 30 days';
$check_date = datetime_convert('UTC','UTC',$last_update,'Y-m-d H:i:s');
@@ -80,10 +85,11 @@ function get_feed_for(&$a, $dfrn_id, $owner_id, $last_update) {
AND NOT `item`.`type` IN ( 'remote', 'net-comment' ) AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
AND ( `item`.`edited` > '%s' OR `item`.`changed` > '%s' )
$sql_extra
- ORDER BY `parent` ASC, `created` ASC LIMIT 0, 300",
+ ORDER BY `parent` %s, `created` ASC LIMIT 0, 300",
intval($owner_id),
dbesc($check_date),
- dbesc($check_date)
+ dbesc($check_date),
+ dbesc($sort)
);
if(! count($r))
killme();