]> git.p6c8.net - jirafeau_project.git/blobdiff - lib/functions.js
Fixes #15 admins can now choose an availability duration
[jirafeau_project.git] / lib / functions.js
index ccd13d353546413d673a94da84e90c231ac16317..e3800158e51241f291d2cb7d678599e6a4e885f2 100644 (file)
@@ -158,6 +158,8 @@ function classic_upload (url, file, time, password, one_time, upload_password)
                     d.setSeconds (d.getSeconds() + 604800);
                 else if (time == 'month')
                     d.setSeconds (d.getSeconds() + 2419200);
+                else if (time == 'year')
+                    d.setSeconds (d.getSeconds() + 29030400);
                 else
                     return;
                 show_link (url, res[0], res[1], res[2], d.toString());
@@ -316,6 +318,8 @@ function async_upload_end (code)
                     d.setSeconds (d.getSeconds() + 604800);
                 else if (async_global_time == 'month')
                     d.setSeconds (d.getSeconds() + 2419200);
+                else if (async_global_time == 'year')
+                    d.setSeconds (d.getSeconds() + 29030400);
                 else
                     return;
                 show_link (async_global_url, res[0], res[1], res[2], d.toString());

patrick-canterino.de