From b1db5e55ae77c1ce386b25f8083a8bdd88607a96 Mon Sep 17 00:00:00 2001 From: z0rglub Date: Mon, 1 Nov 2004 15:01:28 +0000 Subject: - synchronization interface redesigned : a form lets user choose option of dirs/files/metadata sync on all categories or a defined one (including subcategories) - database sync is only available through update.php git-svn-id: http://piwigo.org/svn/trunk@589 68402e56-0260-453c-a942-63ccdbb3a9ee --- search.php | 33 ++++----------------------------- 1 file changed, 4 insertions(+), 29 deletions(-) (limited to 'search.php') diff --git a/search.php b/search.php index 02d0fb252..c9f9e2c99 100644 --- a/search.php +++ b/search.php @@ -338,38 +338,10 @@ foreach ($datefields as $datefield) display_3dates($datefield); } //------------------------------------------------------------- categories form -function display_search_categories($categories, $indent, $selecteds) -{ - global $template,$user; - - foreach ( $categories as $category ) - { - if (!in_array($category['id'], $user['restrictions'])) - { - $selected = ''; - if (in_array($category['id'], $selecteds)) - { - $selected = ' selected="selected"'; - } - - $template->assign_block_vars( - 'category_option', - array('SELECTED'=>$selected, - 'VALUE'=>$category['id'], - 'OPTION'=>$indent.'- '.$category['name'] - )); - - display_search_categories( $category['subcats'], - $indent.str_repeat(' ',3), - $selecteds ); - } - } -} // 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; -$page['plain_structure'] = get_user_plain_structure(true); $structure = create_user_structure(''); $selecteds = array(); @@ -377,7 +349,10 @@ if (isset($_POST['submit'])) { $selecteds = $_POST['cat']; } -display_search_categories( $structure, ' ', $selecteds ); +display_select_categories($structure, + ' ', + $selecteds, + 'category_option'); $categories_selected = ''; if (isset($_POST['categories-check'])) -- cgit v1.2.3