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
This commit is contained in:
parent
f3a5eb0940
commit
f36222c0e9
11
post.php
11
post.php
|
@ -638,8 +638,17 @@ if (isset($_POST['delete'])) {
|
||||||
} else {
|
} else {
|
||||||
error(_('Unrecognized file size determination method.'));
|
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(
|
error(sprintf3($config['error']['filesize'], array(
|
||||||
'sz' => number_format($size),
|
'sz' => number_format($size),
|
||||||
'filesz' => number_format($size),
|
'filesz' => number_format($size),
|
||||||
|
|
Loading…
Reference in New Issue