Browse Source

Have the "notsquare" error as data, not as message

tags/v6.0.0alpha2
kondou 11 years ago
parent
commit
d18a070a03
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      core/avatar/controller.php
  2. 1
    1
      settings/js/personal.js

+ 1
- 1
core/avatar/controller.php View 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');


+ 1
- 1
settings/js/personal.js View 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();

Loading…
Cancel
Save