diff options
author | vdigital <vdigital@piwigo.org> | 2007-01-02 09:02:39 +0000 |
---|---|---|
committer | vdigital <vdigital@piwigo.org> | 2007-01-02 09:02:39 +0000 |
commit | 0f2b554608c15cf92e3619dadfff188257f4f8e1 (patch) | |
tree | eb487507bb7c22132e39355cbe04a8011ddd08a9 | |
parent | 9c914a2b6659c58b5648fbd05c6fcedb2f2a808e (diff) |
Physical duplicate files in Admin Advanced Functions
git-svn-id: http://piwigo.org/svn/trunk@1688 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r-- | admin/advanced_feature.php | 3 | ||||
-rw-r--r-- | admin/element_set.php | 29 | ||||
-rw-r--r-- | language/en_UK.iso-8859-1/admin.lang.php | 2 | ||||
-rw-r--r-- | language/en_UK.iso-8859-1/help/advanced_feature.html | 6 | ||||
-rw-r--r-- | language/fr_FR.iso-8859-1/admin.lang.php | 2 | ||||
-rw-r--r-- | language/fr_FR.iso-8859-1/help/advanced_feature.html | 6 | ||||
-rw-r--r-- | template/yoga/admin/advanced_feature.tpl | 1 |
7 files changed, 43 insertions, 6 deletions
diff --git a/admin/advanced_feature.php b/admin/advanced_feature.php index 8b0d58aaa..a178b50f1 100644 --- a/admin/advanced_feature.php +++ b/admin/advanced_feature.php @@ -65,6 +65,7 @@ $template->assign_vars( array(
// 'U_ADV_????' => $start_url.'???',
'U_ADV_ELEMENT_NOT_LINKED' => PHPWG_ROOT_PATH.'admin.php?page=element_set&cat=not_linked',
+ 'U_ADV_DUP_FILES' => PHPWG_ROOT_PATH.'admin.php?page=element_set&cat=duplicates',
'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=advanced_feature'
)
);
@@ -74,4 +75,4 @@ $template->assign_vars( // +-----------------------------------------------------------------------+
$template->assign_var_from_handle('ADMIN_CONTENT', 'advanced_feature');
-?>
\ No newline at end of file +?>
diff --git a/admin/element_set.php b/admin/element_set.php index 583777ae9..530bbd5f5 100644 --- a/admin/element_set.php +++ b/admin/element_set.php @@ -137,7 +137,7 @@ SELECT element_id } else if ('not_linked' == $_GET['cat']) { - $page['title'] = 'elements not linked to any virtual categories'; + $page['title'] = l10n('Elements_not_linked'); // we are searching elements not linked to any virtual category $query = ' @@ -162,7 +162,32 @@ SELECT DISTINCT(image_id) $page['cat_elements_id'] = array_diff($all_elements, $linked_to_virtual); } +else if ('duplicates' == $_GET['cat']) +{ + $page['title'] = l10n('Duplicates'); + + // we are searching related elements twice or more to physical categories + // 1 - Retrieve Files + $query = ' +SELECT DISTINCT(file) + FROM '.IMAGES_TABLE.' + GROUP BY file +HAVING COUNT(DISTINCT storage_category_id) > 1 +;'; + + $duplicate_files = array_from_query($query, 'file'); + $duplicate_files[]='Nofiles'; + // 2 - Retrives related picture ids + $query = ' +SELECT id, file + FROM '.IMAGES_TABLE.' +WHERE file IN (\''.implode("','", $duplicate_files).'\') +ORDER BY file, id +;'; + $page['cat_elements_id'] = array_from_query($query, 'id'); + $page['cat_elements_id'][] = 0; +} // +-----------------------------------------------------------------------+ // | first element to display | // +-----------------------------------------------------------------------+ @@ -202,4 +227,4 @@ switch ($_GET['mode']) break; } } -?>
\ No newline at end of file +?> diff --git a/language/en_UK.iso-8859-1/admin.lang.php b/language/en_UK.iso-8859-1/admin.lang.php index 158fcca78..4fd51d386 100644 --- a/language/en_UK.iso-8859-1/admin.lang.php +++ b/language/en_UK.iso-8859-1/admin.lang.php @@ -571,6 +571,6 @@ $lang['note_check_exif'] = '%s must be to set to false in your config_local.inc. $lang['note_check_more_info'] = 'Go to %s or %s for more informations.'; $lang['note_check_more_info_forum'] = 'the forum'; $lang['note_check_more_info_wiki'] = 'the wiki'; - +$lang['Duplicates'] = 'Files with same name in more than one physical category'; ?> diff --git a/language/en_UK.iso-8859-1/help/advanced_feature.html b/language/en_UK.iso-8859-1/help/advanced_feature.html index 75f400f32..821604712 100644 --- a/language/en_UK.iso-8859-1/help/advanced_feature.html +++ b/language/en_UK.iso-8859-1/help/advanced_feature.html @@ -6,7 +6,11 @@ <li>
<strong>Not linked elements:</strong>
- Display images witch are not associaed with an virtual catgory
+ Display images which are not associated to any virtual category.
+ </li>
+ <li>
+ <strong>Files with same name in more than one physical category:</strong>
+ Display images or any files which are found with the same filename in some categories.
</li>
</ul>
diff --git a/language/fr_FR.iso-8859-1/admin.lang.php b/language/fr_FR.iso-8859-1/admin.lang.php index 877597c02..a29c019d5 100644 --- a/language/fr_FR.iso-8859-1/admin.lang.php +++ b/language/fr_FR.iso-8859-1/admin.lang.php @@ -569,5 +569,7 @@ $lang['note_check_exif'] = '%s doit être mis à "false" dans votre fichier config $lang['note_check_more_info'] = 'Allez sur %s ou %s pour plus d\'informations.'; $lang['note_check_more_info_forum'] = 'le forum'; $lang['note_check_more_info_wiki'] = 'le wiki'; +$lang['Duplicates'] = 'Fichiers portant le même nom dans plusieurs' . + ' catégories physiques'; ?> diff --git a/language/fr_FR.iso-8859-1/help/advanced_feature.html b/language/fr_FR.iso-8859-1/help/advanced_feature.html index 221e6f074..d58a05426 100644 --- a/language/fr_FR.iso-8859-1/help/advanced_feature.html +++ b/language/fr_FR.iso-8859-1/help/advanced_feature.html @@ -5,8 +5,12 @@ <ul>
<li>
- <strong>Eléments non liés:</strong>
+ <strong>Eléments non liés :</strong>
Affiche les images qui ne sont pas associées à une catégorie virtuelle
</li>
+ <li>
+ <strong>Fichiers portant le même nom dans plusieurs catégories physiques :</strong>
+ Affiche les images ou les éventuels fichiers qui pourraient être trouvés dans plusieurs catégories.
+ </li>
</ul>
diff --git a/template/yoga/admin/advanced_feature.tpl b/template/yoga/admin/advanced_feature.tpl index 13a2d62ce..9925d83e4 100644 --- a/template/yoga/admin/advanced_feature.tpl +++ b/template/yoga/admin/advanced_feature.tpl @@ -9,4 +9,5 @@ <ul>
<!-- <li><a href="{U_ADV_????}" {TAG_INPUT_ENABLED}>{lang:update categories informations}</a></li>-->
<li><a href="{U_ADV_ELEMENT_NOT_LINKED}" {TAG_INPUT_ENABLED}>{lang:Elements_not_linked}</a></li>
+ <li><a href="{U_ADV_DUP_FILES}" {TAG_INPUT_ENABLED}>{lang:Duplicates}</a></li>
</ul>
|