diff --git a/core/js/config.php b/core/js/config.php
index 52405725f2..b722425346 100644
--- a/core/js/config.php
+++ b/core/js/config.php
@@ -74,6 +74,7 @@ $array = array(
'session_keepalive' => \OCP\Config::getSystemValue('session_keepalive', true),
'version' => implode('.', OC_Util::getVersion()),
'versionstring' => OC_Util::getVersionString(),
+ 'enable_avatars' => \OC::$server->getConfig()->getSystemValue('enable_avatars', true),
)
),
"oc_appconfig" => json_encode(
diff --git a/core/js/share.js b/core/js/share.js
index e708ed587c..692ce0b0ba 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -358,9 +358,17 @@ OC.Share={
var html = '
';
if (data !== false && data.reshare !== false && data.reshare.uid_owner !== undefined) {
if (data.reshare.share_type == OC.Share.SHARE_TYPE_GROUP) {
- html += '
'+t('core', 'Shared with you and the group {group} by {owner}', {group: data.reshare.share_with, owner: data.reshare.displayname_owner})+' ';
+ html += '
'+t('core', 'Shared with you and the group {group} by {owner}', {group: data.reshare.share_with, owner: data.reshare.displayname_owner});
+ if (oc_config.enable_avatars === true) {
+ html += ' ';
+ }
+ html += '';
} else {
- html += '
'+t('core', 'Shared with you by {owner}', {owner: data.reshare.displayname_owner})+' ';
+ html += '
'+t('core', 'Shared with you by {owner}', {owner: data.reshare.displayname_owner});
+ if (oc_config.enable_avatars === true) {
+ html += ' ';
+ }
+ html += '';
}
html += '
';
// reduce possible permissions to what the original share allowed
@@ -439,7 +447,7 @@ OC.Share={
dropDownEl = dropDownEl.appendTo(appendTo);
//Get owner avatars
- if (data !== false && data.reshare !== false && data.reshare.uid_owner !== undefined) {
+ if (oc_config.enable_avatars === true && data !== false && data.reshare !== false && data.reshare.uid_owner !== undefined) {
$('#avatar-share-owner').avatar(data.reshare.uid_owner, 32);
}
@@ -656,10 +664,12 @@ OC.Share={
var html = '
';
var showCrudsButton;
html += '';
- if (shareType === OC.Share.SHARE_TYPE_USER) {
- html += '';
- } else {
- html += '';
+ if (oc_config.enable_avatars === true) {
+ if (shareType === OC.Share.SHARE_TYPE_USER) {
+ html += '';
+ } else {
+ html += '';
+ }
}
html += '' + escapeHTML(shareWithDisplayName) + '';
var mailNotificationEnabled = $('input:hidden[name=mailNotificationEnabled]').val();
@@ -692,7 +702,7 @@ OC.Share={
html += ' ';
html += '';
html = $(html).appendTo('#shareWithList');
- if (shareType === OC.Share.SHARE_TYPE_USER) {
+ if (oc_config.enable_avatars === true && shareType === OC.Share.SHARE_TYPE_USER) {
$('#avatar-' + escapeHTML(shareWith)).avatar(escapeHTML(shareWith), 32);
}
// insert cruds button into last label element