diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-03-05 13:12:58 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-03-05 13:12:58 +0100 |
commit | 80393d9c0ff44c0614960cc6b7b7d8cc5bd17743 (patch) | |
tree | 874bc3d9449c8036fcc4f6d93697f800cfddc03a /core/js | |
parent | 7edd8df07f50b0a556889b276eaeeab37cb175be (diff) | |
download | nextcloud-server-80393d9c0ff44c0614960cc6b7b7d8cc5bd17743.tar.gz nextcloud-server-80393d9c0ff44c0614960cc6b7b7d8cc5bd17743.zip |
Do not allow setting an expiration date in the past
Fix #7297
Diffstat (limited to 'core/js')
-rw-r--r-- | core/js/share.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/js/share.js b/core/js/share.js index 0939259b7da..0b65e153093 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -720,7 +720,11 @@ $(document).ready(function() { var itemSource = $('#dropdown').data('item-source'); $.post(OC.filePath('core', 'ajax', 'share.php'), { action: 'setExpirationDate', itemType: itemType, itemSource: itemSource, date: $(this).val() }, function(result) { if (!result || result.status !== 'success') { - OC.dialogs.alert(t('core', 'Error setting expiration date'), t('core', 'Error')); + if (!result.data.message) { + OC.dialogs.alert(t('core', 'Error setting expiration date'), t('core', 'Error')); + } else { + OC.dialogs.alert(result.data.message, t('core', 'Error')); + } } }); }); |