summaryrefslogtreecommitdiffstats
path: root/web/lib
diff options
context:
space:
mode:
Diffstat (limited to 'web/lib')
-rw-r--r--web/lib/pkgs.inc21
1 files changed, 12 insertions, 9 deletions
diff --git a/web/lib/pkgs.inc b/web/lib/pkgs.inc
index b9d061e1..47dd06a3 100644
--- a/web/lib/pkgs.inc
+++ b/web/lib/pkgs.inc
@@ -104,16 +104,16 @@ function pkg_search_page($L="",$C="",$K="",$SB="",$O=0,$PP=25) {
print "</span></span><br />\n";
print " <select name='SB'>\n";
print " <option value=n";
- $SB == "n" ? print "selected> " : print "> ";
+ $SB == "n" ? print " selected> " : print "> ";
print __("Name")."\n";
print " <option value=c";
- $SB == "c" ? print "selected> " : print "> ";
+ $SB == "c" ? print " selected> " : print "> ";
print __("Category")."\n";
print " <option value=l";
- $SB == "l" ? print "selected> " : print "> ";
+ $SB == "l" ? print " selected> " : print "> ";
print __("Location")."\n";
- print " <option value=p";
- $SB == "p" ? print "selected> " : print "> ";
+ print " <option value=v";
+ $SB == "v" ? print " selected> " : print "> ";
print __("Votes")."\n";
print " </select>\n";
print "</td>\n";
@@ -123,13 +123,13 @@ function pkg_search_page($L="",$C="",$K="",$SB="",$O=0,$PP=25) {
print "</span></span><br />\n";
print " <select name='PP'>\n";
print " <option value=25";
- $PP == 25 ? print "selected> 25\n" : print "> 25\n";
+ $PP == 25 ? print " selected> 25\n" : print "> 25\n";
print " <option value=50";
- $PP == 50 ? print "selected> 50\n" : print "> 50\n";
+ $PP == 50 ? print " selected> 50\n" : print "> 50\n";
print " <option value=75";
- $PP == 75 ? print "selected> 75\n" : print "> 75\n";
+ $PP == 75 ? print " selected> 75\n" : print "> 75\n";
print " <option value=100";
- $PP == 100 ? print "selected> 100\n" : print "> 100\n";
+ $PP == 100 ? print " selected> 100\n" : print "> 100\n";
print " </select>\n";
print "</td>\n";
@@ -184,6 +184,9 @@ function pkg_search_page($L="",$C="",$K="",$SB="",$O=0,$PP=25) {
case 'l':
$q.= "ORDER BY LocationID ASC, Name ASC, CategoryID ASC ";
break;
+ case 'v':
+ $q.= "ORDER BY Votes DESC, Name ASC, CategoryID ASC ";
+ break;
default:
$q.= "ORDER BY Name ASC, LocationID ASC, CategoryID ASC ";
break;