summaryrefslogtreecommitdiff
path: root/plugins/UserFlag/UserFlagPlugin.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-11-01 23:25:30 -0500
committerEvan Prodromou <evan@status.net>2009-11-01 23:25:30 -0500
commitf2b642ce822c480cfc418c38106cc18c3a428cf4 (patch)
tree9e9467e9e205bcd6d975367f83bab222820f0fd9 /plugins/UserFlag/UserFlagPlugin.php
parent70e4580c3f2e8d400e53babe1f0aa8b9fb53aa52 (diff)
insert profile flags more or less correctly
Diffstat (limited to 'plugins/UserFlag/UserFlagPlugin.php')
-rw-r--r--plugins/UserFlag/UserFlagPlugin.php17
1 files changed, 14 insertions, 3 deletions
diff --git a/plugins/UserFlag/UserFlagPlugin.php b/plugins/UserFlag/UserFlagPlugin.php
index 003c066af..fc56249e6 100644
--- a/plugins/UserFlag/UserFlagPlugin.php
+++ b/plugins/UserFlag/UserFlagPlugin.php
@@ -128,9 +128,20 @@ class UserFlagPlugin extends Plugin
if (!empty($user)) {
- $form = new FlagProfileForm($action, $profile);
-
- $form->show();
+ $action->elementStart('li', 'entity_flag');
+
+ if (User_flag_profile::exists($profile->id, $user->id,
+ Profile_flag::DEFAULTFLAG)) {
+ $action->element('span',
+ _('Flagged for review'));
+ } else {
+ $form = new FlagProfileForm($action, $profile,
+ array('action' => 'showstream',
+ 'nickname' => $profile->nickname));
+ $form->show();
+ }
+
+ $action->elementEnd('li');
}
return true;