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;
$original = clone($profile);
- if (empty($this->name)) {
+ if (!empty($this->name)) {
$profile->fullname = $this->name;
}
- if (empty($this->url)) {
+ if (!empty($this->url)) {
$profile->homepage = $this->url;
}
if (!$result) {
common_log_db_error($profile, 'UPDATE', __FILE__);
- $this->serverError(_('Couldn\'t save profile.'));
+ $this->serverError(_('Could not save profile.'));
return;
}