summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2017-09-20 18:14:00 +0200
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2017-09-20 18:20:58 +0200
commitea10a1292a7674149581b4332fb0849cd84cf467 (patch)
tree4d32d7e4f660cdc48452b7a8fee6e6036d01c084 /core
parentff71dd07a6db2b9fb60e1b756eac84ef103cabe0 (diff)
downloadnextcloud-server-ea10a1292a7674149581b4332fb0849cd84cf467.tar.gz
nextcloud-server-ea10a1292a7674149581b4332fb0849cd84cf467.zip
Use "?" instead of user ID as seed for the image placeholder
The seed of the image placeholder is needed to generate the background color of the image, but as the background color is later overriden any seed could be used. When no text is explicitly given the seed is used as text too, so there is no need to pass the user ID and simply using "?" as seed is enough. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'core')
-rw-r--r--core/js/jquery.avatar.js2
-rw-r--r--core/js/tests/specs/jquery.avatarSpec.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/core/js/jquery.avatar.js b/core/js/jquery.avatar.js
index 5813a80646f..c8ac70ac692 100644
--- a/core/js/jquery.avatar.js
+++ b/core/js/jquery.avatar.js
@@ -113,7 +113,7 @@
$div.imageplaceholder(user, result.data.displayname);
} else {
// User does not exist
- $div.imageplaceholder(user, '?');
+ $div.imageplaceholder('?');
$div.css('background-color', '#b9b9b9');
}
} else {
diff --git a/core/js/tests/specs/jquery.avatarSpec.js b/core/js/tests/specs/jquery.avatarSpec.js
index 87767c8bc8f..d7305736690 100644
--- a/core/js/tests/specs/jquery.avatarSpec.js
+++ b/core/js/tests/specs/jquery.avatarSpec.js
@@ -99,7 +99,7 @@ describe('jquery.avatar tests', function() {
})
);
- expect($div.imageplaceholder).toHaveBeenCalledWith('foo', '?');
+ expect($div.imageplaceholder).toHaveBeenCalledWith('?');
expect($div.css).toHaveBeenCalledWith('background-color', '#b9b9b9');
});