From ba980e2c1f3d673ab07e6c3ac1c3657294f95708 Mon Sep 17 00:00:00 2001 From: Michael Johnston Date: Tue, 3 Sep 2013 23:58:46 -0400 Subject: filter by category fixes --- mod/channel.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'mod/channel.php') diff --git a/mod/channel.php b/mod/channel.php index aa158d330..5d3855269 100644 --- a/mod/channel.php +++ b/mod/channel.php @@ -90,6 +90,8 @@ function channel_content(&$a, $update = 0, $load = false) { require_once('include/permissions.php'); + $category = ((x($_REQUEST,'cat')) ? $_REQUEST['cat'] : ''); + $groups = array(); $o = ''; @@ -171,8 +173,9 @@ function channel_content(&$a, $update = 0, $load = false) { } else { + if(x($category)) { - $sql_extra .= protect_sprintf(file_tag_file_query('item',$category,'category')); + $sql_extra .= protect_sprintf(term_query('item', $category, TERM_CATEGORY)); } if($datequery) { -- cgit v1.2.3