summaryrefslogtreecommitdiffstats
path: root/web/template/pkgbase_details.php
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2019-10-27 02:08:03 +0100
committerLukas Fleischer <lfleischer@archlinux.org>2019-10-27 02:09:35 +0100
commit99a3ced73bbb15dc7f0113efa49464d50da67b9a (patch)
tree820339cb0fbb645ccc64eb879ff5d71253574257 /web/template/pkgbase_details.php
parentc1e5ffb12aaf12cc147e35283dae9e772e3a6345 (diff)
downloadaur-99a3ced73bbb15dc7f0113efa49464d50da67b9a.tar.gz
aur-99a3ced73bbb15dc7f0113efa49464d50da67b9a.tar.xz
Display popularity with less decimal points
Limit the display to two decimal points for packages with a popularity of at least 0.2. Suggested-by: Allan McRae <allan@archlinux.org> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'web/template/pkgbase_details.php')
-rw-r--r--web/template/pkgbase_details.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/web/template/pkgbase_details.php b/web/template/pkgbase_details.php
index 8a6e2b44..b2ce8cbe 100644
--- a/web/template/pkgbase_details.php
+++ b/web/template/pkgbase_details.php
@@ -108,7 +108,7 @@ endif;
</tr>
<tr>
<th><?= __('Popularity') . ': ' ?></th>
- <td><?= number_format($popularity, 6) ?></td>
+ <td><?= number_format($popularity, $popularity >= .2 ? 2 : 6) ?></td>
</tr>
<tr>
<th><?= __('First Submitted') . ': ' ?></th>