From 3b046ee49dbdee50fbd08e2f2fc79b7cf425258b Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Sat, 27 Aug 2016 14:42:28 +0200 Subject: [PATCH] Shorthand function to check if notice has been repeated. --- classes/Notice.php | 7 +++++++ 1 file changed, 7 insertions(+) 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. * -- 2.39.5