summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorCiaranG <ciaran@ciarang.com>2009-03-08 16:16:10 +0000
committerCiaranG <ciaran@ciarang.com>2009-03-08 16:16:10 +0000
commit2133d5a4e7fc694b097fe65282e557d99ee109ad (patch)
tree210454e89a627b81bf926c156dd2a9f9c0ba0cf7 /lib
parenta5f11248305f1ec66eee215e9e12ba010ed97691 (diff)
PostgreSQL - some more fixes to make queries compatible with both databases. (submitted by oxygene)
Diffstat (limited to 'lib')
-rw-r--r--lib/jabber.php4
-rw-r--r--lib/util.php4
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/jabber.php b/lib/jabber.php
index 3fbb3e1ab..3cd3b0d37 100644
--- a/lib/jabber.php
+++ b/lib/jabber.php
@@ -410,8 +410,8 @@ function jabber_broadcast_notice($notice)
"ON $UT.id = notice_inbox.user_id " .
'WHERE notice_inbox.notice_id = ' . $notice->id . ' ' .
'AND notice_inbox.source = 2 ' .
- 'AND user.jabber is not null ' .
- 'AND user.jabbernotify = 1 ');
+ "AND $UT.jabber is not null " .
+ "AND $UT.jabbernotify = 1 ");
while ($user->fetch()) {
if (!array_key_exists($user->id, $sent_to)) {
diff --git a/lib/util.php b/lib/util.php
index ca8376f28..221175ccd 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -688,7 +688,7 @@ function common_relative_profile($sender, $nickname, $dt=null)
$recipient = new Profile();
// XXX: use a join instead of a subquery
$recipient->whereAdd('EXISTS (SELECT subscribed from subscription where subscriber = '.$sender->id.' and subscribed = id)', 'AND');
- $recipient->whereAdd('nickname = "' . trim($nickname) . '"', 'AND');
+ $recipient->whereAdd("nickname = '" . trim($nickname) . "'", 'AND');
if ($recipient->find(true)) {
// XXX: should probably differentiate between profiles with
// the same name by date of most recent update
@@ -698,7 +698,7 @@ function common_relative_profile($sender, $nickname, $dt=null)
$recipient = new Profile();
// XXX: use a join instead of a subquery
$recipient->whereAdd('EXISTS (SELECT subscriber from subscription where subscribed = '.$sender->id.' and subscriber = id)', 'AND');
- $recipient->whereAdd('nickname = "' . trim($nickname) . '"', 'AND');
+ $recipient->whereAdd("nickname = '" . trim($nickname) . "'", 'AND');
if ($recipient->find(true)) {
// XXX: should probably differentiate between profiles with
// the same name by date of most recent update