]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Notice.php
Merge branch 'nightly' of gitorious.org:social/mainline into nightly
[quix0rs-gnu-social.git] / classes / Notice.php
index 86eee49321a22ec89ec56e9edb3f29359a767b6a..0ef25476caae583b220c9cc5bcbf43e1f31d5934 100644 (file)
@@ -313,6 +313,16 @@ class Notice extends Managed_DataObject
         return $notice;
     }
 
+    public static function getById($id)
+    {
+        $notice = new Notice();
+        $notice->id = $id;
+        if (!$notice->find(true)) {
+            throw new NoResultException($notice);
+        }
+        return $notice;
+    }
+
     /**
      * Extract #hashtags from this notice's content and save them to the database.
      */