git.gnu.io has moved to IP address 209.51.188.249 -- please double check where you are logging in.

Commit 410ca34c authored by Evan Prodromou's avatar Evan Prodromou

remove edit link from profileblock

parent 07d9cca0
......@@ -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;
......
......@@ -72,11 +72,6 @@ class DefaultProfileBlock extends AccountProfileBlock
Avatar::defaultImage(AVATAR_STREAM_SIZE);
}
function canEdit()
{
return true;
}
function location()
{
return null;
......
......@@ -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;
......
......@@ -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)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment