]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
method to check if a profile has forwarded a notice
authorEvan Prodromou <evan@status.net>
Tue, 8 Dec 2009 22:20:17 +0000 (17:20 -0500)
committerEvan Prodromou <evan@status.net>
Tue, 8 Dec 2009 22:20:17 +0000 (17:20 -0500)
classes/Profile.php

index 4b2e0900647b29a20204ed63345a6665e2df69c5..4c14f62a06c71611a2b49b879f17ced46b317b52 100644 (file)
@@ -716,4 +716,12 @@ class Profile extends Memcached_DataObject
         }
         return $result;
     }
+
+    function hasForwarded($notice_id)
+    {
+        $forward = Forward::pkeyGet(array('profile_id' => $this->id,
+                                          'notice_id' => $notice_id));
+
+        return (!empty($forward));
+    }
 }