Dear Roland, sorry, but your solutions did not lead to readable numbers. I think numbers should be displayed always with unit T,G,M. Example: 10T-1 should be displayed as 10239M and not as 10737418239 10T+1 should be displayed as 10T and not as 10737418241
I propose:
1. in function initQuotas()
add
$singleQuota[1] = $this->addBlockUnits($singleQuota[1]);
2. change function addBlockUnits()
to
if (empty($value) || !get_preg($value, 'digit')) {
return $value;
}
if (($value >= 10*$tebibytes) || (($value % $tebibytes) === 0) )
return ((int)($value / $tebibytes)) . 'T';
else if (($value >= $tebibytes))
return ((int)($value / $gibibytes)) . 'G';
else if (($value >= 10* $gibibytes) || (($value % $gibibytes) === 0))
return ((int)($value / $gibibytes)) . 'G';
else if (($value >= $gibibytes))
return ((int)($value / $mebibytes)) . 'M';
else if(($value >= 10* $mebibytes) || (($value % $mebibytes) === 0))
return ( (int)($value / $mebibytes)) . 'M';
else
return $value;
3. analog inodes
--
Mit freundlichen Grüßen
##------------ IT Physik / Georg August Universitaet Goettingen ---------
## Tel:+49 551 3929363 http://www.theorie.physik.uni-goettingen.de/jh.html
##
## Rechtschreibfehler sind Absicht und dienen der allgemeinen Belustigung.
##-------------- Verschtehen Sie, Isch habe garrr kein Wooerd! -----------
On Fri, 2020-06-12 at 11:14 +0200, Juergen Holm wrote:
> Hi Roland,
>
> yes this works also.
>
> _______________________________________________
> Lam-public mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/lam-public
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Lam-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/lam-public
