X-Git-Url: https://git.p6c8.net/jirafeau.git/blobdiff_plain/c793d074896f3b22e18d7c3ad45a517f5cebaa1c..2b4714c704f8ca5567c85a26e9202d5c9b3550e4:/lib/functions.php?ds=sidebyside diff --git a/lib/functions.php b/lib/functions.php index 1dd03e5..84f2a44 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -569,6 +569,14 @@ function check_errors($cfg) if (!is_writable(VAR_ASYNC)) { add_error(t('ASYNC_DIR_W'), VAR_ASYNC); } + + if ($cfg['enable_crypt'] && $cfg['litespeed_workaround']) { + add_error(t('INCOMPATIBLE_OPTIONS_W'), 'enable_crypt=true
litespeed_workaround=true'); + } + + if ($cfg['one_time_download'] && $cfg['litespeed_workaround']) { + add_error(t('INCOMPATIBLE_OPTIONS_W'), 'one_time_download=true
litespeed_workaround=true'); + } } /** @@ -1336,3 +1344,12 @@ function jirafeau_admin_csrf_field() { return ""; } + +function jirafeau_dir_size($dir) +{ + $size = 0; + foreach (glob(rtrim($dir, '/').'/*', GLOB_NOSORT) as $entry) { + $size += is_file($entry) ? filesize($entry) : jirafeau_dir_size($entry); + } + return $size; +}