From 15a0f8e4335307bf4b35305ccfe9ce200ddc8bbb Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Fri, 6 Feb 2015 16:27:42 +0100 Subject: [PATCH] Do not allow invalid default expire days Currently it is possible to set a negative number of days in which a public share expires. This results in public sharing not working and it undesired. Weird thing is that the API still lets you create shares and gives back an URL. However the id is "unkown" and the URL invalid. --- settings/js/admin.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/settings/js/admin.js b/settings/js/admin.js index 8f705b9048..3e17d7cc18 100644 --- a/settings/js/admin.js +++ b/settings/js/admin.js @@ -85,6 +85,13 @@ $(document).ready(function(){ }); }); + $('#shareapiExpireAfterNDays').change(function() { + var value = $(this).val(); + if (value <= 0) { + $(this).val("1"); + } + }); + $('#shareAPI input:not(#excludedGroups)').change(function() { var value = $(this).val(); if ($(this).attr('type') === 'checkbox') {