summaryrefslogtreecommitdiff
path: root/plugins/UserFlag
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-11-07 13:22:07 -0500
committerEvan Prodromou <evan@status.net>2009-11-07 13:22:07 -0500
commit509109a71a7aebd028dffb053a888cc48826b6b9 (patch)
tree456cf52cf9fc1e3888287a54bf5d105e260cffba /plugins/UserFlag
parent285745d2fdfadb58cd228a72bc93511a9fb54e58 (diff)
make sure FlagprofileAction without Profile_flag
Diffstat (limited to 'plugins/UserFlag')
-rw-r--r--plugins/UserFlag/flagprofile.php11
1 files changed, 1 insertions, 10 deletions
diff --git a/plugins/UserFlag/flagprofile.php b/plugins/UserFlag/flagprofile.php
index f128b9c40..c72b74c6a 100644
--- a/plugins/UserFlag/flagprofile.php
+++ b/plugins/UserFlag/flagprofile.php
@@ -81,19 +81,12 @@ class FlagprofileAction extends Action
return false;
}
- $this->flag = $this->trimmed('flag');
-
- if (empty($this->flag)) {
- $this->flag = Profile_flag::DEFAULTFLAG;
- }
-
$user = common_current_user();
assert(!empty($user)); // checked above
if (User_flag_profile::exists($this->profile->id,
- $user->id,
- $this->flag))
+ $user->id))
{
$this->clientError(_('Flag already exists.'));
return false;
@@ -134,13 +127,11 @@ class FlagprofileAction extends Action
assert(!empty($user));
assert(!empty($this->profile));
- assert(!empty($this->flag));
$ufp = new User_flag_profile();
$ufp->profile_id = $this->profile->id;
$ufp->user_id = $user->id;
- $ufp->flag = $this->flag;
$ufp->created = common_sql_now();
if (!$ufp->insert()) {