names for Notice is_local states

This commit is contained in:
Evan Prodromou 2009-06-16 21:37:04 -07:00
parent 7845fe3100
commit 90b2b3f9d1

View File

@ -29,6 +29,11 @@ require_once INSTALLDIR.'/classes/Memcached_DataObject.php';
define('NOTICE_CACHE_WINDOW', 61); 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 class Notice extends Memcached_DataObject
{ {
###START_AUTOCODE ###START_AUTOCODE
@ -793,7 +798,7 @@ class Notice extends Memcached_DataObject
$inbox = new Notice_inbox(); $inbox = new Notice_inbox();
$UT = common_config('db','type')=='pgsql'?'"user"':'user'; $UT = common_config('db','type')=='pgsql'?'"user"':'user';
$qry = 'INSERT INTO notice_inbox (user_id, notice_id, created, source) ' . $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 " . "FROM $UT JOIN group_member ON $UT.id = group_member.profile_id " .
'WHERE group_member.group_id = ' . $group->id . ' ' . 'WHERE group_member.group_id = ' . $group->id . ' ' .
'AND NOT EXISTS (SELECT user_id, notice_id ' . 'AND NOT EXISTS (SELECT user_id, notice_id ' .