summaryrefslogtreecommitdiff
path: root/actions/sup.php
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2010-02-22 01:23:24 -0800
committerZach Copley <zach@status.net>2010-02-22 01:23:24 -0800
commit35be39e30eacda1b0425a2ae9f8e58cd0867d157 (patch)
treedf86f17a666e5d0bb775dbcef0fc4eb5b1c777f3 /actions/sup.php
parent47300a2ae9a51108fbf59a57cf5ab6e8867b54a6 (diff)
parent17ed30dffc1c05259baf2f0387089547e39684d7 (diff)
Merge branch 'testing' of git@gitorious.org:statusnet/mainline 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();