summaryrefslogtreecommitdiff
path: root/actions/twitapiaccount.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-01-15 23:03:38 +0000
committerEvan Prodromou <evan@controlyourself.ca>2009-01-15 23:03:38 +0000
commit4b0cf99e56f965e10eeb8b8b19e7b405bda49eaf (patch)
tree094c2948648d79290326130f9cd75a95afc6035d /actions/twitapiaccount.php
parenteaa81d25fa7bd954132ce7f901fae69b0d46ec1a (diff)
Convert use of common_server_error and common_user_error to methods on Action
Diffstat (limited to 'actions/twitapiaccount.php')
-rw-r--r--actions/twitapiaccount.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/actions/twitapiaccount.php b/actions/twitapiaccount.php
index 79e1ed990..e51a29a2d 100644
--- a/actions/twitapiaccount.php
+++ b/actions/twitapiaccount.php
@@ -29,7 +29,7 @@ class TwitapiaccountAction extends TwitterapiAction
parent::handle($args);
if (!in_array($apidata['content-type'], array('xml', 'json'))) {
- common_user_error(_('API method not found!'), $code = 404);
+ $this->clientError(_('API method not found!'), $code = 404);
return;
}
@@ -39,7 +39,7 @@ class TwitapiaccountAction extends TwitterapiAction
function end_session($args, $apidata)
{
parent::handle($args);
- common_server_error(_('API method under construction.'), $code=501);
+ $this->serverError(_('API method under construction.'), $code=501);
}
function update_location($args, $apidata)
@@ -47,7 +47,7 @@ class TwitapiaccountAction extends TwitterapiAction
parent::handle($args);
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
- $this->client_error(_('This method requires a POST.'), 400, $apidata['content-type']);
+ $this->clientError(_('This method requires a POST.'), 400, $apidata['content-type']);
return;
}
@@ -56,7 +56,7 @@ class TwitapiaccountAction extends TwitterapiAction
if (!is_null($location) && strlen($location) > 255) {
// XXX: But Twitter just truncates and runs with it. -- Zach
- $this->client_error(_('That\'s too long. Max notice size is 255 chars.'), 406, $apidate['content-type']);
+ $this->clientError(_('That\'s too long. Max notice size is 255 chars.'), 406, $apidate['content-type']);
return;
}
@@ -64,7 +64,7 @@ class TwitapiaccountAction extends TwitterapiAction
$profile = $user->getProfile();
if (!$profile) {
- common_server_error(_('User has no profile.'));
+ $this->serverError(_('User has no profile.'));
return;
}
@@ -75,7 +75,7 @@ class TwitapiaccountAction extends TwitterapiAction
if (!$result) {
common_log_db_error($profile, 'UPDATE', __FILE__);
- common_server_error(_('Couldn\'t save profile.'));
+ $this->serverError(_('Couldn\'t save profile.'));
return;
}
@@ -91,12 +91,12 @@ class TwitapiaccountAction extends TwitterapiAction
function update_delivery_device($args, $apidata)
{
parent::handle($args);
- common_server_error(_('API method under construction.'), $code=501);
+ $this->serverError(_('API method under construction.'), $code=501);
}
function rate_limit_status($args, $apidata)
{
parent::handle($args);
- common_server_error(_('API method under construction.'), $code=501);
+ $this->serverError(_('API method under construction.'), $code=501);
}
} \ No newline at end of file