From f2b642ce822c480cfc418c38106cc18c3a428cf4 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Sun, 1 Nov 2009 23:25:30 -0500 Subject: insert profile flags more or less correctly --- plugins/UserFlag/User_flag_profile.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'plugins/UserFlag/User_flag_profile.php') 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); + } } -- cgit v1.2.3-54-g00ecf