From 3b9c6ba681a84fdeaf9d6dc32779dc87b225888a Mon Sep 17 00:00:00 2001 From: "Eric Johansson (neku)" Date: Sat, 20 Dec 2014 03:04:06 +0100 Subject: Update upload.php --- static/upload.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'static/upload.php') diff --git a/static/upload.php b/static/upload.php index 686c8d9..780eb5b 100644 --- a/static/upload.php +++ b/static/upload.php @@ -30,9 +30,7 @@ function generate_name ($file) { // If we run out of tries, throw an exception. Should be caught and JSONified. if ($tries-- == 0) throw new Exception('Gave up trying to find an unused name'); - $newname = ''; // Filename Generator: - - // Reddit critizces, I fix. You're welcome. (http://www.reddit.com/r/shittyprogramming/comments/2ppsqk/url_generator/) + //Random filename generator $startNumber = ord("a"); $endNumber = ord("z"); for ($i = 0; $i < 6; $i++) { -- cgit v1.2.3