From: kondou Date: Fri, 6 Sep 2013 11:46:50 +0000 (+0200) Subject: Have the "notsquare" error as data, not as message X-Git-Tag: v6.0.0alpha2~178^2~5 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d18a070a0393ac3846053bcef1833dd01856e117;p=nextcloud-server.git Have the "notsquare" error as data, not as message --- diff --git a/core/avatar/controller.php b/core/avatar/controller.php index 55fdd7f74a0..bc0eb6eff3b 100644 --- a/core/avatar/controller.php +++ b/core/avatar/controller.php @@ -71,7 +71,7 @@ class Controller { if ($image->valid()) { \OC_Cache::set('tmpavatar', $image->data(), 7200); - \OC_JSON::error(array("data" => array("message" => "notsquare") )); + \OC_JSON::error(array("data" => "notsquare")); } else { $l = new \OC_L10n('core'); diff --git a/settings/js/personal.js b/settings/js/personal.js index e9220ef9039..d6e2d8fbca9 100644 --- a/settings/js/personal.js +++ b/settings/js/personal.js @@ -108,7 +108,7 @@ function avatarResponseHandler(data) { $warning.hide(); if (data.status === "success") { updateAvatar(); - } else if (data.data.message === "notsquare") { + } else if (data.data === "notsquare") { showAvatarCropper(); } else { $warning.show();