From c8bd6d9f7afde597f3b404acb05622a73f3738f7 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Mon, 9 Nov 2009 23:56:02 -0800 Subject: 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. --- actions/apiaccountupdateprofile.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'actions/apiaccountupdateprofile.php') 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; } -- cgit v1.2.3-54-g00ecf