diff options
| author | Eliot Whalan <ewhal@pantsu.cat> | 2016-06-20 04:52:12 +0200 |
|---|---|---|
| committer | Eliot Whalan <ewhal@pantsu.cat> | 2016-06-20 04:52:12 +0200 |
| commit | 4bffe638dabf29660a8cd411ce24137f441c7c42 (patch) | |
| tree | f5b789e6d685ce65e5ed5b1c1a5fbbccea398706 /php/upload.php | |
| parent | a8f7a435d2f4f064f9937d7c41f5654236f002d1 (diff) | |
| parent | 3d38c13d8d977d420bfbca5ef8e642ea5e1102e9 (diff) | |
Merge branch 'id-charset'
Diffstat (limited to 'php/upload.php')
| -rw-r--r-- | php/upload.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/php/upload.php b/php/upload.php index 6ee85ad..9b58ba4 100644 --- a/php/upload.php +++ b/php/upload.php @@ -42,10 +42,10 @@ function generateName($file) 500); // HTTP status code "500 Internal Server Error" } - $chars = range('a', 'z'); + $chars = ID_CHARSET; $name = ''; for ($i = 0; $i < $length; ++$i) { - $name .= $chars[array_rand($chars)]; + $name .= $chars[mt_rand(0, strlen($chars))]; } // Add the extension to the file name |
