Commit 99a3ced7 authored by Lukas Fleischer's avatar Lukas Fleischer
Browse files

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's avatarAllan McRae <allan@archlinux.org>
Signed-off-by: Lukas Fleischer's avatarLukas Fleischer <lfleischer@archlinux.org>
parent c1e5ffb1
......@@ -259,7 +259,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>
......
......@@ -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>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment