aboutsummaryrefslogtreecommitdiffstats
path: root/search.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2004-11-23 22:31:24 +0000
committerplegall <plg@piwigo.org>2004-11-23 22:31:24 +0000
commitf0fcd1eedc26c0d36b6b0556b9f53124ba9f889f (patch)
tree0502dbd43c04199ec2ba45913985fee86793491a /search.php
parent5197779bba12db45508becc910d5886d77f3675d (diff)
- global categories' options : instead of N horizontal tabs on a single
page, N options in the left menu (but the same backend) - categories.global_rank : new calculated field. It gives a global rank of the category among all others (updated during ordering) - category.php page : menu is generated faster thanks to categories.global_rank, recursivity becomes useless :-) - new function to display select box with a set of categories : display_select_cat_wrapper - cat_options : instead of using 1 multiselect for true/false items, using 1 multiselect for true, and another one for false. The form provides buttons with arrows to switch categories from one multiselect to another - deletion of obsolete function display_categories (working with the old template system) - deletion of obsolete functions get_user_plain_structure, create_user_structure, get_user_subcat_ids, update_structure, count_images : useless thanks to global_rank git-svn-id: http://piwigo.org/svn/trunk@614 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'search.php')
-rw-r--r--search.php22
1 files changed, 11 insertions, 11 deletions
diff --git a/search.php b/search.php
index 5fb9c9b25..e38255308 100644
--- a/search.php
+++ b/search.php
@@ -338,22 +338,22 @@ foreach ($datefields as $datefield)
display_3dates($datefield);
}
//------------------------------------------------------------- categories form
-// this is a trick : normally, get_user_plain_structure is used to create
-// the categories structure for menu (in category.php) display, but here, we
-// want all categories to be shown...
-$user['expand'] = true;
-$structure = create_user_structure('');
-
+$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.= '
+;';
$selecteds = array();
if (isset($_POST['submit']))
{
$selecteds = $_POST['cat'];
}
-display_select_categories($structure,
- '&nbsp;',
- $selecteds,
- 'category_option',
- array());
+display_select_cat_wrapper($query, $selecteds, 'category_option', false);
$categories_selected = '';
if (isset($_POST['categories-check']))