From 9362801a48c6e88fcc9bd56e69ba044f718c6b74 Mon Sep 17 00:00:00 2001 From: rub Date: Mon, 15 Jan 2007 00:09:14 +0000 Subject: There are no filter enabled if filter configuration is empty (no icon, no functions, ...) New system for the filter page configuration View mode flat_recent_cat becomes flat_cat (recent period is removed because global filter is sufficient) Recent period of global filter must be defined "after" start parameter (default value is $user['recent_period']). git-svn-id: http://piwigo.org/svn/trunk@1722 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/menubar.inc.php | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) (limited to 'include/menubar.inc.php') diff --git a/include/menubar.inc.php b/include/menubar.inc.php index a57db5ea7..dce77aef6 100644 --- a/include/menubar.inc.php +++ b/include/menubar.inc.php @@ -65,26 +65,28 @@ foreach ($conf['links'] as $url => $label) } //------------------------------------------------------------------------ filter -if ($filter['enabled']) +if (!empty($conf['filter_pages']) and get_filter_page_value('used')) { - $template->assign_block_vars( - 'stop_filter', - array( - 'URL' => add_url_params(make_index_url(array()), array('filter' => 'stop')) - ) - ); -} -else -{ - $template->assign_block_vars( - 'start_filter', - array( - 'URL' => add_url_params(make_index_url(array()), array('filter' => 'start')) - ) - ); + if ($filter['enabled']) + { + $template->assign_block_vars( + 'stop_filter', + array( + 'URL' => add_url_params(make_index_url(array()), array('filter' => 'stop')) + ) + ); + } + else + { + $template->assign_block_vars( + 'start_filter', + array( + 'URL' => add_url_params(make_index_url(array()), array('filter' => 'start-'.$user['recent_period'])) + ) + ); + } } - //------------------------------------------------------------------------ tags if ('tags' == $page['section']) { -- cgit v1.2.3