summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorCiaranG <ciaran@ciarang.com>2009-03-11 23:41:30 +0000
committerCiaranG <ciaran@ciarang.com>2009-03-11 23:46:23 +0000
commitc08e4d904ec80144379c5728e2274e3513e6c819 (patch)
tree082dfda16ba3049affaff02716b897d24feeba65 /actions
parent70d5fc46845804507640e354c9d9e06367a53fb0 (diff)
PostgreSQL - a few more query compatibility issues (submitted by oxygene)
Diffstat (limited to 'actions')
-rw-r--r--actions/peopletag.php2
-rw-r--r--actions/sup.php4
2 files changed, 4 insertions, 2 deletions
diff --git a/actions/peopletag.php b/actions/peopletag.php
index 6b1e34f1a..5add75485 100644
--- a/actions/peopletag.php
+++ b/actions/peopletag.php
@@ -119,7 +119,7 @@ class PeopletagAction extends Action
'FROM profile JOIN profile_tag ' .
'ON profile.id = profile_tag.tagger ' .
'WHERE profile_tag.tagger = profile_tag.tagged ' .
- 'AND tag = "%s" ' .
+ "AND tag = '%s' " .
'ORDER BY profile_tag.modified DESC%s';
$profile->query(sprintf($qry, $this->tag, $lim));
diff --git a/actions/sup.php b/actions/sup.php
index f4b1cda23..8ef9207fa 100644
--- a/actions/sup.php
+++ b/actions/sup.php
@@ -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();