]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Shorthand function to check if notice has been repeated.
authorMikael Nordfeldth <mmn@hethane.se>
Sat, 27 Aug 2016 12:42:28 +0000 (14:42 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Sat, 27 Aug 2016 12:42:28 +0000 (14:42 +0200)
classes/Notice.php

index b828678d87c92f338ee3538404a900f9b2324f39..c7b12371e0ccc342255bcefca73c9d8416ac22e7 100644 (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.
      *