summaryrefslogtreecommitdiff
path: root/plugins/UserFlag/User_flag_profile.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-11-01 23:25:30 -0500
committerEvan Prodromou <evan@status.net>2009-11-01 23:25:30 -0500
commitf2b642ce822c480cfc418c38106cc18c3a428cf4 (patch)
tree9e9467e9e205bcd6d975367f83bab222820f0fd9 /plugins/UserFlag/User_flag_profile.php
parent70e4580c3f2e8d400e53babe1f0aa8b9fb53aa52 (diff)
insert profile flags more or less correctly
Diffstat (limited to 'plugins/UserFlag/User_flag_profile.php')
-rw-r--r--plugins/UserFlag/User_flag_profile.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/UserFlag/User_flag_profile.php b/plugins/UserFlag/User_flag_profile.php
index 99dce7529..895da5323 100644
--- a/plugins/UserFlag/User_flag_profile.php
+++ b/plugins/UserFlag/User_flag_profile.php
@@ -57,4 +57,12 @@ class User_flag_profile extends Memcached_DataObject
{
return Memcached_DataObject::pkeyGet('User_flag_profile', $kv);
}
+
+ static function exists($profile_id, $user_id, $flag)
+ {
+ $ufp = User_flag_profile::pkeyGet(array('profile_id' => $profile_id,
+ 'user_id' => $user_id));
+
+ return !empty($ufp);
+ }
}