summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
Diffstat (limited to 'static')
-rw-r--r--static/upload.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/static/upload.php b/static/upload.php
index 824ffca..13a9133 100644
--- a/static/upload.php
+++ b/static/upload.php
@@ -14,7 +14,7 @@ function generate_name ($file) {
// We start at N retries, and --N until we give up
$tries = POMF_FILES_RETRIES;
// We rip out the extension using pathinfo
- // TODO: figure out a solution for .tar.gz and similar files? This has now been ghetto fixed!
+ // TODO: figure out a solution for .tar.gz and similar files? This has now been ghetto fixed, read below!
$ext = pathinfo($file->name, PATHINFO_EXTENSION);
// Take the first 3 chars of the CRC32 checksum
$hashchunk = substr($file->get_crc32(), 0, 3);
@@ -28,7 +28,7 @@ function generate_name ($file) {
$newname .= $hashchunk; // + first 3 of crc32b checksum
$newname .= chr(mt_rand(ord("a"), ord("z"))); // + random lowercase letter
- // To add a dot or not to add a dot ghetto style
+ // To add a dot or not after a file which has no extension, ghetto style naturally!
$ass = pathinfo($file->name, PATHINFO_FILENAME);
$pos = strrpos($ass, '.');
if ($pos === false) {