forked from GNUsocial/gnu-social
save notice to inbox on saveNew
darcs-hash:20081022205621-5ed1f-4103d4db9713f4e6e65647f71cc788cbee56a240.gz
This commit is contained in:
parent
a15034bea5
commit
74291968c4
@ -131,7 +131,8 @@ class Notice extends Memcached_DataObject
|
|||||||
if (common_config('memcached', 'enabled')) {
|
if (common_config('memcached', 'enabled')) {
|
||||||
$notice->blowCaches();
|
$notice->blowCaches();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$notice->addToInboxes();
|
||||||
return $notice;
|
return $notice;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -307,7 +308,7 @@ class Notice extends Memcached_DataObject
|
|||||||
|
|
||||||
return $wrapper;
|
return $wrapper;
|
||||||
}
|
}
|
||||||
|
|
||||||
function publicStream($offset=0, $limit=20, $since_id=0, $before_id=0) {
|
function publicStream($offset=0, $limit=20, $since_id=0, $before_id=0) {
|
||||||
|
|
||||||
$needAnd = FALSE;
|
$needAnd = FALSE;
|
||||||
@ -346,4 +347,17 @@ class Notice extends Memcached_DataObject
|
|||||||
'public',
|
'public',
|
||||||
$offset, $limit);
|
$offset, $limit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function addToInboxes() {
|
||||||
|
|
||||||
|
$inbox = new Notice_inbox();
|
||||||
|
|
||||||
|
$inbox->query('INSERT INTO notice_inbox (user_id, notice_id) ' .
|
||||||
|
'SELECT user.id, ' . $this->id . ' ' .
|
||||||
|
'FROM user JOIN subscription ON user.id = subscription.subscriber ' .
|
||||||
|
'WHERE subscription.subscribed = ' . $this->profile_id);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user