From cab8f98c4ab88a0ad05f2359099c883675319084 Mon Sep 17 00:00:00 2001 From: rub Date: Thu, 21 Dec 2006 21:38:20 +0000 Subject: Feature Issue ID 0000601: Filter all public pages with only recent elements It's a finalized version. Obsolete code of draft are removed. You can filter categories and images with recent date period on your screen selection. In the future, filter could be easy done on other type data (plugin?) You can flat categories and sub-categories with a recent date period of your choice. Next, perhaps, a panel to choice recent date for the 2 features. On draft, there have problem with MySql 5, be careful! Css problem not resolved: - Menu "Categories" is bad centered - Icon on dark too on the top git-svn-id: http://piwigo.org/svn/trunk@1677 68402e56-0260-453c-a942-63ccdbb3a9ee --- search.php | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'search.php') diff --git a/search.php b/search.php index 1a482ec77..4bd64106a 100644 --- a/search.php +++ b/search.php @@ -187,11 +187,7 @@ $template->assign_vars( ) ); -$available_tags = get_available_tags( - isset($user['forbidden_categories']) - ? explode(',', $user['forbidden_categories']) - : null - ); +$available_tags = get_available_tags(); if (count($available_tags) > 0) { @@ -213,13 +209,16 @@ if (count($available_tags) > 0) //------------------------------------------------------------- categories form $query = ' SELECT name,id,date_last,nb_images,global_rank,uppercats - FROM '.CATEGORIES_TABLE; -if ($user['forbidden_categories'] != '') -{ - $query.= ' - WHERE id NOT IN ('.$user['forbidden_categories'].')'; -} -$query.= ' + FROM '.CATEGORIES_TABLE.' +'.get_sql_condition_FandF + ( + array + ( + 'forbidden_categories' => 'id', + 'visible_categories' => 'id' + ), + 'WHERE' + ).' ;'; $selecteds = array(); -- cgit v1.2.3