summaryrefslogtreecommitdiff
path: root/post.php
diff options
context:
space:
mode:
Diffstat (limited to 'post.php')
-rw-r--r--post.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/post.php b/post.php
index 83f35b9d..3993ef5a 100644
--- a/post.php
+++ b/post.php
@@ -311,7 +311,10 @@
if($post['has_file']) {
$post['extension'] = strtolower(substr($post['filename'], strrpos($post['filename'], '.') + 1));
- $post['file_id'] = time() . rand(100, 999);
+ if(isset($config['filename_func']))
+ $post['file_id'] = $config['filename_func']($post);
+ else
+ $post['file_id'] = time() . rand(100, 999);
$post['file'] = $board['dir'] . $config['dir']['img'] . $post['file_id'] . '.' . $post['extension'];
$post['thumb'] = $board['dir'] . $config['dir']['thumb'] . $post['file_id'] . '.' . ($config['thumb_ext'] ? $config['thumb_ext'] : $post['extension']);
}