Share/Pool size calculation: show and allow percentage values

This commit is contained in:
bergware
2023-04-25 06:48:09 +02:00
parent 98c8f5cbc5
commit e69b1e7de4
2 changed files with 6 additions and 6 deletions

View File

@@ -28,9 +28,9 @@ $mode = ['Disabled','Hourly','Daily','Weekly','Monthly'];
$days = ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'];
function sanitize(&$val) {
$val = explode('.',str_replace([' ',','],['','.'],$val));
$last = array_pop($val);
$val = count($val) ? implode($val).".$last" : $last;
$data = explode('.',str_replace([' ',','],['','.'],$val));
$last = array_pop($data);
$val = count($data) ? implode($data).".$last" : $last;
}
function presetSpace($val) {
global $disk,$display;

View File

@@ -51,9 +51,9 @@ function globalInclude($name) {
return substr($name,0,4)=='disk' && (!$var['shareUserInclude'] || in_array($name,explode(',',$var['shareUserInclude'])));
}
function sanitize(&$val) {
$val = explode('.',str_replace([' ',','],['','.'],$val));
$last = array_pop($val);
$val = count($val) ? implode($val).".$last" : $last;
$data = explode('.',str_replace([' ',','],['','.'],$val));
$last = array_pop($data);
$val = count($data) ? implode($data).".$last" : $last;
}
function presetSpace($val) {
global $disks,$shares,$name,$pools,$display;