Commit e610360c authored by Lukas Fleischer's avatar Lukas Fleischer
Browse files

Show popularity in package base details



Fixes FS#45600.
Signed-off-by: Lukas Fleischer's avatarLukas Fleischer <lfleischer@archlinux.org>
parent 8db2ff5d
......@@ -140,7 +140,7 @@ function pkgbase_get_details($base_id) {
$dbh = DB::connect();
$q = "SELECT PackageBases.ID, PackageBases.Name, ";
$q.= "PackageBases.NumVotes, ";
$q.= "PackageBases.NumVotes, PackageBases.Popularity, ";
$q.= "PackageBases.OutOfDateTS, PackageBases.SubmittedTS, ";
$q.= "PackageBases.ModifiedTS, PackageBases.SubmitterUID, ";
$q.= "PackageBases.MaintainerUID, PackageBases.PackagerUID, ";
......
......@@ -431,8 +431,8 @@ function pkg_get_details($id=0) {
$dbh = DB::connect();
$q = "SELECT Packages.*, PackageBases.ID AS BaseID, ";
$q.= "PackageBases.Name AS BaseName, ";
$q.= "PackageBases.NumVotes, PackageBases.OutOfDateTS, ";
$q.= "PackageBases.Name AS BaseName, PackageBases.NumVotes, ";
$q.= "PackageBases.Popularity, PackageBases.OutOfDateTS, ";
$q.= "PackageBases.SubmittedTS, PackageBases.ModifiedTS, ";
$q.= "PackageBases.SubmitterUID, PackageBases.MaintainerUID, ";
$q.= "PackageBases.PackagerUID, ";
......
......@@ -25,6 +25,7 @@ if ($row["MaintainerUID"] !== NULL) {
}
$votes = $row['NumVotes'];
$popularity = $row['Popularity'];
# In case of wanting to put a custom message
$msg = __('unknown');
......@@ -253,6 +254,10 @@ endif;
<td><?= $votes ?></td>
<?php endif; ?>
</tr>
<tr>
<th><?= __('Popularity') . ': ' ?></th>
<td><?= number_format($popularity, 6) ?></td>
</tr>
<tr>
<th><?= __('First Submitted') . ': ' ?></th>
<td><?= $submitted_time ?></td>
......
......@@ -24,6 +24,7 @@ if ($row["MaintainerUID"] !== NULL) {
}
$votes = $row['NumVotes'];
$popularity = $row['Popularity'];
# In case of wanting to put a custom message
$msg = __('unknown');
......@@ -104,6 +105,10 @@ endif;
<td><?= $votes ?></td>
<?php endif; ?>
</tr>
<tr>
<th><?= __('Popularity') . ': ' ?></th>
<td><?= number_format($popularity, 6) ?></td>
</tr>
<tr>
<th><?= __('First Submitted') . ': ' ?></th>
<td><?= $submitted_time ?></td>
......
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