summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-02-21 18:56:41 -0800
committerBrion Vibber <brion@pobox.com>2010-02-21 18:56:41 -0800
commit3c61f45de1226b22eeb83bd1f6db01984f953737 (patch)
treeffb7bf7cb134b5072a409bd10331eacfb11dd44b /actions
parentd3996996e483bc8ee1b4c9a38bc3ad17baabb8c0 (diff)
parentf6ebe815382a61574df5f9452ee9a0ea4ae38f0c (diff)
Merge branch 'master' of gitorious.org:statusnet/mainline into testing
Diffstat (limited to 'actions')
-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();