X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fdeletenotice.php;h=f8010a814a330f57ae5da3e82b73d16566da017b;hb=85c2cf64229d08828f3d234741752b05b2f352c0;hp=617fa9c17a44f49dbf243cc3b8d67c6c23b2a23f;hpb=a8d1b7e9c26b4449a4a1e0e250f9b6766b2d8e62;p=quix0rs-gnu-social.git diff --git a/actions/deletenotice.php b/actions/deletenotice.php index 617fa9c17a..f8010a814a 100644 --- a/actions/deletenotice.php +++ b/actions/deletenotice.php @@ -66,7 +66,8 @@ class DeletenoticeAction extends Action if (!common_logged_in()) { common_user_error(_('Not logged in.')); exit; - } else if ($this->notice->profile_id != $this->user_profile->id) { + } else if ($this->notice->profile_id != $this->user_profile->id && + !$this->user->hasRight(Right::DELETEOTHERSNOTICE)) { common_user_error(_('Can\'t delete this notice.')); exit; } @@ -141,8 +142,20 @@ class DeletenoticeAction extends Action $this->hidden('token', common_session_token()); $this->hidden('notice', $this->trimmed('notice')); $this->element('p', null, _('Are you sure you want to delete this notice?')); - $this->submit('form_action-no', _('No'), 'submit form_action-primary', 'no', _("Do not delete this notice")); - $this->submit('form_action-yes', _('Yes'), 'submit form_action-secondary', 'yes', _('Delete this notice')); + $this->submit('form_action-no', + // TRANS: Button label on the delete notice form. + _m('BUTTON','No'), + 'submit form_action-primary', + 'no', + // TRANS: Submit button title for 'No' when deleting a notice. + _("Do not delete this notice")); + $this->submit('form_action-yes', + // TRANS: Button label on the delete notice form. + _m('BUTTON','Yes'), + 'submit form_action-secondary', + 'yes', + // TRANS: Submit button title for 'Yes' when deleting a notice. + _('Delete this notice')); $this->elementEnd('fieldset'); $this->elementEnd('form'); } @@ -154,7 +167,7 @@ class DeletenoticeAction extends Action if (!$token || $token != common_session_token()) { $this->showForm(_('There was a problem with your session token. ' . - ' Try again, please.')); + 'Try again, please.')); return; }