diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-09-28 20:39:19 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-09-28 20:39:19 +0200 |
commit | 6979fd343b3c8b96a65f015cd2e9d86db492a1a4 (patch) | |
tree | 9b60ec8ba45395e58938c20c724d094ebb529b3a | |
parent | 57f37c876b59d11dae8b4325bed5fa57de52ecd4 (diff) | |
parent | 1097c3ce6368355c5240af8cc0fb14182a60d2c4 (diff) | |
download | nextcloud-server-6979fd343b3c8b96a65f015cd2e9d86db492a1a4.tar.gz nextcloud-server-6979fd343b3c8b96a65f015cd2e9d86db492a1a4.zip |
Merge branch 'master' into appframework-master
-rw-r--r-- | core/avatar/controller.php | 2 | ||||
-rw-r--r-- | core/js/jquery.avatar.js | 6 | ||||
-rw-r--r-- | settings/js/personal.js | 1 | ||||
-rw-r--r-- | tests/phpunit.xml.dist | 14 |
4 files changed, 21 insertions, 2 deletions
diff --git a/core/avatar/controller.php b/core/avatar/controller.php index 9f7c0517c4a..22693824461 100644 --- a/core/avatar/controller.php +++ b/core/avatar/controller.php @@ -33,7 +33,7 @@ class Controller { $image->show(); } else { // Signalizes $.avatar() to display a defaultavatar - \OC_JSON::success(); + \OC_JSON::success(array("data"=> array("displayname"=> \OC_User::getDisplayName($user)) )); } } diff --git a/core/js/jquery.avatar.js b/core/js/jquery.avatar.js index f1382fd7d2d..88a4c25d1ee 100644 --- a/core/js/jquery.avatar.js +++ b/core/js/jquery.avatar.js @@ -69,7 +69,11 @@ var url = OC.Router.generate('core_avatar_get', {user: user, size: size})+'?requesttoken='+oc_requesttoken; $.get(url, function(result) { if (typeof(result) === 'object') { - $div.placeholder(user); + if (result.data && result.data.displayname) { + $div.placeholder(user, result.data.displayname); + } else { + $div.placeholder(user); + } } else { if (ie8fix === true) { $div.html('<img src="'+url+'#'+Math.floor(Math.random()*1000)+'">'); diff --git a/settings/js/personal.js b/settings/js/personal.js index eaaca32f5d8..a923b475731 100644 --- a/settings/js/personal.js +++ b/settings/js/personal.js @@ -34,6 +34,7 @@ function changeDisplayName(){ $('#oldDisplayName').text($('#displayName').val()); // update displayName on the top right expand button $('#expandDisplayName').text($('#displayName').val()); + updateAvatar(); } else{ $('#newdisplayname').val(data.data.displayName); diff --git a/tests/phpunit.xml.dist b/tests/phpunit.xml.dist index 25dfc64cfeb..71a4ff2762c 100644 --- a/tests/phpunit.xml.dist +++ b/tests/phpunit.xml.dist @@ -11,7 +11,21 @@ <directory suffix=".php">..</directory> <exclude> <directory suffix=".php">../3rdparty</directory> + <directory suffix=".php">../apps/files/l10n</directory> + <directory suffix=".php">../apps/files_external/l10n</directory> + <directory suffix=".php">../apps/files_external/3rdparty</directory> + <directory suffix=".php">../apps/files_versions/l10n</directory> + <directory suffix=".php">../apps/files_encryption/l10n</directory> + <directory suffix=".php">../apps/files_encryption/3rdparty</directory> + <directory suffix=".php">../apps/files_sharing/l10n</directory> + <directory suffix=".php">../apps/files_trashbin/l10n</directory> + <directory suffix=".php">../apps/user_ldap/l10n</directory> + <directory suffix=".php">../apps/user_webdavauth/l10n</directory> <directory suffix=".php">../lib/MDB2</directory> + <directory suffix=".php">../lib/l10n</directory> + <directory suffix=".php">../core/l10n</directory> + <directory suffix=".php">../settings/l10n</directory> + <directory suffix=".php">../tests</directory> </exclude> </whitelist> </filter> |