summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
Diffstat (limited to 'classes')
-rw-r--r--classes/Notice.php7
-rw-r--r--classes/Notice_inbox.php4
2 files changed, 10 insertions, 1 deletions
diff --git a/classes/Notice.php b/classes/Notice.php
index e0bb90ba6..18f3f654e 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
@@ -816,7 +821,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 ' .
diff --git a/classes/Notice_inbox.php b/classes/Notice_inbox.php
index 673e187c7..367a35f1f 100644
--- a/classes/Notice_inbox.php
+++ b/classes/Notice_inbox.php
@@ -25,6 +25,10 @@ require_once INSTALLDIR.'/classes/Memcached_DataObject.php';
define('INBOX_CACHE_WINDOW', 101);
+define('NOTICE_INBOX_SOURCE_SUB', 1);
+define('NOTICE_INBOX_SOURCE_GROUP', 2);
+define('NOTICE_INBOX_SOURCE_GATEWAY', -1);
+
class Notice_inbox extends Memcached_DataObject
{
###START_AUTOCODE