diff options
author | Zach Copley <zach@status.net> | 2009-11-09 23:56:02 -0800 |
---|---|---|
committer | Zach Copley <zach@status.net> | 2009-11-09 23:56:02 -0800 |
commit | c8bd6d9f7afde597f3b404acb05622a73f3738f7 (patch) | |
tree | 218275a6e49175debb0cb28d89c02bd1942a8adb /actions/apiaccountupdateprofile.php | |
parent | 312c745884654a461ed6da22eebe78f07f500426 (diff) |
Make /api/account/update_profile_background_image.format work even
when there isn't an existing Design for the user. Plus a few other
fixups.
Diffstat (limited to 'actions/apiaccountupdateprofile.php')
-rw-r--r-- | actions/apiaccountupdateprofile.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/actions/apiaccountupdateprofile.php b/actions/apiaccountupdateprofile.php index 8af0fb866..fd4384a25 100644 --- a/actions/apiaccountupdateprofile.php +++ b/actions/apiaccountupdateprofile.php @@ -92,6 +92,15 @@ class ApiAccountUpdateProfileAction extends ApiAuthAction return; } + if (!in_array($this->format, array('xml', 'json'))) { + $this->clientError( + _('API method not found.'), + 404, + $this->format + ); + return; + } + if (empty($this->user)) { $this->clientError(_('No such user.'), 404, $this->format); return; @@ -135,7 +144,7 @@ class ApiAccountUpdateProfileAction extends ApiAuthAction if (!$result) { common_log_db_error($profile, 'UPDATE', __FILE__); - $this->serverError(_('Couldn\'t save profile.')); + $this->serverError(_('Could not save profile.')); return; } |