summaryrefslogtreecommitdiff
path: root/actions/sup.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/sup.php')
-rw-r--r--actions/sup.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/actions/sup.php b/actions/sup.php
index f4b1cda23..246b3299d 100644
--- a/actions/sup.php
+++ b/actions/sup.php
@@ -45,7 +45,7 @@ class SupAction extends Action
function availablePeriods()
{
static $periods = array(86400, 43200, 21600, 7200,
- 3600, 1800, 600, 300, 120,
+ 3600, 1800, 600, 300, 120,
60, 30, 15);
$available = array();
foreach ($periods as $period) {
@@ -65,7 +65,9 @@ class SupAction extends Action
$notice->query('SELECT profile_id, max(id) AS max_id ' .
'FROM notice ' .
- 'WHERE created > (now() - ' . $seconds . ') ' .
+ ((common_config('db','type') == 'pgsql') ?
+ 'WHERE extract(epoch from created) > (extract(epoch from now()) - ' . $seconds . ') ' :
+ 'WHERE created > (now() - ' . $seconds . ') ' ) .
'GROUP BY profile_id');
$updates = array();