summaryrefslogtreecommitdiff
path: root/classes/Notice.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-07-21 12:50:45 -0700
committerEvan Prodromou <evan@controlyourself.ca>2009-07-21 12:50:45 -0700
commit0a602725b1c49d246e77b24c723a65cdb0119e8e (patch)
tree83a9b97c7ccc77e645f44df8aa405e2471aea5ff /classes/Notice.php
parentde987a9e63f38a3752491032d7a21759f2cc7560 (diff)
parent3649b9ffbc40c3695344597330ad9c35b26a4976 (diff)
Merge branch '0.8.x' of git@gitorious.org:laconica/mainline into 0.8.x
Diffstat (limited to 'classes/Notice.php')
-rw-r--r--classes/Notice.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/classes/Notice.php b/classes/Notice.php
index 0359c310d..101fadb67 100644
--- a/classes/Notice.php
+++ b/classes/Notice.php
@@ -873,7 +873,7 @@ class Notice extends Memcached_DataObject
if ($cnt > 0) {
$qry .= ', ';
}
- $qry .= '('.$id.', '.$this->id.', '.$source.', "'.$this->created.'") ';
+ $qry .= '('.$id.', '.$this->id.', '.$source.", '".$this->created. "') ";
$cnt++;
if (rand() % NOTICE_INBOX_SOFT_LIMIT == 0) {
Notice_inbox::gc($id);
@@ -899,10 +899,14 @@ class Notice extends Memcached_DataObject
{
$user = new User();
+ if(common_config('db','quote_identifiers'))
+ $user_table = '"user"';
+ else $user_table = 'user';
+
$qry =
'SELECT id ' .
- 'FROM user JOIN subscription '.
- 'ON user.id = subscription.subscriber ' .
+ 'FROM '. $user_table .' JOIN subscription '.
+ 'ON '. $user_table .'.id = subscription.subscriber ' .
'WHERE subscription.subscribed = %d ';
$user->query(sprintf($qry, $this->profile_id));