From: Evan Prodromou Date: Wed, 16 Mar 2011 13:59:36 +0000 (-0400) Subject: remove edit link from profileblock X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=410ca34ce992814cce1f8becd7076481bedbf141;p=quix0rs-gnu-social.git remove edit link from profileblock --- diff --git a/lib/accountprofileblock.php b/lib/accountprofileblock.php index f31503353d..ea6e27ac76 100644 --- a/lib/accountprofileblock.php +++ b/lib/accountprofileblock.php @@ -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; diff --git a/lib/defaultprofileblock.php b/lib/defaultprofileblock.php index 18eff49432..b8af14ac21 100644 --- a/lib/defaultprofileblock.php +++ b/lib/defaultprofileblock.php @@ -72,11 +72,6 @@ class DefaultProfileBlock extends AccountProfileBlock Avatar::defaultImage(AVATAR_STREAM_SIZE); } - function canEdit() - { - return true; - } - function location() { return null; diff --git a/lib/groupprofileblock.php b/lib/groupprofileblock.php index 32526b0458..9df541e343 100644 --- a/lib/groupprofileblock.php +++ b/lib/groupprofileblock.php @@ -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; diff --git a/lib/profileblock.php b/lib/profileblock.php index 7fcc11ef1a..716149dfeb 100644 --- a/lib/profileblock.php +++ b/lib/profileblock.php @@ -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)) {