From 2b5fa262b5feef836c2f71388fb348c7ba9867de Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Wed, 2 Jul 2025 12:02:25 +0300 Subject: [PATCH] feat: Restore `commify()` function --- library/includes/functions.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/library/includes/functions.php b/library/includes/functions.php index e3d387559..7dbcf0953 100644 --- a/library/includes/functions.php +++ b/library/includes/functions.php @@ -568,6 +568,14 @@ function url_arg($url, $arg, $value, $amp = '&') return $url . $anchor; } +/** + * Adds commas between every group of thousands + */ +function commify($number): string +{ + return number_format($number); +} + /** * Returns a size formatted in a more human-friendly format, rounded to the nearest GB, MB, KB.. */