From 565e4c7c867cd3b9a2a2265e3a206de219017cb0 Mon Sep 17 00:00:00 2001 From: Dasc3er <Dasc3er@users.noreply.github.com> Date: Thu, 25 Feb 2021 11:07:23 +0100 Subject: [PATCH] Fix conversione in GB per limiti sullo spazio --- include/top.php | 2 +- modules/stato_servizi/src/SpaceHook.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/top.php b/include/top.php index 72d0a6dab..23171f2df 100755 --- a/include/top.php +++ b/include/top.php @@ -576,7 +576,7 @@ if (!Auth::check() && (!empty($messages['info']) || !empty($messages['warning']) // Messaggio informativo per l'esaurimento dello spazio totale disponibile nel server $free_space = disk_free_space('.'); $space_limit = 1; // GB -if ($free_space < ($space_limit * 1024 ^ 3)) { +if ($free_space < ($space_limit * (1024 ** 3))) { echo ' <div class="callout callout-warning"> <h4> diff --git a/modules/stato_servizi/src/SpaceHook.php b/modules/stato_servizi/src/SpaceHook.php index a5b90d7a4..b4c75455b 100644 --- a/modules/stato_servizi/src/SpaceHook.php +++ b/modules/stato_servizi/src/SpaceHook.php @@ -44,7 +44,7 @@ class SpaceHook extends CachedManager $soft_quota = (float) setting('Soft quota'); // Impostazione in GB $space_limit = ($soft_quota / 100) * 95; // 95% dello spazio indicato - $space_limit = $space_limit * 1024 ^ 3; // Trasformazione in GB + $space_limit = $space_limit * (1024 ** 3); // Trasformazione in GB $message = tr('Attenzione: occupati _TOT_ dei _QUOTA_ previsti', [ '_TOT_' => FileSystem::formatBytes($osm_size),