summaryrefslogtreecommitdiff
path: root/actions/sup.php
diff options
context:
space:
mode:
authorJames Walker <walkah@walkah.net>2010-02-22 01:40:03 -0500
committerJames Walker <walkah@walkah.net>2010-02-22 01:40:03 -0500
commit7b2ea7aa224c64cb0e44d4d445e07631a4cfeae3 (patch)
treeadc502f1982cd16ab8e4798e989a2f4f2675c8a7 /actions/sup.php
parenteffa4f5d1efffcb52d4a95562e0b4831f7bd3435 (diff)
parent17ed30dffc1c05259baf2f0387089547e39684d7 (diff)
Merge remote branch 'statusnet/testing' into testing
Diffstat (limited to 'actions/sup.php')
-rw-r--r--actions/sup.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/actions/sup.php b/actions/sup.php
index 5daf0a1c1..4e428dfa5 100644
--- a/actions/sup.php
+++ b/actions/sup.php
@@ -66,10 +66,12 @@ class SupAction extends Action
$divider = common_sql_date(time() - $seconds);
$notice->query('SELECT profile_id, max(id) AS max_id ' .
- 'FROM notice ' .
+ 'FROM ( ' .
+ 'SELECT profile_id, id FROM notice ' .
((common_config('db','type') == 'pgsql') ?
'WHERE extract(epoch from created) > (extract(epoch from now()) - ' . $seconds . ') ' :
'WHERE created > "'.$divider.'" ' ) .
+ ') AS latest ' .
'GROUP BY profile_id');
$updates = array();