mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-05-09 09:57:56 +03:00
feature #534, modernize admin homepage {wip}
* add tab * display the pending comments as a "message" (new blue box) * remove anything related to environment #532 * display stats as big icon + big number + caption * new stat "storage used"
This commit is contained in:
parent
41fe517590
commit
5dbc6c85a9
5 changed files with 200 additions and 121 deletions
|
@ -3006,3 +3006,29 @@ UPDATE '.IMAGES_TABLE.'
|
|||
;';
|
||||
pwg_query($query);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a more human friendly representation of big numbers. Like 17.8k instead of 17832
|
||||
*
|
||||
* @since 2.9
|
||||
* @param float $numbers
|
||||
*/
|
||||
function number_format_human_readable($numbers)
|
||||
{
|
||||
$readable = array("", "k", "M");
|
||||
$index = 0;
|
||||
|
||||
while ($numbers >= 1000)
|
||||
{
|
||||
$numbers /= 1000;
|
||||
$index++;
|
||||
|
||||
if ($index > count($readable) - 1)
|
||||
{
|
||||
$index--;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return number_format($numbers, 1).$readable[$index];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue