summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-06-16 21:37:04 -0700
committerEvan Prodromou <evan@controlyourself.ca>2009-06-16 21:37:04 -0700
commit90b2b3f9d19196a6961fb7a115b48b2cbdf966ce (patch)
tree092bb266778abf5a11993dafd3874a23bfbfae88 /classes
parent7845fe3100375f0dc7c2515cfa935187efa1c0c8 (diff)
names for Notice is_local states
Diffstat (limited to 'classes')
-rw-r--r--classes/Notice.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/classes/Notice.php b/classes/Notice.php
index 68602b1f7..333832d0b 100644
--- a/classes/Notice.php
+++ b/classes/Notice.php
@@ -29,6 +29,11 @@ require_once INSTALLDIR.'/classes/Memcached_DataObject.php';
define('NOTICE_CACHE_WINDOW', 61);
+define('NOTICE_LOCAL_PUBLIC', 1);
+define('NOTICE_REMOTE_OMB', 0);
+define('NOTICE_LOCAL_NONPUBLIC', -1);
+define('NOTICE_GATEWAY', -2);
+
class Notice extends Memcached_DataObject
{
###START_AUTOCODE
@@ -793,7 +798,7 @@ class Notice extends Memcached_DataObject
$inbox = new Notice_inbox();
$UT = common_config('db','type')=='pgsql'?'"user"':'user';
$qry = 'INSERT INTO notice_inbox (user_id, notice_id, created, source) ' .
- "SELECT $UT.id, " . $this->id . ", '" . $this->created . "', 2 " .
+ "SELECT $UT.id, " . $this->id . ", '" . $this->created . "', " . NOTICE_INBOX_SOURCE_GROUP . " " .
"FROM $UT JOIN group_member ON $UT.id = group_member.profile_id " .
'WHERE group_member.group_id = ' . $group->id . ' ' .
'AND NOT EXISTS (SELECT user_id, notice_id ' .