aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2008-08-29 12:35:16 +0000
committerrvelices <rv-github@modusoptimus.com>2008-08-29 12:35:16 +0000
commitbd833ee9bcd52d7e5c1cc52c220ead224beb1225 (patch)
treed7fb01c6cb0ce046f6ddaebf61a8c0b74bfb774c
parent844799d0401321704c1ef390a1014118438fe7bd (diff)
synchro improvements:
- able to sync metadata at the same time as the files/dirs - by default empty metadata does not overwrite database infos (checkbox can switch to previous behaviour) (bug 132) - the form is shown again even after a successfull non simulated run git-svn-id: http://piwigo.org/svn/trunk@2491 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/include/functions.php215
-rw-r--r--admin/site_update.php152
-rw-r--r--admin/template/yoga/admin/site_update.tpl45
-rw-r--r--language/en_UK/admin.lang.php3
-rw-r--r--language/es_ES/admin.lang.php3
-rw-r--r--language/fr_FR/admin.lang.php6
-rw-r--r--language/it_IT/admin.lang.php6
-rw-r--r--language/nl_NL/admin.lang.php3
8 files changed, 200 insertions, 233 deletions
diff --git a/admin/include/functions.php b/admin/include/functions.php
index db95ab383..e700d662e 100644
--- a/admin/include/functions.php
+++ b/admin/include/functions.php
@@ -377,7 +377,7 @@ function mass_inserts($table_name, $dbfields, $datas)
{
$first = true;
- $query = 'SHOW VARIABLES LIKE \'max_allowed_packet\';';
+ $query = 'SHOW VARIABLES LIKE \'max_allowed_packet\'';
list(, $packet_size) = mysql_fetch_row(pwg_query($query));
$packet_size = $packet_size - 2000; // The last list of values MUST not exceed 2000 character*/
$query = '';
@@ -386,8 +386,6 @@ function mass_inserts($table_name, $dbfields, $datas)
{
if (strlen($query) >= $packet_size)
{
- $query .= '
-;';
pwg_query($query);
$first = true;
}
@@ -425,57 +423,53 @@ INSERT INTO '.$table_name.'
}
$query .= ')';
}
-
- $query .= '
-;';
pwg_query($query);
}
}
+define('MASS_UPDATES_SKIP_EMPTY', 1);
/**
* updates multiple lines in a table
*
* @param string table_name
* @param array dbfields
* @param array datas
+ * @param int flags - if MASS_UPDATES_SKIP_EMPTY - empty values do not overwrite existing ones
* @return void
*/
-function mass_updates($tablename, $dbfields, $datas)
+function mass_updates($tablename, $dbfields, $datas, $flags=0)
{
- if (count($datas) != 0)
- {
- // depending on the MySQL version, we use the multi table update or N
- // update queries
- if (count($datas) < 10 or version_compare(mysql_get_server_info(), '4.0.4') < 0)
+ if (count($datas) == 0)
+ return;
+ // depending on the MySQL version, we use the multi table update or N update queries
+ if (count($datas) < 10 or version_compare(mysql_get_server_info(), '4.0.4') < 0)
+ { // MySQL is prior to version 4.0.4, multi table update feature is not available
+ foreach ($datas as $data)
{
- // MySQL is prior to version 4.0.4, multi table update feature is not
- // available
- foreach ($datas as $data)
- {
- $query = '
+ $query = '
UPDATE '.$tablename.'
SET ';
- $is_first = true;
- foreach ($dbfields['update'] as $key)
+ $is_first = true;
+ foreach ($dbfields['update'] as $key)
+ {
+ $separator = $is_first ? '' : ",\n ";
+
+ if (isset($data[$key]) and $data[$key] != '')
{
- if (!$is_first)
- {
- $query.= ",\n ";
- }
- $query.= $key.' = ';
- if (isset($data[$key]) and $data[$key] != '')
- {
- $query.= '\''.$data[$key].'\'';
- }
- else
- {
- $query.= 'NULL';
- }
- $is_first = false;
+ $query.= $separator.$key.' = \''.$data[$key].'\'';
+ }
+ else
+ {
+ if ($flags & MASS_UPDATES_SKIP_EMPTY )
+ continue; // next field
+ $query.= "$separator$key = NULL";
}
+ $is_first = false;
+ }
+ if (!$is_first)
+ {// only if one field at least updated
$query.= '
WHERE ';
-
$is_first = true;
foreach ($dbfields['primary'] as $key)
{
@@ -493,87 +487,83 @@ UPDATE '.$tablename.'
}
$is_first = false;
}
- $query.= '
-;';
pwg_query($query);
}
- }
- else
+ } // foreach update
+ } // if mysql_ver or count<X
+ else
+ {
+ // creation of the temporary table
+ $query = '
+SHOW FULL COLUMNS FROM '.$tablename;
+ $result = pwg_query($query);
+ $columns = array();
+ $all_fields = array_merge($dbfields['primary'], $dbfields['update']);
+ while ($row = mysql_fetch_array($result))
{
- // creation of the temporary table
- $query = '
-SHOW FULL COLUMNS FROM '.$tablename.'
-;';
- $result = pwg_query($query);
- $columns = array();
- $all_fields = array_merge($dbfields['primary'], $dbfields['update']);
- while ($row = mysql_fetch_array($result))
+ if (in_array($row['Field'], $all_fields))
{
- if (in_array($row['Field'], $all_fields))
- {
- $column = $row['Field'];
- $column.= ' '.$row['Type'];
+ $column = $row['Field'];
+ $column.= ' '.$row['Type'];
- $nullable = true;
- if (!isset($row['Null']) or $row['Null'] == '' or $row['Null']=='NO')
- {
- $column.= ' NOT NULL';
- $nullable = false;
- }
- if (isset($row['Default']))
- {
- $column.= " default '".$row['Default']."'";
- }
- elseif ($nullable)
- {
- $column.= " default NULL";
- }
- if (isset($row['Collation']) and $row['Collation'] != 'NULL')
- {
- $column.= " collate '".$row['Collation']."'";
- }
- array_push($columns, $column);
+ $nullable = true;
+ if (!isset($row['Null']) or $row['Null'] == '' or $row['Null']=='NO')
+ {
+ $column.= ' NOT NULL';
+ $nullable = false;
}
+ if (isset($row['Default']))
+ {
+ $column.= " default '".$row['Default']."'";
+ }
+ elseif ($nullable)
+ {
+ $column.= " default NULL";
+ }
+ if (isset($row['Collation']) and $row['Collation'] != 'NULL')
+ {
+ $column.= " collate '".$row['Collation']."'";
+ }
+ array_push($columns, $column);
}
+ }
- $temporary_tablename = $tablename.'_'.micro_seconds();
+ $temporary_tablename = $tablename.'_'.micro_seconds();
- $query = '
- CREATE TABLE '.$temporary_tablename.'
- (
- '.implode(",\n", $columns).',
+ $query = '
+CREATE TABLE '.$temporary_tablename.'
+(
+ '.implode(",\n ", $columns).',
UNIQUE KEY the_key ('.implode(',', $dbfields['primary']).')
- )
-;';
+)';
- pwg_query($query);
- mass_inserts($temporary_tablename, $all_fields, $datas);
- // update of images table by joining with temporary table
- $query = '
+ pwg_query($query);
+ mass_inserts($temporary_tablename, $all_fields, $datas);
+ if ( $flags & MASS_UPDATES_SKIP_EMPTY )
+ $func_set = create_function('$s', 'return "t1.$s = IFNULL(t2.$s, t1.$s)";');
+ else
+ $func_set = create_function('$s', 'return "t1.$s = t2.$s";');
+
+ // update of images table by joining with temporary table
+ $query = '
UPDATE '.$tablename.' AS t1, '.$temporary_tablename.' AS t2
SET '.
- implode(
- "\n , ",
- array_map(
- create_function('$s', 'return "t1.$s = t2.$s";'),
- $dbfields['update']
- )
- ).'
+ implode(
+ "\n , ",
+ array_map($func_set,$dbfields['update'])
+ ).'
WHERE '.
- implode(
- "\n AND ",
- array_map(
- create_function('$s', 'return "t1.$s = t2.$s";'),
- $dbfields['primary']
- )
- ).'
- ;';
- pwg_query($query);
- $query = '
-DROP TABLE '.$temporary_tablename.'
-;';
- pwg_query($query);
- }
+ implode(
+ "\n AND ",
+ array_map(
+ create_function('$s', 'return "t1.$s = t2.$s";'),
+ $dbfields['primary']
+ )
+ );
+ pwg_query($query);
+ $query = '
+DROP TABLE '.$temporary_tablename;
+ pwg_query($query);
}
}
@@ -587,8 +577,7 @@ function update_global_rank()
$query = '
SELECT id, if(id_uppercat is null,\'\',id_uppercat) AS id_uppercat, uppercats, rank, global_rank
FROM '.CATEGORIES_TABLE.'
- ORDER BY id_uppercat,rank,name
-;';
+ ORDER BY id_uppercat,rank,name';
$cat_map = array();
@@ -657,6 +646,7 @@ function set_cat_visible($categories, $value)
{
if (!in_array($value, array('true', 'false')))
{
+ trigger_error("set_cat_visible invalid param $value", E_USER_WARNING);
return false;
}
@@ -667,8 +657,7 @@ function set_cat_visible($categories, $value)
$query = '
UPDATE '.CATEGORIES_TABLE.'
SET visible = \'true\'
- WHERE id IN ('.implode(',', $uppercats).')
-;';
+ WHERE id IN ('.implode(',', $uppercats).')';
pwg_query($query);
}
// locking a category => all its child categories become locked
@@ -678,8 +667,7 @@ UPDATE '.CATEGORIES_TABLE.'
$query = '
UPDATE '.CATEGORIES_TABLE.'
SET visible = \'false\'
- WHERE id IN ('.implode(',', $subcats).')
-;';
+ WHERE id IN ('.implode(',', $subcats).')';
pwg_query($query);
}
}
@@ -695,6 +683,7 @@ function set_cat_status($categories, $value)
{
if (!in_array($value, array('public', 'private')))
{
+ trigger_error("set_cat_status invalid param $value", E_USER_WARNING);
return false;
}
@@ -716,8 +705,7 @@ UPDATE '.CATEGORIES_TABLE.'
$query = '
UPDATE '.CATEGORIES_TABLE.'
SET status = \'private\'
- WHERE id IN ('.implode(',', $subcats).')
-;';
+ WHERE id IN ('.implode(',', $subcats).')';
pwg_query($query);
}
}
@@ -1582,7 +1570,7 @@ function do_maintenance_all_tables()
$all_tables = array();
// List all tables
- $query = 'SHOW TABLES LIKE \''.$prefixeTable.'%\';';
+ $query = 'SHOW TABLES LIKE \''.$prefixeTable.'%\'';
$result = pwg_query($query);
while ($row = mysql_fetch_array($result))
{
@@ -1590,7 +1578,7 @@ function do_maintenance_all_tables()
}
// Repair all tables
- $query = 'REPAIR TABLE '.implode(', ', $all_tables).';';
+ $query = 'REPAIR TABLE '.implode(', ', $all_tables);
$mysql_rc = pwg_query($query);
// Re-Order all tables
@@ -1616,7 +1604,7 @@ function do_maintenance_all_tables()
}
// Optimize all tables
- $query = 'OPTIMIZE TABLE '.implode(', ', $all_tables).';';
+ $query = 'OPTIMIZE TABLE '.implode(', ', $all_tables);
$mysql_rc = $mysql_rc && pwg_query($query);
if ($mysql_rc)
{
@@ -1832,8 +1820,7 @@ function invalidate_user_cache()
{
$query = '
UPDATE '.USER_CACHE_TABLE.'
- SET need_update = \'true\'
-;';
+ SET need_update = \'true\'';
pwg_query($query);
trigger_action('invalidate_user_cache');
}
diff --git a/admin/site_update.php b/admin/site_update.php
index e6fb6d4ef..ba406afe4 100644
--- a/admin/site_update.php
+++ b/admin/site_update.php
@@ -42,8 +42,7 @@ $site_id = $_GET['site'];
$query='
SELECT galleries_url
FROM '.SITES_TABLE.'
- WHERE id = '.$site_id.'
-;';
+ WHERE id = '.$site_id;
list($site_url) = mysql_fetch_row(pwg_query($query));
if (!isset($site_url))
{
@@ -139,8 +138,6 @@ if (isset($_POST['submit'])
{
$start = get_moment();
// which categories to update ?
- $cat_ids = array();
-
$query = '
SELECT id, uppercats, global_rank, status, visible
FROM '.CATEGORIES_TABLE.'
@@ -161,15 +158,7 @@ SELECT id, uppercats, global_rank, status, visible
';
}
}
- $query.= '
-;';
- $result = pwg_query($query);
-
- $db_categories = array();
- while ($row = mysql_fetch_array($result))
- {
- $db_categories[$row['id']] = $row;
- }
+ $db_categories = hash_from_query($query, 'id');
// get categort full directories in an array for comparison with file
// system directory tree
@@ -194,8 +183,7 @@ SELECT id, uppercats, global_rank, status, visible
$query = '
SELECT id
- FROM '.CATEGORIES_TABLE.'
-;';
+ FROM '.CATEGORIES_TABLE;
$result = pwg_query($query);
while ($row = mysql_fetch_array($result))
{
@@ -206,8 +194,7 @@ SELECT id
$query = '
SELECT id_uppercat, MAX(rank)+1 AS next_rank
FROM '.CATEGORIES_TABLE.'
- GROUP BY id_uppercat
-;';
+ GROUP BY id_uppercat';
$result = pwg_query($query);
while ($row = mysql_fetch_array($result))
{
@@ -222,8 +209,7 @@ SELECT id_uppercat, MAX(rank)+1 AS next_rank
// next category id available
$query = '
SELECT IF(MAX(id)+1 IS NULL, 1, MAX(id)+1) AS next_id
- FROM '.CATEGORIES_TABLE.'
-;';
+ FROM '.CATEGORIES_TABLE;
list($next_id) = mysql_fetch_array(pwg_query($query));
// retrieve sub-directories fulldirs from the site reader
@@ -388,13 +374,8 @@ SELECT id, path
implode(', ', $cat_ids),
80,
"\n"
- ).')
-;';
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- $db_elements[$row['id']] = $row['path'];
- }
+ ).')';
+ $db_elements = simple_hash_from_query($query, 'id', 'path');
// searching the unvalidated waiting elements (they must not be taken into
// account)
@@ -403,8 +384,7 @@ SELECT file,storage_category_id
FROM '.WAITING_TABLE.'
WHERE storage_category_id IN (
'.wordwrap(implode(', ', $cat_ids), 80, "\n").')
- AND validated = \'false\'
-;';
+ AND validated = \'false\'';
$result = pwg_query($query);
while ($row = mysql_fetch_array($result))
{
@@ -421,8 +401,7 @@ SELECT file,storage_category_id
// next element id available
$query = '
SELECT IF(MAX(id)+1 IS NULL, 1, MAX(id)+1) AS next_element_id
- FROM '.IMAGES_TABLE.'
-;';
+ FROM '.IMAGES_TABLE;
list($next_element_id) = mysql_fetch_array(pwg_query($query));
$start = get_moment();
@@ -564,8 +543,7 @@ SELECT id,file,storage_category_id,infos
FROM '.WAITING_TABLE.'
WHERE storage_category_id IN (
'.wordwrap(implode(', ', $cat_ids), 80, "\n").')
- AND validated = \'true\'
-;';
+ AND validated = \'true\'';
$result = pwg_query($query);
$datas = array();
@@ -585,8 +563,7 @@ SELECT id,file,storage_category_id,infos
SELECT id
FROM '.IMAGES_TABLE.'
WHERE storage_category_id = '.$row['storage_category_id'].'
- AND file = \''.$row['file'].'\'
-;';
+ AND file = \''.$row['file'].'\'';
list($data['id']) = mysql_fetch_array(pwg_query($query));
foreach ($fields['update'] as $field)
@@ -723,18 +700,11 @@ if (isset($_POST['submit'])
// +-----------------------------------------------------------------------+
// | synchronize metadata |
// +-----------------------------------------------------------------------+
-if (isset($_POST['submit']) and preg_match('/^metadata/', $_POST['sync'])
+if (isset($_POST['submit']) and isset($_POST['sync_meta'])
and !$general_failure)
{
// sync only never synchronized files ?
- if ($_POST['sync'] == 'metadata_new')
- {
- $opts['only_new'] = true;
- }
- else
- {
- $opts['only_new'] = false;
- }
+ $opts['only_new'] = isset($_POST['meta_all']) ? false : true;
$opts['category_id'] = '';
$opts['recursive'] = true;
@@ -776,14 +746,8 @@ SELECT id
WHERE has_high = \'true\'
AND id IN (
'.wordwrap(implode(', ', $image_ids), 80, "\n").'
-)
-;';
-
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- array_push($has_high_images, $row['id']);
- }
+)';
+ $has_high_images = array_from_query($query, 'id' );
}
foreach ( $files as $id=>$file )
@@ -843,7 +807,8 @@ SELECT id
array('date_metadata_update'))
)
),
- $datas
+ $datas,
+ isset($_POST['meta_empty_overrides']) ? 0 : MASS_UPDATES_SKIP_EMPTY
);
}
set_tags_of($tags_of);
@@ -893,58 +858,61 @@ $template->assign(
// +-----------------------------------------------------------------------+
// | introduction : choices |
// +-----------------------------------------------------------------------+
-if (!isset($_POST['submit']) or (isset($simulate) and $simulate))
+if (isset($_POST['submit']))
{
- if (isset($simulate) and $simulate)
- {
- $tpl_introduction = array(
- 'sync' => $_POST['sync'],
- 'display_info' => isset($_POST['display_info']) and $_POST['display_info']==1,
- 'add_to_caddie' => isset($_POST['add_to_caddie']) and $_POST['add_to_caddie']==1,
- 'subcats_included' => isset($_POST['subcats-included']) and $_POST['subcats-included']==1,
- 'privacy_level_selected' => (int)@$_POST['privacy_level'],
- );
+ $tpl_introduction = array(
+ 'sync' => $_POST['sync'],
+ 'sync_meta' => isset($_POST['sync_meta']) ? true : false,
+ 'display_info' => isset($_POST['display_info']) and $_POST['display_info']==1,
+ 'add_to_caddie' => isset($_POST['add_to_caddie']) and $_POST['add_to_caddie']==1,
+ 'subcats_included' => isset($_POST['subcats-included']) and $_POST['subcats-included']==1,
+ 'privacy_level_selected' => (int)@$_POST['privacy_level'],
+ 'meta_all' => isset($_POST['meta_all']) ? true : false,
+ 'meta_empty_overrides' => isset($_POST['meta_empty_overrides']) ? true : false,
+ );
- if (isset($_POST['cat']) and is_numeric($_POST['cat']))
- {
- $cat_selected = array($_POST['cat']);
- }
- else
- {
- $cat_selected = array();
- }
+ if (isset($_POST['cat']) and is_numeric($_POST['cat']))
+ {
+ $cat_selected = array($_POST['cat']);
}
else
{
- $tpl_introduction = array(
- 'sync' => 'dirs',
- 'display_info' => false,
- 'add_to_caddie' => false,
- 'subcats_included' => true,
- 'privacy_level_selected' => 0,
- );
-
$cat_selected = array();
}
+}
+else
+{
+ $tpl_introduction = array(
+ 'sync' => 'dirs',
+ 'sync_meta' => true,
+ 'display_info' => false,
+ 'add_to_caddie' => false,
+ 'subcats_included' => true,
+ 'privacy_level_selected' => 0,
+ 'meta_all' => false,
+ 'meta_empty_overrides' => false,
+ );
+
+ $cat_selected = array();
+}
- $tpl_introduction['privacy_level_options']=array();
- foreach ($conf['available_permission_levels'] as $level)
- {
- $tpl_introduction['privacy_level_options'][$level] = l10n( sprintf('Level %d', $level) );
- }
+$tpl_introduction['privacy_level_options']=array();
+foreach ($conf['available_permission_levels'] as $level)
+{
+ $tpl_introduction['privacy_level_options'][$level] = l10n( sprintf('Level %d', $level) );
+}
- $template->assign('introduction', $tpl_introduction);
+$template->assign('introduction', $tpl_introduction);
- $query = '
+$query = '
SELECT id,name,uppercats,global_rank
FROM '.CATEGORIES_TABLE.'
- WHERE site_id = '.$site_id.'
-;';
- display_select_cat_wrapper($query,
- $cat_selected,
- 'category_options',
- false);
-}
+ WHERE site_id = '.$site_id;
+display_select_cat_wrapper($query,
+ $cat_selected,
+ 'category_options',
+ false);
+
if (count($errors) > 0)
{
diff --git a/admin/template/yoga/admin/site_update.tpl b/admin/template/yoga/admin/site_update.tpl
index e3016c68b..ad4f99e0f 100644
--- a/admin/template/yoga/admin/site_update.tpl
+++ b/admin/template/yoga/admin/site_update.tpl
@@ -58,25 +58,34 @@
<h3>{'update_default_title'|@translate}</h3>
<form action="" method="post" id="update">
- <fieldset id="syncFiles">
- <legend>{'update_sync_files'|@translate}</legend>
- <ul>
- <li><label><input type="radio" name="sync" value="dirs" {if 'dirs'==$introduction.sync}checked="checked"{/if}/> {'update_sync_dirs'|@translate}</label></li>
- <li><label><input type="radio" name="sync" value="files" {if 'files'==$introduction.sync}checked="checked"{/if}/> {'update_sync_all'|@translate}</label></li>
- <li><label><input type="checkbox" name="display_info" value="1" {if $introduction.display_info}checked="checked"{/if}/> {'update_display_info'|@translate}</label></li>
- <li><label><input type="checkbox" name="add_to_caddie" value="1" {if $introduction.add_to_caddie}checked="checked"{/if}/> {'add new elements to caddie'|@translate}</label></li>
- <li><label>{'Minimum privacy level'|@translate} <select name="privacy_level">{html_options options=$introduction.privacy_level_options selected=$introduction.privacy_level_selected}</select></label></li>
- </ul>
- </fieldset>
+ <fieldset id="syncFiles">
+ <legend>{'update_sync_files'|@translate}</legend>
+ <ul>
+ <li><label><input type="radio" name="sync" value="" {if empty($introduction.sync)}checked="checked"{/if}/> {'nothing'|@translate}</label></li>
+ <li><label><input type="radio" name="sync" value="dirs" {if 'dirs'==$introduction.sync}checked="checked"{/if}/> {'update_sync_dirs'|@translate}</label></li>
- <fieldset id="syncMetadata">
- <legend>{'update_sync_metadata'|@translate}</legend>
- {'update_used_metadata'|@translate} : {$METADATA_LIST}.<br/>
- <ul>
- <li><label><input type="radio" name="sync" value="metadata_new" {if 'metadata_new'==$introduction.sync}checked="checked"{/if}/> {'update_sync_metadata_new'|@translate}</label></li>
- <li><label><input type="radio" name="sync" value="metadata_all" {if 'metadata_all'==$introduction.sync}checked="checked"{/if}/> {'update_sync_metadata_all'|@translate}</label></li>
- </ul>
- </fieldset>
+ <li><label><input type="radio" name="sync" value="files" {if 'files'==$introduction.sync}checked="checked"{/if}/> {'update_sync_all'|@translate}</label>
+ <ul style="padding-left:3em">
+ <li><label><input type="checkbox" name="display_info" value="1" {if $introduction.display_info}checked="checked"{/if}/> {'update_display_info'|@translate}</label></li>
+ <li><label><input type="checkbox" name="add_to_caddie" value="1" {if $introduction.add_to_caddie}checked="checked"{/if}/> {'add new elements to caddie'|@translate}</label></li>
+ <li><label>{'Minimum privacy level'|@translate} <select name="privacy_level">{html_options options=$introduction.privacy_level_options selected=$introduction.privacy_level_selected}</select></label></li>
+ </ul>
+ </li>
+ </ul>
+ </fieldset>
+
+ <fieldset id="syncMetadata">
+ <legend>{'update_sync_metadata'|@translate}</legend>
+ <label><input type="checkbox" name="sync_meta" {if $introduction.sync_meta}checked="checked"{/if}/> {'synchronize metadata'|@translate} ({$METADATA_LIST})</label></li>
+ <ul style="padding-left:3em">
+ <li>
+ <label><input type="checkbox" name="meta_all" {if $introduction.meta_all}checked="checked"{/if}/> {'update_sync_metadata_all'|@translate}</label>
+ </li>
+ <li>
+ <label><input type="checkbox" name="meta_empty_overrides" {if $introduction.meta_empty_overrides}checked="checked"{/if}/> {'overrides existing values with empty ones'|@translate}</label>
+ </li>
+ </ul>
+ </fieldset>
<fieldset id="syncSimulate">
<legend></legend>
diff --git a/language/en_UK/admin.lang.php b/language/en_UK/admin.lang.php
index e2f306529..f41f95ea6 100644
--- a/language/en_UK/admin.lang.php
+++ b/language/en_UK/admin.lang.php
@@ -446,7 +446,6 @@ $lang['update_sync_dirs'] = 'only directories';
$lang['update_sync_files'] = 'synchronize files structure with database';
$lang['update_sync_metadata'] = 'synchronize files metadata with database elements informations';
$lang['update_sync_metadata_all'] = 'even already synchronized elements';
-$lang['update_sync_metadata_new'] = 'only never synchronized elements';
$lang['update_used_metadata'] = 'Used metadata';
$lang['update_wrong_dirname_info'] = 'The name of directories and files must be composed of letters, figures, "-", "_" or "."';
$lang['update_wrong_dirname_short'] = 'wrong filename';
@@ -660,4 +659,6 @@ $lang['Optimizations errors'] = 'Optimizations have been completed with some err
$lang['delete this comment'] = 'delete this comment';
$lang['link_info_image'] = 'Modify information';
$lang['edit category informations'] = 'edit category informations';
+$lang['nothing'] = 'nothing';
+$lang['overrides existing values with empty ones'] = 'overrides existing values with empty ones';
?> \ No newline at end of file
diff --git a/language/es_ES/admin.lang.php b/language/es_ES/admin.lang.php
index 968bac9f1..f1b12eeff 100644
--- a/language/es_ES/admin.lang.php
+++ b/language/es_ES/admin.lang.php
@@ -447,7 +447,6 @@ $lang['update_sync_dirs'] = 'repertorios únicamente';
$lang['update_sync_files'] = 'sincronizar la estructura de los ficheros con la base de datos';
$lang['update_sync_metadata'] = 'sincronizar las informaciones de los elementos en la base de datos a partir de los méta-datos de los ficheros';
$lang['update_sync_metadata_all'] = 'hasta los elementos ya sincronizados';
-$lang['update_sync_metadata_new'] = 'unicamente los elementos jamás sincronizados';
$lang['update_used_metadata'] = 'Méta-datos empleadas';
$lang['update_wrong_dirname_info'] = 'El nombre de los repertorios y de los ficheros debe estar constituido sólo por letras, por cifras, de "-", "_" y "."';
$lang['update_wrong_dirname_short'] = 'nombre de fichero erróneo';
@@ -666,4 +665,6 @@ $lang['You are running the latest version of Piwigo.'] = 'Usted utiliza la últi
$lang['delete this comment'] = 'Borrar este comentario';
$lang['link_info_image'] = 'Modificar las informaciones';
$lang['edit category informations'] = 'editar las informaciones de esta categoría';
+$lang['nothing'] = 'nada';
+/* TODO */ $lang['overrides existing values with empty ones'] = 'overrides existing values with empty ones';
?> \ No newline at end of file
diff --git a/language/fr_FR/admin.lang.php b/language/fr_FR/admin.lang.php
index 3ade9d3e0..a38fbe321 100644
--- a/language/fr_FR/admin.lang.php
+++ b/language/fr_FR/admin.lang.php
@@ -446,7 +446,6 @@ $lang['update_sync_dirs'] = 'répertoires uniquement';
$lang['update_sync_files'] = 'synchroniser la structure des fichiers avec la base de données';
$lang['update_sync_metadata'] = 'synchroniser les informations des éléments dans la base de données à partir des méta-données des fichiers';
$lang['update_sync_metadata_all'] = 'même les éléments déjà synchronisés';
-$lang['update_sync_metadata_new'] = 'uniquement les éléments jamais synchronisés';
$lang['update_used_metadata'] = 'Méta-données employées';
$lang['update_wrong_dirname_info'] = 'Le nom des répertoires et des fichiers ne doit être constitué que de lettres, de chiffres, de "-", "_" et "."';
$lang['update_wrong_dirname_short'] = 'nom de fichier erroné';
@@ -649,8 +648,7 @@ $lang['Hits'] = 'Utilisations';
$lang['GD library is missing'] = 'la bibliothèque GD est manquante';
$lang['conf_extents'] = 'Templates (modèles)';
$lang['extend_for_templates'] = 'Etendre les templates';
-$lang['Replacement of original templates'] =
- 'Remplacement des templates d\'origine par vos templates adaptés du dossier template-extension';
+$lang['Replacement of original templates'] = 'Remplacement des templates d\'origine par vos templates adaptés du dossier template-extension';
$lang['Replacers'] = 'Remplaçants (templates modifiés)';
$lang['Original templates'] = 'Templates d\'origine';
$lang['Optional URL keyword'] = 'Paramètre facultatif de l\'URL';
@@ -660,4 +658,6 @@ $lang['Optimizations errors'] = 'Certaines optimisations se sont terminées avec
$lang['delete this comment'] = 'supprimer ce commentaire';
$lang['link_info_image'] = 'Modifier les informations';
$lang['edit category informations'] = 'éditer les informations de cette catégorie';
+$lang['nothing'] = 'rien';
+/* TODO */ $lang['overrides existing values with empty ones'] = 'overrides existing values with empty ones';
?> \ No newline at end of file
diff --git a/language/it_IT/admin.lang.php b/language/it_IT/admin.lang.php
index 75380021d..071359ef4 100644
--- a/language/it_IT/admin.lang.php
+++ b/language/it_IT/admin.lang.php
@@ -446,7 +446,6 @@ $lang['update_sync_dirs'] = 'solo directory';
$lang['update_sync_files'] = 'sincronizzare la struttura dei files con la base dati';
$lang['update_sync_metadata'] = 'sincronizzare gli elementi della base dati con le informazioni presenti nei metadati dei files';
$lang['update_sync_metadata_all'] = 'anche gli elementi già sincronizzati';
-$lang['update_sync_metadata_new'] = 'solo gli elementi mai sincronizzati';
$lang['update_used_metadata'] = 'Metadati usati';
$lang['update_wrong_dirname_info'] = 'Il nome delle directory e dei files deve essere composto da lettere, numeri, "-", "_" o "."';
$lang['update_wrong_dirname_short'] = 'Nome file errato';
@@ -649,8 +648,7 @@ $lang['Hits'] = 'Uso';
$lang['GD library is missing'] = 'la biblioteca GD è manquante';
$lang['conf_extents'] = 'Templates (modelli)';
$lang['extend_for_templates'] = 'Estendere i templates';
-$lang['Replacement of original templates'] =
- 'Sostitizione dei templates d\'origine con i vostri templates personalizzati dalla sotto directory template-extension';
+$lang['Replacement of original templates'] = 'Sostitizione dei templates d\'origine con i vostri templates personalizzati dalla sotto directory template-extension';
$lang['Replacers'] = 'Sostituzione (templates personalizzati)';
$lang['Original templates'] = 'Templates d\'origine';
$lang['Optional URL keyword'] = 'Parametro facultativo del\'URL';
@@ -660,4 +658,6 @@ $lang['Optimizations errors'] = 'Ottimizzazioni concluse con errori.';
$lang['delete this comment'] = 'cancellare commenti';
$lang['link_info_image'] = 'Modifica le informazioni';
$lang['edit category informations'] = 'Modificare le informazioni della categoria';
+/* TODO */ $lang['nothing'] = 'nothing';
+/* TODO */ $lang['overrides existing values with empty ones'] = 'overrides existing values with empty ones';
?> \ No newline at end of file
diff --git a/language/nl_NL/admin.lang.php b/language/nl_NL/admin.lang.php
index adf7e22e0..f276ee170 100644
--- a/language/nl_NL/admin.lang.php
+++ b/language/nl_NL/admin.lang.php
@@ -447,7 +447,6 @@ $lang['update_sync_dirs'] = 'alleen mappen';
$lang['update_sync_files'] = 'synchronizeer bestanden met de database';
$lang['update_sync_metadata'] = 'synchronizeer bestands metadata met de database element informatie';
$lang['update_sync_metadata_all'] = 'ook reeds synchronizeerde elementen';
-$lang['update_sync_metadata_new'] = 'alleen nooit gesynchronizeerde elementen';
$lang['update_used_metadata'] = 'Gebruikte metadata';
$lang['update_wrong_dirname_info'] = 'De naam van de mappen en bestanden moeten bestaan uit letters, "-", "_" of "."';
$lang['update_wrong_dirname_short'] = 'verkeerde bestandsnaam';
@@ -666,4 +665,6 @@ $lang['You are running the latest version of Piwigo.'] = 'Je hebt de laatste ver
$lang['delete this comment'] = 'verwijder dit commentaar';
$lang['link_info_image'] = 'Aanpassen informatie';
$lang['edit category informations'] = 'bewerk categorie informatie';
+/* TODO */ $lang['nothing'] = 'nothing';
+/* TODO */ $lang['overrides existing values with empty ones'] = 'overrides existing values with empty ones';
?> \ No newline at end of file