summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2015-06-15 12:29:24 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2015-06-15 22:37:45 +0200
commit2284cb3e4a2ef86b1a2a548ed0b4431ace978d87 (patch)
tree64fc20eea94200e6dde3c3feb4f62e5e043606da /web
parent74c7cf70ffe49d907df13521edd760467d0602b0 (diff)
downloadaurweb-2284cb3e4a2ef86b1a2a548ed0b4431ace978d87.tar.xz
Store 10 significant digits of the popularity score
Even if we only display two digits after the decimal point, storing more digits internally allows us to order the search results more accurately. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'web')
-rw-r--r--web/template/pkg_search_results.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/web/template/pkg_search_results.php b/web/template/pkg_search_results.php
index 5c8f73e..7134f2d 100644
--- a/web/template/pkg_search_results.php
+++ b/web/template/pkg_search_results.php
@@ -54,7 +54,7 @@ if (!$result): ?>
<td><a href="<?= htmlspecialchars(get_pkg_uri($row["Name"]), ENT_QUOTES); ?>"><?= htmlspecialchars($row["Name"]) ?></a></td>
<td<?php if ($row["OutOfDateTS"]): ?> class="flagged"<?php endif; ?>><?= htmlspecialchars($row["Version"]) ?></td>
<td><?= $row["NumVotes"] ?></td>
- <td><?= $row["Popularity"] ?></td>
+ <td><?= number_format($row["Popularity"], 2) ?></td>
<?php if ($SID): ?>
<td>
<?php if (isset($row["Voted"])): ?>