forked from GNUsocial/gnu-social
don't allow forwarding your own notice
This commit is contained in:
parent
985d6a0de4
commit
21757186e9
@ -72,6 +72,11 @@ class ForwardAction extends Action
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($this->user->id == $this->notice->profile_id) {
|
||||
$this->clientError(_("You can't forward your own notice."));
|
||||
return false;
|
||||
}
|
||||
|
||||
$token = $this->trimmed('token-'.$id);
|
||||
|
||||
if (empty($token) || $token != common_session_token()) {
|
||||
|
@ -540,7 +540,7 @@ class NoticeListItem extends Widget
|
||||
function showForwardForm()
|
||||
{
|
||||
$user = common_current_user();
|
||||
if ($user) {
|
||||
if ($user && $user->id != $this->notice->profile_id) {
|
||||
$profile = $user->getProfile();
|
||||
if ($profile->hasForwarded($this->notice->id)) {
|
||||
$this->out->text(_('Forwarded'));
|
||||
|
Loading…
Reference in New Issue
Block a user