From 4b0cf99e56f965e10eeb8b8b19e7b405bda49eaf Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Thu, 15 Jan 2009 23:03:38 +0000 Subject: Convert use of common_server_error and common_user_error to methods on Action --- actions/userauthorization.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'actions/userauthorization.php') diff --git a/actions/userauthorization.php b/actions/userauthorization.php index 196fae9ad..838458932 100644 --- a/actions/userauthorization.php +++ b/actions/userauthorization.php @@ -54,7 +54,7 @@ class UserauthorizationAction extends Action common_debug('getting new request', __FILE__); $req = $this->get_new_request(); if (!$req) { - $this->client_error(_('No request found!')); + $this->clientError(_('No request found!')); } common_debug('validating request', __FILE__); # XXX: only validate new requests, since nonce is one-time use @@ -64,7 +64,7 @@ class UserauthorizationAction extends Action $this->show_form($req); } catch (OAuthException $e) { $this->clear_request(); - $this->client_error($e->getMessage()); + $this->clientError($e->getMessage()); return; } @@ -137,7 +137,7 @@ class UserauthorizationAction extends Action $req = $this->get_stored_request(); if (!$req) { - common_user_error(_('No authorization request!')); + $this->clientError(_('No authorization request!')); return; } @@ -145,10 +145,10 @@ class UserauthorizationAction extends Action if ($this->arg('accept')) { if (!$this->authorize_token($req)) { - $this->client_error(_('Error authorizing token')); + $this->clientError(_('Error authorizing token')); } if (!$this->save_remote_profile($req)) { - $this->client_error(_('Error saving remote profile')); + $this->clientError(_('Error saving remote profile')); } if (!$callback) { $this->show_accept_message($req->get_parameter('oauth_token')); @@ -160,7 +160,7 @@ class UserauthorizationAction extends Action $profile = $user->getProfile(); if (!$profile) { common_log_db_error($user, 'SELECT', __FILE__); - $this->server_error(_('User without matching profile')); + $this->serverError(_('User without matching profile')); return; } $params['omb_listener_nickname'] = $user->nickname; -- cgit v1.2.3-54-g00ecf