]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/UserFlag/UserFlagPlugin.php
insert profile flags more or less correctly
[quix0rs-gnu-social.git] / plugins / UserFlag / UserFlagPlugin.php
index 003c066afc4f0f885b611c6a137673efb3d63f37..fc56249e6f321e85a772c3f709c1fc99b5cc90c7 100644 (file)
@@ -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;