aboutsummaryrefslogtreecommitdiffstats
path: root/search.php
diff options
context:
space:
mode:
authorz0rglub <z0rglub@piwigo.org>2004-11-01 15:01:28 +0000
committerz0rglub <z0rglub@piwigo.org>2004-11-01 15:01:28 +0000
commitb1db5e55ae77c1ce386b25f8083a8bdd88607a96 (patch)
tree1d49d20a6cd52a82b1373c4e7784e931fd563eb0 /search.php
parentfa9a5cd07bc9931d1dffb9c54ab93ce3736ac506 (diff)
- 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
Diffstat (limited to 'search.php')
-rw-r--r--search.php33
1 files changed, 4 insertions, 29 deletions
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('&nbsp;',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, '&nbsp;', $selecteds );
+display_select_categories($structure,
+ '&nbsp;',
+ $selecteds,
+ 'category_option');
$categories_selected = '';
if (isset($_POST['categories-check']))