summaryrefslogtreecommitdiff
path: root/post.php
diff options
context:
space:
mode:
authorBenjamin Southall <applemansigloo@gmail.com>2017-03-05 02:18:28 +0900
committerBenjamin Southall <applemansigloo@gmail.com>2017-03-05 02:18:28 +0900
commitf36222c0e90dfffc50102bcd75e1af96221d8d7e (patch)
tree3d4b9f8eba2b67ecd3f828dc696b272c8a6fc27b /post.php
parentf3a5eb094079b8a2184e62ac6c727c36da658abd (diff)
Initial implementation of Feature Req: board-independent file size management #4. Using ['board_specific'][['uri']]['max_filesize'] as maximum file size if avaliable otherwise using config['max_filesize'] as default
Diffstat (limited to 'post.php')
-rw-r--r--post.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/post.php b/post.php
index 824d6855..2179b083 100644
--- a/post.php
+++ b/post.php
@@ -638,8 +638,17 @@ if (isset($_POST['delete'])) {
} else {
error(_('Unrecognized file size determination method.'));
}
+ $max_size = $config['max_filesize'];
- if ($size > $config['max_filesize'])
+ if (array_key_exists('board_specific',$config)){
+ if (array_key_exists($board['uri'],$config['board_specific'])){
+ if (array_key_exists('max_filesize',$config['board_specific'][$board['uri']])){
+ $max_size = $config['board_specific'][$board['uri']]['max_filesize'];
+ }
+ }
+ }
+
+ if ($size > $max_size)
error(sprintf3($config['error']['filesize'], array(
'sz' => number_format($size),
'filesz' => number_format($size),