mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-13 13:21:43 +02:00
- 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:
+4
-29
@@ -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']))
|
||||
|
||||
Reference in New Issue
Block a user