X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fdisfavor.php;h=3e3e4a5476d48e43743c3807cb07f5df20455fd5;hb=6edbf3ca781d20f2ec98daf32080c60e804d8215;hp=9a27f34b16bce59e01f4e9829f7692994536eed9;hpb=eaa81d25fa7bd954132ce7f901fae69b0d46ec1a;p=quix0rs-gnu-social.git diff --git a/actions/disfavor.php b/actions/disfavor.php index 9a27f34b16..3e3e4a5476 100644 --- a/actions/disfavor.php +++ b/actions/disfavor.php @@ -28,7 +28,7 @@ class DisfavorAction extends Action parent::handle($args); if (!common_logged_in()) { - common_user_error(_('Not logged in.')); + $this->clientError(_('Not logged in.')); return; } @@ -46,7 +46,7 @@ class DisfavorAction extends Action $token = $this->trimmed('token-'.$notice->id); if (!$token || $token != common_session_token()) { - $this->client_error(_("There was a problem with your session token. Try again, please.")); + $this->clientError(_("There was a problem with your session token. Try again, please.")); return; } @@ -54,7 +54,7 @@ class DisfavorAction extends Action $fave->user_id = $this->id; $fave->notice_id = $notice->id; if (!$fave->find(true)) { - $this->client_error(_('This notice is not a favorite!')); + $this->clientError(_('This notice is not a favorite!')); return; } @@ -62,14 +62,14 @@ class DisfavorAction extends Action if (!$result) { common_log_db_error($fave, 'DELETE', __FILE__); - $this->server_error(_('Could not delete favorite.')); + $this->serverError(_('Could not delete favorite.')); return; } $user->blowFavesCache(); if ($this->boolean('ajax')) { - common_start_html('text/xml;charset=utf-8', true); + $this->startHTML('text/xml;charset=utf-8', true); $this->elementStart('head'); $this->element('title', null, _('Add to favorites')); $this->elementEnd('head');