summaryrefslogtreecommitdiff
path: root/static/upload.php
diff options
context:
space:
mode:
authorEric Johansson (neku) <neku@pomf.se>2014-12-20 03:04:06 +0100
committerEric Johansson (neku) <neku@pomf.se>2014-12-20 03:04:06 +0100
commit3b9c6ba681a84fdeaf9d6dc32779dc87b225888a (patch)
treeaedb40f55713907a0a3bc77ad2399aa9fb569718 /static/upload.php
parent6a3a495457940b702341426d9c2d922a60dc072e (diff)
Update upload.php
Diffstat (limited to 'static/upload.php')
-rw-r--r--static/upload.php4
1 files changed, 1 insertions, 3 deletions
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++) {