Shorthand function to check if notice has been repeated.

This commit is contained in:
Mikael Nordfeldth 2016-08-27 14:42:28 +02:00
parent f7030b538f
commit 3b046ee49d
1 changed files with 7 additions and 0 deletions

View File

@ -2627,6 +2627,13 @@ class Notice extends Managed_DataObject
return !empty($this->repeat_of);
}
public function isRepeated()
{
$n = new Notice();
$n->repeat_of = $this->getID();
return $n->find() && $n->N > 0;
}
/**
* Get the list of hash tags saved with this notice.
*