aboutsummaryrefslogtreecommitdiffstats
path: root/search.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2006-05-15 22:21:08 +0000
committerplegall <plg@piwigo.org>2006-05-15 22:21:08 +0000
commit875a6b15c89f168e15faf74af9efe180e1bb909e (patch)
tree60fcc0084adac992019a1357224b267a71b2ac89 /search.php
parenta8e574e2b5d5f5c1c819d0050629c8c2267b06b7 (diff)
merge -r1312:1313 from branch 1.6 to trunk (bug 373 fixed)
git-svn-id: http://piwigo.org/svn/trunk@1314 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'search.php')
-rw-r--r--search.php45
1 files changed, 28 insertions, 17 deletions
diff --git a/search.php b/search.php
index 0701eafa1..5131680d6 100644
--- a/search.php
+++ b/search.php
@@ -177,28 +177,39 @@ include(PHPWG_ROOT_PATH.'include/page_header.php');
$template->set_filenames( array('search'=>'search.tpl') );
+$template->assign_vars(
+ array(
+ 'TODAY_DAY' => date('d', time()),
+ 'TODAY_MONTH' => date('m', time()),
+ 'TODAY_YEAR' => date('Y', time()),
+ 'S_SEARCH_ACTION' => 'search.php',
+ 'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=search',
+ 'U_HOME' => make_index_url(),
+ )
+ );
+
$available_tags = get_available_tags(
isset($user['forbidden_categories'])
? explode(',', $user['forbidden_categories'])
: null
);
-usort( $available_tags, 'name_compare');
-
-$template->assign_vars(array(
- 'TODAY_DAY' => date('d', time()),
- 'TODAY_MONTH' => date('m', time()),
- 'TODAY_YEAR' => date('Y', time()),
- 'S_SEARCH_ACTION' => 'search.php',
- 'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=search',
- 'U_HOME' => make_index_url(),
-
- 'TAG_SELECTION' => get_html_tag_selection(
- $available_tags,
- 'tags',
- isset($_POST['tags']) ? $_POST['tags'] : array()
- ),
- )
-);
+
+if (count($available_tags) > 0)
+{
+ usort( $available_tags, 'name_compare');
+
+ $template->assign_block_vars('tags', array());
+
+ $template->assign_vars(
+ array(
+ 'TAG_SELECTION' => get_html_tag_selection(
+ $available_tags,
+ 'tags',
+ isset($_POST['tags']) ? $_POST['tags'] : array()
+ ),
+ )
+ );
+}
//------------------------------------------------------------- categories form
$query = '