Forums / Bug Reports / category filter dropdown - not checking category status - v1.3.9h

category filter dropdown - not checking category status - v1.3.9h

Views: 1,374

Results 1 to 1 of 1
23 Apr 2011, 9:01 AM
#1
donothing avatar

donothing

New Zenner

Join Date:
Nov 2009
Posts:
11
Plugin Contributions:
0

category filter dropdown - not checking category status - v1.3.9h

category filter dropdown not checking category status - v1.3.9h

The category filter drop down includes disabled categories.
I see this on category pages of the form:

http://example.com/main_page=index&manufacturers_id=<nnnn>

The SQL getting the categories appears to be defined in "includes/index_filters/default_filter.php".
Adding "and c.categories_status = 1" at line 155 seems to fix this.
Similarly with the other filter files too:

	music_genre_filter.php
	record_company_filter.php

Here's my attempt at a patch for default_filter.php:

--- a/includes/index_filters/default_filter.php
+++ b/includes/index_filters/default_filter.php
@@ -152,6 +152,7 @@ if (isset($_GET['alpha_filter_id']) && (int)$_GET['alpha_filter_id'] > 0) {
         and p2c.categories_id = cd.categories_id
         and cd.language_id = '" . (int)$_SESSION['languages_id'] . "'
         and p.manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "'
+	and c.categories_status = 1
       order by cd.categories_name";
     } else {
       $filterlist_sql= "select distinct m.manufacturers_id as id, m.manufacturers_name as name

donothingsuccessfully