When deleting a notice, null the reply_to fields that point to notice

This commit is contained in:
Brenda Wallace 2009-03-12 15:20:50 +13:00
parent 896dbfaf67
commit ea5e7ed2ff

View File

@ -67,6 +67,8 @@ class Notice extends Memcached_DataObject
$this->blowSubsCache(true);
$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',
'Fave',
'Notice_tag',