Stream of notices linking to an URL
This commit is contained in:
@@ -52,6 +52,12 @@ class File_to_post extends Memcached_DataObject
|
||||
$f2p->file_id = $file_id;
|
||||
$f2p->post_id = $notice_id;
|
||||
$f2p->insert();
|
||||
|
||||
$f = File::staticGet($file_id);
|
||||
|
||||
if (!empty($f)) {
|
||||
$f->blowNoticeCache();
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($seen[$notice_id])) {
|
||||
@@ -66,4 +72,13 @@ class File_to_post extends Memcached_DataObject
|
||||
{
|
||||
return Memcached_DataObject::pkeyGet('File_to_post', $kv);
|
||||
}
|
||||
|
||||
function delete()
|
||||
{
|
||||
$f = File::staticGet('id', $this->file_id);
|
||||
if (!empty($f)) {
|
||||
$f->blowNoticeCache();
|
||||
}
|
||||
return parent::delete();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user