RemoteProfileAction cleanup:
- meta robots to prevent spidering - a little notice if silenced
This commit is contained in:
parent
88c35c2cce
commit
5fdcba472b
@ -321,6 +321,9 @@ class UserProfile extends Widget
|
|||||||
}
|
}
|
||||||
$this->out->elementEnd('li');
|
$this->out->elementEnd('li');
|
||||||
|
|
||||||
|
// Some actions won't be applicable to non-local users.
|
||||||
|
$isLocal = !empty($this->user);
|
||||||
|
|
||||||
if ($cur->hasRight(Right::SANDBOXUSER) ||
|
if ($cur->hasRight(Right::SANDBOXUSER) ||
|
||||||
$cur->hasRight(Right::SILENCEUSER) ||
|
$cur->hasRight(Right::SILENCEUSER) ||
|
||||||
$cur->hasRight(Right::DELETEUSER)) {
|
$cur->hasRight(Right::DELETEUSER)) {
|
||||||
@ -351,7 +354,7 @@ class UserProfile extends Widget
|
|||||||
$this->out->elementEnd('li');
|
$this->out->elementEnd('li');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($cur->hasRight(Right::DELETEUSER)) {
|
if ($isLocal && $cur->hasRight(Right::DELETEUSER)) {
|
||||||
$this->out->elementStart('li', 'entity_delete');
|
$this->out->elementStart('li', 'entity_delete');
|
||||||
$df = new DeleteUserForm($this->out, $this->profile, $r2args);
|
$df = new DeleteUserForm($this->out, $this->profile, $r2args);
|
||||||
$df->show();
|
$df->show();
|
||||||
@ -361,7 +364,7 @@ class UserProfile extends Widget
|
|||||||
$this->out->elementEnd('li');
|
$this->out->elementEnd('li');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($cur->hasRight(Right::GRANTROLE)) {
|
if ($isLocal && $cur->hasRight(Right::GRANTROLE)) {
|
||||||
$this->out->elementStart('li', 'entity_role');
|
$this->out->elementStart('li', 'entity_role');
|
||||||
$this->out->element('p', null, _('User role'));
|
$this->out->element('p', null, _('User role'));
|
||||||
$this->out->elementStart('ul');
|
$this->out->elementStart('ul');
|
||||||
|
@ -64,6 +64,11 @@ class RemoteProfileAction extends ShowstreamAction
|
|||||||
$url);
|
$url);
|
||||||
$html = common_markup_to_html($markdown);
|
$html = common_markup_to_html($markdown);
|
||||||
$this->raw($html);
|
$this->raw($html);
|
||||||
|
|
||||||
|
if ($this->profile->hasRole(Profile_role::SILENCED)) {
|
||||||
|
$markdown = _m('Site moderators have silenced this profile, which prevents delivery of new messages to any users on this site.');
|
||||||
|
$this->raw(common_markup_to_html($markdown));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getFeeds()
|
function getFeeds()
|
||||||
@ -71,9 +76,13 @@ class RemoteProfileAction extends ShowstreamAction
|
|||||||
// none
|
// none
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Don't do various extra stuff, and also trim some things to avoid crawlers.
|
||||||
|
*/
|
||||||
function extraHead()
|
function extraHead()
|
||||||
{
|
{
|
||||||
// none
|
$this->element('meta', array('name' => 'robots',
|
||||||
|
'content' => 'noindex,nofollow'));
|
||||||
}
|
}
|
||||||
|
|
||||||
function showLocalNav()
|
function showLocalNav()
|
||||||
|
Loading…
Reference in New Issue
Block a user