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

Этот коммит содержится в:
kondou 2013-09-06 13:46:50 +02:00
родитель 221bbd275c
Коммит d18a070a03
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -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');

Просмотреть файл

@ -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();