]> source.dussan.org Git - nextcloud-server.git/commitdiff
Have the "notsquare" error as data, not as message
authorkondou <kondou@ts.unde.re>
Fri, 6 Sep 2013 11:46:50 +0000 (13:46 +0200)
committerkondou <kondou@ts.unde.re>
Fri, 6 Sep 2013 11:46:50 +0000 (13:46 +0200)
core/avatar/controller.php
settings/js/personal.js

index 55fdd7f74a091f22c34bfbd53161a08bad8f549b..bc0eb6eff3bff571c26c9b3c3712e98f32f73a7d 100644 (file)
@@ -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');
 
index e9220ef903951f70f1c86449faba810ff704a62e..d6e2d8fbca9afce6ec026b738f2165d2f9a3b435 100644 (file)
@@ -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();