]> git.p6c8.net - jirafeau_project.git/commitdiff
fix broken js
authorJerome Jutteau <mojo@couak.net>
Thu, 16 Jul 2015 20:15:08 +0000 (22:15 +0200)
committerJerome Jutteau <mojo@couak.net>
Thu, 16 Jul 2015 20:15:08 +0000 (22:15 +0200)
Signed-off-by: Jerome Jutteau <mojo@couak.net>
lib/functions_v7.js

index cb0ff7354125e4e92fe806108f6b5a10a00dce86..0e17b50593fbff3722ee104638552240b0c8863d 100644 (file)
@@ -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());
             }

patrick-canterino.de