From: Evan Prodromou Date: Tue, 29 Dec 2009 00:35:29 +0000 (-0800) Subject: don't add flag if it's already there at block time X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1e3fea17afb5d8291e87f1fc57022af4e2633611;p=quix0rs-gnu-social.git don't add flag if it's already there at block time --- diff --git a/plugins/UserFlag/UserFlagPlugin.php b/plugins/UserFlag/UserFlagPlugin.php index 0fca5f9cf9..602a5bfa88 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;