mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 21:35:39 +00:00
Filtering on a category page returns to All Extensions. Bug 271738.
This commit is contained in:
parent
35005e3b32
commit
fa93983213
@ -41,12 +41,14 @@
|
||||
unset($typename);
|
||||
$types = array("E"=>"Extensions","T"=>"Themes","U"=>"Updates");
|
||||
$typename = $types["$type"];
|
||||
$current_category = $category;
|
||||
$category="";
|
||||
|
||||
echo"<ul id=\"nav\">\n";
|
||||
|
||||
if (!$category AND $index !="yes") {echo"<SPAN CLASS=\"selected\">"; }
|
||||
if (!$current_category AND $index !="yes") {echo"<SPAN CLASS=\"selected\">"; }
|
||||
echo"<li><A HREF=\"showlist.php?".uriparams()."&category=All\" TITLE=\"Show All ".ucwords($typename)." Alphabetically\"><strong>All Extensions</strong></A></li>\n";
|
||||
if (!$category AND $index !="yes") {echo"</SPAN>"; }
|
||||
if (!$current_category AND $index !="yes") {echo"</SPAN>"; }
|
||||
|
||||
// Object Categories
|
||||
$sql = "SELECT `CatName`,`CatDesc` FROM `t_categories` WHERE `CatType` = '$type' and `CatApp` = '$application' ORDER BY `CatName`";
|
||||
@ -54,35 +56,38 @@ $sql = "SELECT `CatName`,`CatDesc` FROM `t_categories` WHERE `CatType` = '$type'
|
||||
while ($row = mysql_fetch_array($sql_result)) {
|
||||
$catname = $row["CatName"];
|
||||
$catdesc = $row["CatDesc"];
|
||||
if (strtolower($category) == strtolower($catname)) {echo"<SPAN CLASS=\"selected\">"; }
|
||||
if (strtolower($current_category) == strtolower($catname)) {echo"<SPAN CLASS=\"selected\">"; }
|
||||
echo"<li><A HREF=\"showlist.php?".uriparams()."&category=$catname\" TITLE=\"$catdesc\"><strong>$catname</strong></A></li>\n";
|
||||
if (strtolower($category) == strtolower($catname)) {echo"</SPAN>"; }
|
||||
if (strtolower($current_category) == strtolower($catname)) {echo"</SPAN>"; }
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
$catname = "Editors Pick";
|
||||
$catdesc = ucwords($typename)." picked by the Mozilla Update Editors";
|
||||
if (strtolower($category) == strtolower($catname)) {echo"<SPAN CLASS=\"selected\">"; }
|
||||
if (strtolower($current_category) == strtolower($catname)) {echo"<SPAN CLASS=\"selected\">"; }
|
||||
echo"<li><A HREF=\"showlist.php?".uriparams()."&category=$catname\" TITLE=\"$catdesc\">Editor's Pick</A></li>\n";
|
||||
if (strtolower($category) == strtolower($catname)) {echo"</SPAN>"; }
|
||||
if (strtolower($current_category) == strtolower($catname)) {echo"</SPAN>"; }
|
||||
|
||||
$catname = "Popular";
|
||||
$catdesc = ucwords($typename)." downloaded the most";
|
||||
if (strtolower($category) == strtolower($catname)) {echo"<SPAN CLASS=\"selected\">"; }
|
||||
if (strtolower($current_category) == strtolower($catname)) {echo"<SPAN CLASS=\"selected\">"; }
|
||||
echo"<li><A HREF=\"showlist.php?".uriparams()."&category=$catname\" TITLE=\"$catdesc\">$catname</A></li>\n";
|
||||
if (strtolower($category) == strtolower($catname)) {echo"</SPAN>"; }
|
||||
if (strtolower($current_category) == strtolower($catname)) {echo"</SPAN>"; }
|
||||
|
||||
$catname = "Top Rated";
|
||||
$catdesc = ucwords($typename)." rated the highest";
|
||||
if (strtolower($category) == strtolower($catname)) {echo"<SPAN CLASS=\"selected\">"; }
|
||||
if (strtolower($current_category) == strtolower($catname)) {echo"<SPAN CLASS=\"selected\">"; }
|
||||
echo"<li><A HREF=\"showlist.php?".uriparams()."&category=$catname\" TITLE=\"$catdesc\">$catname</A></li>\n";
|
||||
if (strtolower($category) == strtolower($catname)) {echo"</SPAN>"; }
|
||||
if (strtolower($current_category) == strtolower($catname)) {echo"</SPAN>"; }
|
||||
|
||||
$catname = "Newest";
|
||||
$catdesc = "Most recent ".ucwords($typename);
|
||||
if (strtolower($category) == strtolower($catname)) {echo"<SPAN CLASS=\"selected\">"; }
|
||||
if (strtolower($current_category) == strtolower($catname)) {echo"<SPAN CLASS=\"selected\">"; }
|
||||
echo"<li><A HREF=\"showlist.php?".uriparams()."&category=$catname\" TITLE=\"$catdesc\">$catname</A></li>\n";
|
||||
if (strtolower($category) == strtolower($catname)) {echo"</SPAN>"; }
|
||||
if (strtolower($current_category) == strtolower($catname)) {echo"</SPAN>"; }
|
||||
|
||||
$category = $current_category;
|
||||
$current_category = "";
|
||||
?>
|
||||
</ul>
|
||||
</DIV>
|
||||
|
@ -208,6 +208,7 @@ echo"<br><br>\n";
|
||||
echo"<DIV class=\"key-point\">";
|
||||
echo"<FORM NAME=\"listviews\" METHOD=\"GET\" ACTION=\"showlist.php\">\n";
|
||||
echo"<INPUT NAME=\"application\" TYPE=\"hidden\" VALUE=\"$application\">\n";
|
||||
echo"<INPUT NAME=\"category\" TYPE=\"hidden\" VALUE=\"$category\">\n";
|
||||
//Items-Per-Page
|
||||
echo"Show/Page: ";
|
||||
$perpage = array("5","10","20","50");
|
||||
|
@ -38,12 +38,14 @@
|
||||
?>
|
||||
<div id="side">
|
||||
<?php
|
||||
$current_category = $category;
|
||||
$category="";
|
||||
|
||||
echo"<ul id=\"nav\">\n";
|
||||
|
||||
if (!$category AND $index !="yes") {echo"<SPAN CLASS=\"selected\">"; }
|
||||
if (!$current_category AND $index !="yes") {echo"<SPAN CLASS=\"selected\">"; }
|
||||
echo"<li><A HREF=\"showlist.php?".uriparams()."&category=All\" TITLE=\"Show All ".ucwords($typename)." Alphabetically\"><strong>All Themes</strong></A></li>\n";
|
||||
if (!$category AND $index !="yes") {echo"</SPAN>"; }
|
||||
if (!$current_category AND $index !="yes") {echo"</SPAN>"; }
|
||||
|
||||
// Object Categories
|
||||
$sql = "SELECT `CatName`,`CatDesc` FROM `t_categories` WHERE `CatType` = '$type' ORDER BY `CatName`";
|
||||
@ -51,36 +53,39 @@ $sql = "SELECT `CatName`,`CatDesc` FROM `t_categories` WHERE `CatType` = '$type'
|
||||
while ($row = mysql_fetch_array($sql_result)) {
|
||||
$catname = $row["CatName"];
|
||||
$catdesc = $row["CatDesc"];
|
||||
if (strtolower($category) == strtolower($catname)) {echo"<SPAN CLASS=\"selected\">"; }
|
||||
if (strtolower($current_category) == strtolower($catname)) {echo"<SPAN CLASS=\"selected\">"; }
|
||||
echo"<li><A HREF=\"showlist.php?".uriparams()."&category=$catname\" TITLE=\"$catdesc\"><strong>$catname</strong></A></li>\n";
|
||||
if (strtolower($category) == strtolower($catname)) {echo"</SPAN>"; }
|
||||
if (strtolower($current_category) == strtolower($catname)) {echo"</SPAN>"; }
|
||||
}
|
||||
?>
|
||||
<BR>
|
||||
<?php
|
||||
$catname = "Editors Pick";
|
||||
$catdesc = ucwords($typename)." picked by the Mozilla Update Editors";
|
||||
if (strtolower($category) == strtolower($catname)) {echo"<SPAN CLASS=\"selected\">"; }
|
||||
if (strtolower($current_category) == strtolower($catname)) {echo"<SPAN CLASS=\"selected\">"; }
|
||||
echo"<li><A HREF=\"showlist.php?".uriparams()."&category=$catname\" TITLE=\"$catdesc\">Editor's Pick</A></li>\n";
|
||||
if (strtolower($category) == strtolower($catname)) {echo"</SPAN>"; }
|
||||
if (strtolower($current_category) == strtolower($catname)) {echo"</SPAN>"; }
|
||||
|
||||
$catname = "Popular";
|
||||
$catdesc = ucwords($typename)." downloaded the most";
|
||||
if (strtolower($category) == strtolower($catname)) {echo"<SPAN CLASS=\"selected\">"; }
|
||||
if (strtolower($current_category) == strtolower($catname)) {echo"<SPAN CLASS=\"selected\">"; }
|
||||
echo"<li><A HREF=\"showlist.php?".uriparams()."&category=$catname\" TITLE=\"$catdesc\">$catname</A></li>\n";
|
||||
if (strtolower($category) == strtolower($catname)) {echo"</SPAN>"; }
|
||||
if (strtolower($current_category) == strtolower($catname)) {echo"</SPAN>"; }
|
||||
|
||||
$catname = "Top Rated";
|
||||
$catdesc = ucwords($typename)." rated the highest";
|
||||
if (strtolower($category) == strtolower($catname)) {echo"<SPAN CLASS=\"selected\">"; }
|
||||
if (strtolower($current_category) == strtolower($catname)) {echo"<SPAN CLASS=\"selected\">"; }
|
||||
echo"<li><A HREF=\"showlist.php?".uriparams()."&category=$catname\" TITLE=\"$catdesc\">$catname</A></li>\n";
|
||||
if (strtolower($category) == strtolower($catname)) {echo"</SPAN>"; }
|
||||
if (strtolower($current_category) == strtolower($catname)) {echo"</SPAN>"; }
|
||||
|
||||
$catname = "Newest";
|
||||
$catdesc = "Most recent ".ucwords($typename);
|
||||
if (strtolower($category) == strtolower($catname)) {echo"<SPAN CLASS=\"selected\">"; }
|
||||
if (strtolower($current_category) == strtolower($catname)) {echo"<SPAN CLASS=\"selected\">"; }
|
||||
echo"<li><A HREF=\"showlist.php?".uriparams()."&category=$catname\" TITLE=\"$catdesc\">$catname</A></li>\n";
|
||||
if (strtolower($category) == strtolower($catname)) {echo"</SPAN>"; }
|
||||
if (strtolower($current_category) == strtolower($catname)) {echo"</SPAN>"; }
|
||||
|
||||
$category = $current_category;
|
||||
$current_category = "";
|
||||
?>
|
||||
</ul>
|
||||
</DIV>
|
||||
|
@ -210,6 +210,7 @@ echo"<br><br>\n";
|
||||
echo"<DIV class=\"key-point\">";
|
||||
echo"<FORM NAME=\"listviews\" METHOD=\"GET\" ACTION=\"showlist.php\">\n";
|
||||
echo"<input name=\"application\" type=\"hidden\" value=\"$application\">\n";
|
||||
echo"<INPUT NAME=\"category\" TYPE=\"hidden\" VALUE=\"$category\">\n";
|
||||
|
||||
//Items-Per-Page
|
||||
echo"Show/Page: ";
|
||||
|
Loading…
Reference in New Issue
Block a user