X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fdisfavor.php;h=e9fc17c5b730fd75b9faf3baaf918859d39b48ff;hb=5454d22b79e1757a37fa253b1eb133d219986eea;hp=3ccdd69af25f49a243561c61dfe25e4603cf46eb;hpb=53650c7a5e8f2a27f8d0d02367bda8934f59c0e6;p=quix0rs-gnu-social.git diff --git a/actions/disfavor.php b/actions/disfavor.php index 3ccdd69af2..e9fc17c5b7 100644 --- a/actions/disfavor.php +++ b/actions/disfavor.php @@ -1,5 +1,4 @@ clientError(_('Not logged in.')); return; } @@ -71,6 +71,7 @@ class DisfavorAction extends Action $notice = Notice::staticGet($id); $token = $this->trimmed('token-'.$notice->id); if (!$token || $token != common_session_token()) { + // TRANS: Client error displayed when the session token does not match or is not given. $this->clientError(_('There was a problem with your session token. Try again, please.')); return; } @@ -78,12 +79,14 @@ class DisfavorAction extends Action $fave->user_id = $user->id; $fave->notice_id = $notice->id; if (!$fave->find(true)) { + // TRANS: Client error displayed when trying to remove favorite status for a notice that is not a favorite. $this->clientError(_('This notice is not a favorite!')); return; } $result = $fave->delete(); if (!$result) { common_log_db_error($fave, 'DELETE', __FILE__); + // TRANS: Server error displayed when removing a favorite from the database fails. $this->serverError(_('Could not delete favorite.')); return; } @@ -91,6 +94,7 @@ class DisfavorAction extends Action if ($this->boolean('ajax')) { $this->startHTML('text/xml;charset=utf-8'); $this->elementStart('head'); + // TRANS: Title for page on which favorites can be added. $this->element('title', null, _('Add to favorites')); $this->elementEnd('head'); $this->elementStart('body'); @@ -105,4 +109,3 @@ class DisfavorAction extends Action } } } -