X-Git-Url: https://git.p6c8.net/jirafeau_mojo42.git/blobdiff_plain/c793d074896f3b22e18d7c3ad45a517f5cebaa1c..a9ab012f12e417222a082bbb80515c781601e7a2:/lib/functions.php?ds=inline
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;
+}