diff --git a/core/js/share.js b/core/js/share.js
index 62271a43ce..9af86c7e19 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -342,12 +342,8 @@ OC.Share={
html += ' ';
var defaultExpireMessage = '';
- if ((itemType === 'folder' || itemType === 'file') && oc_appconfig.core.defaultExpireDateEnabled) {
- if (oc_appconfig.core.defaultExpireDateEnforced) {
- defaultExpireMessage = t('core', 'The public link will expire no later than {days} days after it is created', {'days': escapeHTML(oc_appconfig.core.defaultExpireDate)}) + ' ';
- } else {
- defaultExpireMessage = t('core', 'By default the public link will expire after {days} days', {'days': escapeHTML(oc_appconfig.core.defaultExpireDate)}) + ' ';
- }
+ if ((itemType === 'folder' || itemType === 'file') && oc_appconfig.core.defaultExpireDateEnforced) {
+ defaultExpireMessage = t('core', 'The public link will expire no later than {days} days after it is created', {'days': escapeHTML(oc_appconfig.core.defaultExpireDate)}) + ' ';
}
html += '';