summaryrefslogtreecommitdiffstats
path: root/web/lib/pkgfuncs.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'web/lib/pkgfuncs.inc.php')
-rw-r--r--web/lib/pkgfuncs.inc.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/web/lib/pkgfuncs.inc.php b/web/lib/pkgfuncs.inc.php
index a5f24ba..f527578 100644
--- a/web/lib/pkgfuncs.inc.php
+++ b/web/lib/pkgfuncs.inc.php
@@ -545,8 +545,8 @@ function pkg_search_page($SID="") {
$q_select .= "Users.Username AS Maintainer,
PackageCategories.Category,
Packages.Name, Packages.Version, Packages.Description,
- PackageBases.NumVotes, Packages.ID, Packages.PackageBaseID,
- PackageBases.OutOfDateTS ";
+ PackageBases.NumVotes, PackageBases.Popularity, Packages.ID,
+ Packages.PackageBaseID, PackageBases.OutOfDateTS ";
$q_from = "FROM Packages
LEFT JOIN PackageBases ON (PackageBases.ID = Packages.PackageBaseID)
@@ -663,6 +663,9 @@ function pkg_search_page($SID="") {
case 'v':
$q_sort .= "NumVotes " . $order . ", ";
break;
+ case 'p':
+ $q_sort .= "Popularity " . $order . ", ";
+ break;
case 'w':
if ($SID) {
$q_sort .= "Voted " . $order . ", ";