From: Jerome Jutteau Date: Thu, 16 Jul 2015 20:15:08 +0000 (+0200) Subject: fix broken js X-Git-Tag: 1.1~38 X-Git-Url: https://git.p6c8.net/jirafeau.git/commitdiff_plain/9112b0a083786d019161ec8296c2910527ae1570?hp=4cb33eda92e6812bb61b534817389ca5cd197027 fix broken js Signed-off-by: Jerome Jutteau --- diff --git a/lib/functions_v7.js b/lib/functions_v7.js index cb0ff73..0e17b50 100644 --- a/lib/functions_v7.js +++ b/lib/functions_v7.js @@ -182,7 +182,7 @@ function pop_failure (e) document.getElementById('send').style.display = ''; } -function add_time_string_to_date(d, time_string) +function add_time_string_to_date(d, time) { if(typeof(d) != 'object' || !(d instanceof Date)) { @@ -245,10 +245,8 @@ function classic_upload (url, file, time, password, one_time, upload_password) if (time != 'none') { var d = new Date(); - if(!add_time_string_to_date(d)) - { + if(!add_time_string_to_date(d, time)) return; - } show_link (url, res[0], res[1], res[2], d.toString()); } else @@ -416,7 +414,7 @@ function async_upload_end (code) if (async_global_time != 'none') { var d = new Date(); - if(!add_time_string_to_date(d)) + if(!add_time_string_to_date(d, async_global_time)) return; show_link (async_global_url, res[0], res[1], res[2], d.toString()); }