$this->clearTags();
$this->clearGroupInboxes();
$this->clearFiles();
+ $this->clearAttentions();
- // NOTE: we don't clear inboxes
// NOTE: we don't clear queue items
}
return $options;
}
+ function clearAttentions()
+ {
+ $att = new Attention();
+ $att->notice_id = $this->getID();
+
+ if ($att->find()) {
+ while ($att->fetch()) {
+ // Can't do delete() on the object directly since it won't remove all of it
+ $other = clone($att);
+ $other->delete();
+ }
+ }
+ }
+
function clearReplies()
{
$replyNotice = new Notice();
$this->_deleteMessages();
$this->_deleteTags();
$this->_deleteBlocks();
+ $this->_deleteAttentions();
Avatar::deleteFromProfile($this, true);
// Warning: delete() will run on the batch objects,
$block->delete();
}
+ function _deleteAttentions()
+ {
+ $att = new Attention();
+ $att->profile_id = $this->getID();
+
+ if ($att->find()) {
+ while ($att->fetch()) {
+ // Can't do delete() on the object directly since it won't remove all of it
+ $other = clone($att);
+ $other->delete();
+ }
+ }
+ }
+
// XXX: identical to Notice::getLocation.
public function getLocation()