summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-12-28 16:35:29 -0800
committerEvan Prodromou <evan@status.net>2009-12-28 16:35:29 -0800
commit1e3fea17afb5d8291e87f1fc57022af4e2633611 (patch)
tree81b9e0a102bb71e6d0a8161a124de66321c35657 /plugins
parentfa3301cf84ee0a78c4e00c7bd309de8a769fd848 (diff)
don't add flag if it's already there at block time
Diffstat (limited to 'plugins')
-rw-r--r--plugins/UserFlag/UserFlagPlugin.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/UserFlag/UserFlagPlugin.php b/plugins/UserFlag/UserFlagPlugin.php
index 0fca5f9cf..602a5bfa8 100644
--- a/plugins/UserFlag/UserFlagPlugin.php
+++ b/plugins/UserFlag/UserFlagPlugin.php
@@ -251,7 +251,9 @@ class UserFlagPlugin extends Plugin
function onEndBlockProfile($user, $profile)
{
- if ($this->flagOnBlock) {
+ if ($this->flagOnBlock && !User_flag_profile::exists($profile->id,
+ $user->id)) {
+
User_flag_profile::create($user->id, $profile->id);
}
return true;