remove edit link from profileblock

This commit is contained in:
Evan Prodromou 2011-03-16 09:59:36 -04:00
parent 07d9cca004
commit 410ca34ce9
4 changed files with 0 additions and 45 deletions

View File

@ -78,22 +78,6 @@ class AccountProfileBlock extends ProfileBlock
return $this->profile->profileurl; 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() function location()
{ {
return $this->profile->location; return $this->profile->location;

View File

@ -72,11 +72,6 @@ class DefaultProfileBlock extends AccountProfileBlock
Avatar::defaultImage(AVATAR_STREAM_SIZE); Avatar::defaultImage(AVATAR_STREAM_SIZE);
} }
function canEdit()
{
return true;
}
function location() function location()
{ {
return null; return null;

View File

@ -71,22 +71,6 @@ class GroupProfileBlock extends ProfileBlock
return $this->group->mainpage; 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() function location()
{ {
return $this->group->location; return $this->group->location;

View File

@ -50,9 +50,6 @@ abstract class ProfileBlock extends Widget
abstract function avatar(); abstract function avatar();
abstract function name(); abstract function name();
abstract function url(); abstract function url();
abstract function canEdit();
abstract function editUrl();
abstract function editText();
abstract function location(); abstract function location();
abstract function homepage(); abstract function homepage();
abstract function description(); abstract function description();
@ -69,11 +66,6 @@ abstract class ProfileBlock extends Widget
'width' => $size, 'width' => $size,
'height' => $size)); 'height' => $size));
if ($this->canEdit()) {
$this->out->element('a', array('href' => $this->editUrl()),
$this->editText());
}
$name = $this->name(); $name = $this->name();
if (!empty($name)) { if (!empty($name)) {