summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorRobin Millette <millette@controlyourself.ca>2009-06-17 16:22:47 -0400
committerRobin Millette <millette@controlyourself.ca>2009-06-17 16:22:47 -0400
commitfd6de17a4ace3eece968e2c7d319ee29340d2930 (patch)
tree8d576b6e093742c81914bf39a65d8a27a8254189 /classes
parent1505e3a4c3dda7030bb92a2071ec58af2972bed7 (diff)
parent2fbd141361b6ddab0e036b52fc23f2bfcdfd0075 (diff)
Merge branch '0.8.x' of git@gitorious.org:+laconica-developers/laconica/dev into 0.8.x
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