]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
remove edit link from profileblock
authorEvan Prodromou <evan@status.net>
Wed, 16 Mar 2011 13:59:36 +0000 (09:59 -0400)
committerEvan Prodromou <evan@status.net>
Wed, 16 Mar 2011 13:59:36 +0000 (09:59 -0400)
lib/accountprofileblock.php
lib/defaultprofileblock.php
lib/groupprofileblock.php
lib/profileblock.php

index f31503353dd297dcf409863771b2904b5e83296e..ea6e27ac76dfb78a5d89e171bf8846752c38bdb1 100644 (file)
@@ -78,22 +78,6 @@ class AccountProfileBlock extends ProfileBlock
         return $this->profile->profileurl;
     }
 
-    function canEdit()
-    {
-        $user = common_current_user();
-        return ((!empty($user)) && ($user->id == $this->profile->id));
-    }
-
-    function editUrl()
-    {
-        return common_local_url('profilesettings');
-    }
-
-    function editText()
-    {
-        return _('Edit');
-    }
-
     function location()
     {
         return $this->profile->location;
index 18eff49432062050f67214b8e27c8897a6111a1a..b8af14ac211b00f4e1967c093cff346d26c1d881 100644 (file)
@@ -72,11 +72,6 @@ class DefaultProfileBlock extends AccountProfileBlock
             Avatar::defaultImage(AVATAR_STREAM_SIZE);
     }
 
-    function canEdit()
-    {
-        return true;
-    }
-
     function location()
     {
         return null;
index 32526b0458dd69c9235911fead82d1b6bde240b1..9df541e343bacadb12973248d501829d3306f3b3 100644 (file)
@@ -71,22 +71,6 @@ class GroupProfileBlock extends ProfileBlock
         return $this->group->mainpage;
     }
 
-    function canEdit()
-    {
-        $user = common_current_user();
-        return ((!empty($user)) && ($user->isAdmin($this->group)));
-    }
-
-    function editUrl()
-    {
-        return common_local_url('editgroup', array('nickname' => $this->group->nickname));
-    }
-
-    function editText()
-    {
-        return _('Edit');
-    }
-
     function location()
     {
         return $this->group->location;
index 7fcc11ef1a844cd6896259b53586f4968c6a97cb..716149dfeb07e557b02da39241d6c05a937787f5 100644 (file)
@@ -50,9 +50,6 @@ abstract class ProfileBlock extends Widget
     abstract function avatar();
     abstract function name();
     abstract function url();
-    abstract function canEdit();
-    abstract function editUrl();
-    abstract function editText();
     abstract function location();
     abstract function homepage();
     abstract function description();
@@ -69,11 +66,6 @@ abstract class ProfileBlock extends Widget
                                          'width' => $size,
                                          'height' => $size));
 
-        if ($this->canEdit()) {
-            $this->out->element('a', array('href' => $this->editUrl()),
-                                $this->editText());
-        }
-
         $name = $this->name();
 
         if (!empty($name)) {