- 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
This commit is contained in:
z0rglub
2004-11-01 15:01:28 +00:00
parent fa9a5cd07b
commit b1db5e55ae
13 changed files with 233 additions and 214 deletions
+4 -29
View File
@@ -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']))