From: Mikael Nordfeldth Date: Sat, 27 Aug 2016 12:42:28 +0000 (+0200) Subject: Shorthand function to check if notice has been repeated. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3b046ee49dbdee50fbd08e2f2fc79b7cf425258b;p=quix0rs-gnu-social.git Shorthand function to check if notice has been repeated. --- diff --git a/classes/Notice.php b/classes/Notice.php index b828678d87..c7b12371e0 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -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. *