aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin.php5
-rw-r--r--admin/cat_list.php30
-rw-r--r--admin/update.php190
-rw-r--r--include/constants.php5
-rw-r--r--include/functions_category.inc.php82
-rw-r--r--include/page_tail.php3
-rw-r--r--include/template.php2
-rw-r--r--language/en_UK.iso-8859-1/admin.lang.php10
-rw-r--r--search.php33
-rw-r--r--template/default/admin.tpl7
-rw-r--r--template/default/admin/cat_list.tpl18
-rw-r--r--template/default/admin/infos_images.tpl7
-rw-r--r--template/default/admin/update.tpl53
13 files changed, 232 insertions, 213 deletions
diff --git a/admin.php b/admin.php
index a7d9041f9..ae8d22231 100644
--- a/admin.php
+++ b/admin.php
@@ -192,7 +192,7 @@ $template->assign_vars(array(
'L_GROUPS'=>$lang['groups'],
'L_AUTH'=>$lang['permissions'],
'L_UPDATE'=>$lang['update'],
-
+
'U_CONFIG_GENERAL'=>add_session_id($link_start.'configuration&section=general' ),
'U_CONFIG_COMMENTS'=>add_session_id($link_start.'configuration&section=comments' ),
'U_CONFIG_DISPLAY'=>add_session_id($link_start.'configuration&section=default' ),
@@ -207,8 +207,7 @@ $template->assign_vars(array(
'U_UPLOAD'=>add_session_id($link_start.'admin_upload' ),
'U_WAITING'=>add_session_id($link_start.'waiting' ),
'U_COMMENTS'=>add_session_id($link_start.'comments' ),
- 'U_CAT_UPDATE'=>add_session_id($link_start.'update&update=cats' ),
- 'U_IMG_UPDATE'=>add_session_id($link_start.'update&update=all' ),
+ 'U_CAT_UPDATE'=>add_session_id($link_start.'update'),
'U_THUMBNAILS'=>add_session_id($link_start.'thumbnail' ),
'U_HISTORY'=>add_session_id($link_start.'stats' ),
'U_FAQ'=>add_session_id($link_start.'help' ),
diff --git a/admin/cat_list.php b/admin/cat_list.php
index dc69a5179..a1746b106 100644
--- a/admin/cat_list.php
+++ b/admin/cat_list.php
@@ -270,16 +270,6 @@ UPDATE '.CATEGORIES_TABLE.'
}
reset($categories);
// +-----------------------------------------------------------------------+
-// | metadata update |
-// +-----------------------------------------------------------------------+
-if (isset($_GET['metadata']) and is_numeric($_GET['metadata']))
-{
- $files = get_filelist($_GET['metadata'], true, false);
- update_metadata($files);
- array_push($infos,
- count($files).' '.$lang['cat_list_update_metadata_confirmation']);
-}
-// +-----------------------------------------------------------------------+
// | template initialization |
// +-----------------------------------------------------------------------+
$template->set_filenames(array('categories'=>'admin/cat_list.tpl'));
@@ -297,7 +287,6 @@ $template->assign_vars(array(
'L_EDIT'=>$lang['edit'],
'L_INFO_IMG'=>$lang['cat_image_info'],
'L_DELETE'=>$lang['delete'],
- 'L_UPDATE_METADATA'=>$lang['cat_list_update_metadata']
));
$tpl = array('cat_first','cat_last');
@@ -396,13 +385,7 @@ SELECT COUNT(id) AS nb_sub_cats
'U_CAT_DELETE'=>add_session_id($self_url.'&delete='.$category['id']),
'U_INFO_IMG'
- => add_session_id($base_url.'infos_images&cat_id='.$category['id']),
-
- 'U_CAT_UPDATE'=>
- add_session_id($base_url.'update&update='.$category['id']),
-
- 'U_CAT_METADATA'=>
- add_session_id($cat_list_url.'&metadata='.$category['id'])
+ => add_session_id($base_url.'infos_images&cat_id='.$category['id'])
));
if (!empty($category['dir']))
@@ -413,17 +396,6 @@ SELECT COUNT(id) AS nb_sub_cats
{
$template->assign_block_vars('category.virtual' ,array());
}
-
- if ($category['site_id'] == 1 and !empty($category['dir']))
- {
- $template->assign_block_vars('category.update' ,array());
- $template->assign_block_vars('category.metadata' ,array());
- }
- else
- {
- $template->assign_block_vars('category.no_update' ,array());
- $template->assign_block_vars('category.no_metadata' ,array());
- }
if ($category['nb_images'] > 0)
{
diff --git a/admin/update.php b/admin/update.php
index 10e1af8b3..8cfd4ad34 100644
--- a/admin/update.php
+++ b/admin/update.php
@@ -32,7 +32,10 @@ if( !defined("PHPWG_ROOT_PATH") )
include_once( PHPWG_ROOT_PATH.'admin/include/isadmin.inc.php');
define('CURRENT_DATE', "'".date('Y-m-d')."'");
-//------------------------------------------------------------------- functions
+// +-----------------------------------------------------------------------+
+// | functions |
+// +-----------------------------------------------------------------------+
+
/**
* order categories (update categories.rank database field)
*
@@ -118,7 +121,7 @@ SELECT id,dir FROM '.CATEGORIES_TABLE.'
// 2. we search pictures of the category only if the update is for all
// or a cat_id is specified
- if (isset($page['cat']) or $_GET['update'] == 'all')
+ if ($_POST['sync'] == 'files')
{
$output.= insert_local_element($cat_directory, $id_uppercat);
}
@@ -239,27 +242,32 @@ UPDATE '.CATEGORIES_TABLE.'
}
// Recursive call on the sub-categories (not virtual ones)
- $query = '
+ if (!isset($_POST['cat'])
+ or (isset($_POST['subcats-included'])
+ and $_POST['subcats-included'] == 1))
+ {
+ $query = '
SELECT id
FROM '.CATEGORIES_TABLE.'
WHERE site_id = 1
';
- if (!is_numeric($id_uppercat))
- {
- $query.= ' AND id_uppercat IS NULL';
- }
- else
- {
- $query.= ' AND id_uppercat = '.$id_uppercat;
- }
- $query.= '
+ if (!is_numeric($id_uppercat))
+ {
+ $query.= ' AND id_uppercat IS NULL';
+ }
+ else
+ {
+ $query.= ' AND id_uppercat = '.$id_uppercat;
+ }
+ $query.= '
AND dir IS NOT NULL'; // virtual categories not taken
- $query.= '
+ $query.= '
;';
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- $output.= insert_local_category($row['id']);
+ $result = pwg_query($query);
+ while ($row = mysql_fetch_array($result))
+ {
+ $output.= insert_local_category($row['id']);
+ }
}
if (is_numeric($id_uppercat))
@@ -542,50 +550,87 @@ INSERT INTO '.IMAGE_CATEGORY_TABLE.'
}
return $output;
}
-//----------------------------------------------------- template initialization
+// +-----------------------------------------------------------------------+
+// | template initialization |
+// +-----------------------------------------------------------------------+
$template->set_filenames(array('update'=>'admin/update.tpl'));
-$template->assign_vars(array(
- 'L_UPDATE_TITLE'=>$lang['update_default_title'],
- 'L_CAT_UPDATE'=>$lang['update_only_cat'],
- 'L_ALL_UPDATE'=>$lang['update_all'],
- 'L_RESULT_UPDATE'=>$lang['update_part_research'],
- 'L_NB_NEW_ELEMENTS'=>$lang['update_nb_new_elements'],
- 'L_NB_NEW_CATEGORIES'=>$lang['update_nb_new_categories'],
- 'L_NB_DEL_ELEMENTS'=>$lang['update_nb_del_elements'],
- 'L_NB_DEL_CATEGORIES'=>$lang['update_nb_del_categories'],
- 'L_UPDATE_SYNC_METADATA_QUESTION'=>$lang['update_sync_metadata_question'],
-
- 'U_CAT_UPDATE'=>add_session_id(PHPWG_ROOT_PATH.'admin.php?page=update&update=cats'),
- 'U_ALL_UPDATE'=>add_session_id(PHPWG_ROOT_PATH.'admin.php?page=update&update=all')
- ));
-//-------------------------------------------- introduction : choices of update
-// Display choice if "update" var is not specified
-if (!isset($_GET['update']))
+$base_url = PHPWG_ROOT_PATH.'admin.php?page=update';
+
+$template->assign_vars(
+ array(
+ 'L_SUBMIT'=>$lang['submit'],
+ 'L_UPDATE_TITLE'=>$lang['update_default_title'],
+ 'L_UPDATE_SYNC_FILES'=>$lang['update_sync_files'],
+ 'L_UPDATE_SYNC_DIRS'=>$lang['update_sync_dirs'],
+ 'L_UPDATE_SYNC_ALL'=>$lang['update_sync_all'],
+ 'L_UPDATE_SYNC_METADATA'=>$lang['update_sync_metadata'],
+ 'L_UPDATE_SYNC_METADATA_NEW'=>$lang['update_sync_metadata_new'],
+ 'L_UPDATE_SYNC_METADATA_ALL'=>$lang['update_sync_metadata_all'],
+ 'L_UPDATE_CATS_SUBSET'=>$lang['update_cats_subset'],
+ 'L_RESULT_UPDATE'=>$lang['update_part_research'],
+ 'L_NB_NEW_ELEMENTS'=>$lang['update_nb_new_elements'],
+ 'L_NB_NEW_CATEGORIES'=>$lang['update_nb_new_categories'],
+ 'L_NB_DEL_ELEMENTS'=>$lang['update_nb_del_elements'],
+ 'L_NB_DEL_CATEGORIES'=>$lang['update_nb_del_categories'],
+ 'L_SEARCH_SUBCATS_INCLUDED'=>$lang['search_subcats_included'],
+
+ 'U_SYNC_DIRS'=>add_session_id($base_url.'&update=dirs'),
+ 'U_SYNC_ALL'=>add_session_id($base_url.'&update=all'),
+ 'U_SYNC_METADATA_NEW'=>add_session_id($base_url.'&metadata=all:new'),
+ 'U_SYNC_METADATA_ALL'=>add_session_id($base_url.'&metadata=all')
+ ));
+// +-----------------------------------------------------------------------+
+// | introduction : choices |
+// +-----------------------------------------------------------------------+
+if (!isset($_POST['submit']))
{
- $template->assign_block_vars('introduction',array());
+ $template->assign_block_vars('introduction', array());
+
+ $query = '
+SELECT id
+ FROM '.CATEGORIES_TABLE.'
+ WHERE site_id != 1
+;';
+ $result = pwg_query($query);
+ while ($row = mysql_fetch_array($result))
+ {
+ array_push($user['restrictions'], $row['id']);
+ }
+ $user['forbidden_categories'] = implode(',', $user['restrictions']);
+ $user['expand'] = true;
+ $structure = create_user_structure('');
+ display_select_categories($structure,
+ ' ',
+ array(),
+ 'introduction.category_option');
}
-//-------------------------------------------------- local update : ./galleries
-else if (!isset($_GET['metadata']))
+// +-----------------------------------------------------------------------+
+// | synchronize files |
+// +-----------------------------------------------------------------------+
+else if (isset($_POST['submit'])
+ and ($_POST['sync'] == 'dirs' or $_POST['sync'] == 'files'))
{
- check_cat_id($_GET['update']);
- $start = get_moment();
$counts = array(
'new_elements' => 0,
'new_categories' => 0,
'del_elements' => 0,
'del_categories' => 0
);
-
- if (isset($page['cat']))
+
+ if (isset($_POST['cat']))
{
- $categories = insert_local_category($page['cat']);
+ $opts['category_id'] = $_POST['cat'];
}
else
{
- $categories = insert_local_category('NULL');
+ $opts['category_id'] = 'NULL';
}
+
+ $start = get_moment();
+ $categories = insert_local_category($opts['category_id']);
echo get_elapsed_time($start,get_moment()).' for scanning directories<br />';
+
$template->assign_block_vars(
'update',
array(
@@ -595,26 +640,6 @@ else if (!isset($_GET['metadata']))
'NB_NEW_ELEMENTS'=>$counts['new_elements'],
'NB_DEL_ELEMENTS'=>$counts['del_elements']
));
- if ($counts['new_elements'] > 0)
- {
- $url = PHPWG_ROOT_PATH.'admin.php?page=update&amp;metadata=1';
- if (isset($page['cat']))
- {
- $url.= '&amp;update='.$page['cat'];
- }
- $template->assign_block_vars(
- 'update.sync_metadata',
- array(
- 'U_URL' => add_session_id($url)
- ));
- }
-}
-//---------------------------------------- update informations about categories
-if (!isset($_GET['metadata'])
- and (isset($_GET['update'])
- or isset($page['cat'])
- or @is_file('./listing.xml') && DEBUG))
-{
$start = get_moment();
update_category('all');
echo get_elapsed_time($start,get_moment()).' for update_category(all)<br />';
@@ -622,29 +647,44 @@ if (!isset($_GET['metadata'])
ordering();
echo get_elapsed_time($start, get_moment()).' for ordering categories<br />';
}
-//---------------------------------------------------- metadata synchronization
-if (isset($_GET['metadata']))
+// +-----------------------------------------------------------------------+
+// | synchronize metadata |
+// +-----------------------------------------------------------------------+
+else if (isset($_POST['submit']) and preg_match('/^metadata/', $_POST['sync']))
{
- if (isset($_GET['update']))
+ // sync only never synchronized files ?
+ if ($_POST['sync'] == 'metadata_new')
{
- check_cat_id($_GET['update']);
+ $opts['only_new'] = true;
}
-
- $start = get_moment();
- if (isset($page['cat']))
+ else
{
- $files = get_filelist($page['cat'],true,true);
+ $opts['only_new'] = false;
}
- else
+ $opts['category_id'] = '';
+ $opts['recursive'] = true;
+
+ if (isset($_POST['cat']))
{
- $files = get_filelist('',true,true);
+ $opts['category_id'] = $_POST['cat'];
+ // recursive ?
+ if (!isset($_POST['subcats-included']) or $_POST['subcats-included'] != 1)
+ {
+ $opts['recursive'] = false;
+ }
}
+ $start = get_moment();
+ $files = get_filelist($opts['category_id'],
+ $opts['recursive'],
+ $opts['only_new']);
echo get_elapsed_time($start, get_moment()).' for get_filelist<br />';
$start = get_moment();
update_metadata($files);
echo get_elapsed_time($start, get_moment()).' for metadata update<br />';
}
-//----------------------------------------------------------- sending html code
+// +-----------------------------------------------------------------------+
+// | sending html code |
+// +-----------------------------------------------------------------------+
$template->assign_var_from_handle('ADMIN_CONTENT', 'update');
?> \ No newline at end of file
diff --git a/include/constants.php b/include/constants.php
index f9b9044fe..c44a5cc65 100644
--- a/include/constants.php
+++ b/include/constants.php
@@ -31,9 +31,8 @@ define('PHPWG_VERSION', 'BSF');
define('PHPWG_URL', 'http://www.phpwebgallery.net');
define('PHPWG_FORUM_URL', 'http://forum.phpwebgallery.net');
-// Debug Level
-//define('DEBUG', 1); // Debugging on
-define('DEBUG', 0); // Debugging off
+// Debug Level : 1 = on, 0 = off
+define('DEBUG', 0);
// User level
define('ANONYMOUS', 2);
diff --git a/include/functions_category.inc.php b/include/functions_category.inc.php
index f924d5c83..9253a24d8 100644
--- a/include/functions_category.inc.php
+++ b/include/functions_category.inc.php
@@ -115,49 +115,59 @@ function get_user_plain_structure()
{
global $page,$user;
- $infos = array( 'name','id','date_last','nb_images','dir','id_uppercat',
+ $infos = array('name','id','date_last','nb_images','dir','id_uppercat',
'rank','site_id','uppercats');
- $query = 'SELECT '.implode( ',', $infos );
- $query.= ' FROM '.CATEGORIES_TABLE;
- $query.= ' WHERE 1 = 1'; // stupid but permit using AND after it !
- if ( !$user['expand'] )
+ $query = '
+SELECT '.implode(',', $infos).'
+ FROM '.CATEGORIES_TABLE.'
+ WHERE 1 = 1'; // stupid but permit using AND after it !
+ if (!$user['expand'])
{
- $query.= ' AND (id_uppercat is NULL';
- if ( isset ($page['tab_expand']) && count( $page['tab_expand'] ) > 0 )
+ $query.= '
+ AND (id_uppercat is NULL';
+ if (isset ($page['tab_expand']) and count($page['tab_expand']) > 0)
{
$query.= ' OR id_uppercat IN ('.implode(',',$page['tab_expand']).')';
}
$query.= ')';
}
- if ( $user['forbidden_categories'] != '' )
+ if ($user['forbidden_categories'] != '')
{
- $query.= ' AND id NOT IN ';
- $query.= '('.$user['forbidden_categories'].')';
+ $query.= '
+ AND id NOT IN ('.$user['forbidden_categories'].')';
}
- $query.= ' ORDER BY id_uppercat ASC, rank ASC';
- $query.= ';';
+ $query.= '
+ ORDER BY id_uppercat ASC, rank ASC
+;';
$plain_structure = array();
- $result = pwg_query( $query );
- while ( $row = mysql_fetch_array( $result ) )
+ $result = pwg_query($query);
+ while ($row = mysql_fetch_array($result))
{
$category = array();
- foreach ( $infos as $info ) {
- if ( $info == 'uc.date_last')
+ foreach ($infos as $info)
+ {
+ if ($info == 'uc.date_last')
{
- if ( empty( $row['date_last'] ) )
+ if (empty($row['date_last']))
{
$category['date_last'] = 0;
}
else
{
- list($year,$month,$day) = explode( '-', $row['date_last'] );
+ list($year,$month,$day) = explode('-', $row['date_last']);
$category['date_last'] = mktime(0,0,0,$month,$day,$year);
}
}
- else if ( isset( $row[$info] ) ) $category[$info] = $row[$info];
- else $category[$info] = '';
+ else if (isset($row[$info]))
+ {
+ $category[$info] = $row[$info];
+ }
+ else
+ {
+ $category[$info] = '';
+ }
}
$plain_structure[$row['id']] = $category;
}
@@ -897,4 +907,36 @@ function get_first_non_empty_cat_id( $id_uppercat )
}
return false;
}
+
+function display_select_categories($categories,
+ $indent,
+ $selecteds,
+ $blockname)
+{
+ 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(
+ $blockname,
+ array('SELECTED'=>$selected,
+ 'VALUE'=>$category['id'],
+ 'OPTION'=>$indent.'- '.$category['name']
+ ));
+
+ display_select_categories($category['subcats'],
+ $indent.str_repeat('&nbsp;',3),
+ $selecteds,
+ $blockname);
+ }
+ }
+}
?>
diff --git a/include/page_tail.php b/include/page_tail.php
index bd8b726bf..c8193d813 100644
--- a/include/page_tail.php
+++ b/include/page_tail.php
@@ -43,7 +43,8 @@ $template->assign_vars(
));
-if (DEBUG)
+//if (DEBUG)
+if (true)
{
$template->assign_block_vars('debug', array());
}
diff --git a/include/template.php b/include/template.php
index 565197ff2..108beba58 100644
--- a/include/template.php
+++ b/include/template.php
@@ -242,7 +242,7 @@ class Template {
{
die("Template->make_filename(): Error - file $filename does not exist");
}
-
+
return $filename;
}
diff --git a/language/en_UK.iso-8859-1/admin.lang.php b/language/en_UK.iso-8859-1/admin.lang.php
index 1d4d50ae8..376abcc79 100644
--- a/language/en_UK.iso-8859-1/admin.lang.php
+++ b/language/en_UK.iso-8859-1/admin.lang.php
@@ -216,9 +216,13 @@ $lang['update_nb_del_elements'] = 'elements deleted in the database';
$lang['update_nb_new_categories'] = 'categories added in the database';
$lang['update_nb_del_categories'] = 'categories deleted in the database';
$lang['update_default_title'] = 'Choose an option';
-$lang['update_only_cat'] = 'update categories, not pictures';
-$lang['update_all'] = 'update all';
-$lang['update_sync_metadata_question'] = 'Do you want to synchronize new elements informations with files metadata ?';
+$lang['update_sync_files'] = 'synchronize files structure with database';
+$lang['update_sync_dirs'] = 'only directories';
+$lang['update_sync_all'] = 'directories + files';
+$lang['update_sync_metadata'] = 'synchronize files metadata with database elements informations';
+$lang['update_sync_metadata_new'] = 'only never synchronized elements';
+$lang['update_sync_metadata_all'] = 'even already synchronized elements';
+$lang['update_cats_subset'] = 'reduce to single existing categories';
// History
$lang['stats_title'] = 'Last year statistics';
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']))
diff --git a/template/default/admin.tpl b/template/default/admin.tpl
index de6c175a1..3504b16ab 100644
--- a/template/default/admin.tpl
+++ b/template/default/admin.tpl
@@ -19,7 +19,8 @@
<li><a class="adminMenu" href="{U_SITES}">{L_SITES}</a></li>
<li><a class="adminMenu" href="{U_PHPINFO}">{L_PHPINFO}</a></li>
<li><a class="adminMenu" href="{U_HISTORY}">{L_HISTORY}</a></li>
- </ul>
+ <li><a class="adminMenu" href="{U_CAT_UPDATE}">{L_UPDATE}</a></li>
+</ul>
</div>
<div class="titreMenu">{L_CONFIGURATION}</div>
<div class="menu">
@@ -37,7 +38,6 @@
<ul class="menu">
<li><a class="adminMenu" href="{U_CATEGORIES}">{L_MANAGE}</a></li>
<li><a class="adminMenu" href="{U_UPLOAD}">{L_UPLOAD}</a></li>
- <li><a class="adminMenu" href="{U_CAT_UPDATE}">{L_UPDATE}</a></li>
</ul>
</div>
<div class="titreMenu">{L_IMAGES}</div>
@@ -46,8 +46,7 @@
<li><a class="adminMenu" href="{U_WAITING}">{L_WAITING}</a></li>
<li><a class="adminMenu" href="{U_THUMBNAILS}">{L_THUMBNAILS}</a></li>
<li><a class="adminMenu" href="{U_COMMENTS}">{L_COMMENTS}</a></li>
- <li><a class="adminMenu" href="{U_IMG_UPDATE}">{L_UPDATE}</a></li>
- </ul>
+</ul>
</div>
<div class="titreMenu">{L_IDENTIFY}</div>
<div class="menu">
diff --git a/template/default/admin/cat_list.tpl b/template/default/admin/cat_list.tpl
index d78eb6eb1..b33771222 100644
--- a/template/default/admin/cat_list.tpl
+++ b/template/default/admin/cat_list.tpl
@@ -19,7 +19,7 @@
<!-- BEGIN category -->
<tr>
<td style="width:1px;padding:5px;"><img src="{category.CATEGORY_IMG_SRC}" alt="{category.CATEGORY_IMG_ALT}" title="{category.CATEGORY_IMG_TITLE}" /></td>
- <td style="width:40%;text-align:left;"><a class="titreImg" href="{category.U_CATEGORY}">{category.CATEGORY_NAME}</a>
+ <td style="width:60%;text-align:left;"><a class="titreImg" href="{category.U_CATEGORY}">{category.CATEGORY_NAME}</a>
<br />
<!-- BEGIN storage -->
{L_STORAGE} : {category.CATEGORY_DIR} -
@@ -42,22 +42,6 @@
<!-- END no_image_info -->
</td>
<td class="row1" style="width:10%;white-space:nowrap;text-align:center;">
- <!-- BEGIN update -->
- <a href="{category.U_CAT_UPDATE}">{L_UPDATE}</a>
- <!-- END update -->
- <!-- BEGIN no_update -->
- <span style="color:darkgray;">{L_UPDATE}</span>
- <!-- END no_update -->
- </td>
- <td class="row1" style="width:10%;white-space:nowrap;text-align:center;">
- <!-- BEGIN metadata -->
- <a href="{category.U_CAT_METADATA}">{L_UPDATE_METADATA}</a>
- <!-- END metadata -->
- <!-- BEGIN no_metadata -->
- <span style="color:darkgray;">{L_UPDATE_METADATA}</span>
- <!-- END no_metadata -->
- </td>
- <td class="row1" style="width:10%;white-space:nowrap;text-align:center;">
<!-- BEGIN virtual -->
<a href="{category.U_CAT_DELETE}">{L_DELETE}</a>
<!-- END virtual -->
diff --git a/template/default/admin/infos_images.tpl b/template/default/admin/infos_images.tpl
index 8609c514c..0d6ac2e21 100644
--- a/template/default/admin/infos_images.tpl
+++ b/template/default/admin/infos_images.tpl
@@ -7,6 +7,7 @@
</ul>
</div>
<!-- END errors -->
+
<form action="{F_ACTION}" method="POST">
<div class="admin">{L_INFOS_TITLE} &quot;{CATEGORY}&quot;</div>
<table width="100%">
@@ -76,7 +77,7 @@
</tr>
<!-- END picture -->
<tr>
- <td colspan="6">
+ <td colspan="7">
<img src="./template/default/admin/images/arrow_select.gif" alt="&lt;" />
{L_INFOS_ASSOCIATE}
<!-- BEGIN associate_LOV -->
@@ -89,9 +90,9 @@
</td>
</tr>
<tr>
- <td colspan="6" style="text-align:center;">
+ <td colspan="7" style="text-align:center;">
<input type="submit" value="{L_SUBMIT}" name="submit" class="bouton" />
</td>
</tr>
</table>
-</form> \ No newline at end of file
+</form>
diff --git a/template/default/admin/update.tpl b/template/default/admin/update.tpl
index 0a09dd23b..ce4e31a24 100644
--- a/template/default/admin/update.tpl
+++ b/template/default/admin/update.tpl
@@ -1,9 +1,33 @@
<!-- BEGIN introduction -->
<div class="admin">{L_UPDATE_TITLE}</div>
-<ul class="menu">
- <li><a href="{U_CAT_UPDATE}">{L_CAT_UPDATE}</a></li>
- <li><a href="{U_ALL_UPDATE}">{L_ALL_UPDATE}</a></li>
-</ul>
+<form action="{F_ACTION}" method="post">
+ <ul class="menu">
+ <li>
+ {L_UPDATE_SYNC_FILES}
+ <ul class="menu">
+ <li><input type="radio" name="sync" value="dirs" checked="checked" /> {L_UPDATE_SYNC_DIRS}</li>
+ <li><input type="radio" name="sync" value="files" /> {L_UPDATE_SYNC_ALL}</li>
+ </ul>
+ </li>
+ <li>
+ {L_UPDATE_SYNC_METADATA}
+ <ul class="menu">
+ <li><input type="radio" name="sync" value="metadata_new" /> {L_UPDATE_SYNC_METADATA_NEW}</li>
+ <li><input type="radio" name="sync" value="metadata_all" /> {L_UPDATE_SYNC_METADATA_ALL}</li>
+ </ul>
+ </li>
+ <li>
+ {L_UPDATE_CATS_SUBSET}
+ </li>
+ </ul>
+ <select style="width:500px" name="cat" size="10">
+ <!-- BEGIN category_option -->
+ <option {introduction.category_option.SELECTED} value="{introduction.category_option.VALUE}">{introduction.category_option.OPTION}</option>
+ <!-- END category_option -->
+ </select>
+ <input type="checkbox" name="subcats-included" value="1" checked="checked" /> {L_SEARCH_SUBCATS_INCLUDED}
+ <p style="text-align:center;"><input type="submit" value="{L_SUBMIT}" name="submit" class="bouton" /></p>
+</form>
<!-- END introduction -->
<!-- BEGIN update -->
<div class="admin">{L_RESULT_UPDATE}</div>
@@ -13,26 +37,5 @@
<li class="update_summary_del">{update.NB_DEL_CATEGORIES} {L_NB_DEL_CATEGORIES}</li>
<li class="update_summary_del">{update.NB_DEL_ELEMENTS} {L_NB_DEL_ELEMENTS}</li>
</ul>
-<!-- BEGIN sync_metadata -->
-<br />[ <a href="{update.sync_metadata.U_URL}">{L_UPDATE_SYNC_METADATA_QUESTION}</a> ]
-<!-- END sync_metadata -->
{update.CATEGORIES}
<!-- END update -->
-<!-- BEGIN remote_update -->
- <table>
- <tr>
- <th>{#remote_site}</th>
- </tr>
- <tr>
- <td>
- <div class="retrait">
- <span style="font-weight:bold;color:navy;">{#url}</span><br /><br />
- <!-- update.php generates itself HTML code for categories -->
- {#categories}
- <br /><span style="color:blue;">{#count_new} {#update_research_conclusion}</span>
- <br /><span style="color:red;">{#count_deleted} {#update_deletion_conclusion}</span>
- </div>
- </td>
- </tr>
- </table>
- <!-- END remote_update -->