]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Don't show flag user button your own profile
authorZach Copley <zach@status.net>
Fri, 20 Nov 2009 03:56:24 +0000 (19:56 -0800)
committerZach Copley <zach@status.net>
Fri, 20 Nov 2009 03:56:24 +0000 (19:56 -0800)
plugins/UserFlag/UserFlagPlugin.php
plugins/UserFlag/flagprofile.php

index c276c4b9f5ee28362de06e8e9f8a3bcd8c32f1c5..97b999a2f8fac1df2c60d1415c08449f5bae1431 100644 (file)
@@ -88,7 +88,7 @@ class UserFlagPlugin extends Plugin
     {
         $user = common_current_user();
 
-        if (!empty($user)) {
+        if (!empty($user) && ($user->id != $profile->id)) {
 
             $action->elementStart('li', 'entity_flag');
 
index b01d07e34f626f737933669b8ada3f7cb925f9b1..9bce7865b8c973114d42b12dacb804473183c25f 100644 (file)
@@ -86,12 +86,6 @@ class FlagprofileAction extends ProfileFormAction
 
     function handle($args)
     {
-        if ($this->boolean('ajax')) {
-            common_debug("ajax called for");
-        } else {
-            common_debug("no ajax");
-        }
-        
         if ($_SERVER['REQUEST_METHOD'] == 'POST') {
             $this->handlePost();
             if (!$this->boolean('ajax')) {
@@ -125,7 +119,7 @@ class FlagprofileAction extends ProfileFormAction
         }
 
         $ufp->free();
-        
+
         if ($this->boolean('ajax')) {
             $this->ajaxResults();
         }