When deleting a notice, null the reply_to fields that point to notice
This commit is contained in:
parent
896dbfaf67
commit
ea5e7ed2ff
@ -67,6 +67,8 @@ class Notice extends Memcached_DataObject
|
|||||||
$this->blowSubsCache(true);
|
$this->blowSubsCache(true);
|
||||||
|
|
||||||
$this->query('BEGIN');
|
$this->query('BEGIN');
|
||||||
|
//Null any notices that are replies to this notice
|
||||||
|
$this->query(sprintf("UPDATE notice set reply_to = null WHERE reply_to = %d", $this->id));
|
||||||
$related = array('Reply',
|
$related = array('Reply',
|
||||||
'Fave',
|
'Fave',
|
||||||
'Notice_tag',
|
'Notice_tag',
|
||||||
|
Loading…
Reference in New Issue
Block a user