diff options
Diffstat (limited to 'classes/Profile.php')
-rw-r--r-- | classes/Profile.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/classes/Profile.php b/classes/Profile.php index d580e1235..3ea95ab01 100644 --- a/classes/Profile.php +++ b/classes/Profile.php @@ -494,6 +494,29 @@ class Profile extends Memcached_DataObject return $cnt; } + /** + * Is this profile subscribed to another profile? + * + * @param Profile $other + * @return boolean + */ + function isSubscribed($other) + { + return Subscription::exists($this, $other); + } + + /** + * Are these two profiles subscribed to each other? + * + * @param Profile $other + * @return boolean + */ + function mutuallySubscribed($other) + { + return $this->isSubscribed($other) && + $other->isSubscribed($this); + } + function hasFave($notice) { $cache = common_memcache(); |