forked from GNUsocial/gnu-social
remove edit link from profileblock
This commit is contained in:
parent
07d9cca004
commit
410ca34ce9
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user