don't add flag if it's already there at block time

This commit is contained in:
Evan Prodromou 2009-12-28 16:35:29 -08:00
parent fa3301cf84
commit 1e3fea17af

View File

@ -251,7 +251,9 @@ class UserFlagPlugin extends Plugin
function onEndBlockProfile($user, $profile) 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); User_flag_profile::create($user->id, $profile->id);
} }
return true; return true;