mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-20 16:42:59 +02:00
fixes #210, filter duplicates on checksum
But it only works for images having their md5sum filled in database. Which is never the case for photos added by synchronization.
This commit is contained in:
+26
-1
@@ -99,14 +99,29 @@ if (isset($_POST['submitFilter']))
|
||||
|
||||
if ('duplicates' == $_POST['filter_prefilter'])
|
||||
{
|
||||
$has_options = false;
|
||||
|
||||
if (isset($_POST['filter_duplicates_checksum']))
|
||||
{
|
||||
$_SESSION['bulk_manager_filter']['duplicates_checksum'] = true;
|
||||
$has_options = true;
|
||||
}
|
||||
|
||||
if (isset($_POST['filter_duplicates_date']))
|
||||
{
|
||||
$_SESSION['bulk_manager_filter']['duplicates_date'] = true;
|
||||
$has_options = true;
|
||||
}
|
||||
|
||||
if (isset($_POST['filter_duplicates_dimensions']))
|
||||
{
|
||||
$_SESSION['bulk_manager_filter']['duplicates_dimensions'] = true;
|
||||
$has_options = true;
|
||||
}
|
||||
|
||||
if (!$has_options or isset($_POST['filter_duplicates_filename']))
|
||||
{
|
||||
$_SESSION['bulk_manager_filter']['duplicates_filename'] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -357,7 +372,17 @@ SELECT
|
||||
|
||||
|
||||
case 'duplicates':
|
||||
$duplicates_on_fields = array('file');
|
||||
$duplicates_on_fields = array();
|
||||
|
||||
if (isset($_SESSION['bulk_manager_filter']['duplicates_filename']))
|
||||
{
|
||||
$duplicates_on_fields[] = 'file';
|
||||
}
|
||||
|
||||
if (isset($_SESSION['bulk_manager_filter']['duplicates_checksum']))
|
||||
{
|
||||
$duplicates_on_fields[] = 'md5sum';
|
||||
}
|
||||
|
||||
if (isset($_SESSION['bulk_manager_filter']['duplicates_date']))
|
||||
{
|
||||
|
||||
@@ -349,7 +349,8 @@ var sliders = {
|
||||
|
||||
<span id="duplicates_options" style="{if !isset($filter.prefilter) or $filter.prefilter ne 'duplicates'}display:none{/if}">
|
||||
{'based on'|translate}
|
||||
<label class="font-checkbox"><span class="icon-check"></span><input type="checkbox" checked="checked" disabled="disabled"> {'file name'|translate}
|
||||
<label class="font-checkbox"><span class="icon-check"></span><input type="checkbox" name="filter_duplicates_filename" {if isset($filter.duplicates_filename)}checked="checked"{/if}> {'file name'|translate}</label>
|
||||
<label class="font-checkbox" title="md5sum"><span class="icon-check"></span><input type="checkbox" name="filter_duplicates_checksum" {if isset($filter.duplicates_checksum)}checked="checked"{/if}> {'checksum'|translate}</label>
|
||||
<label class="font-checkbox"><span class="icon-check"></span><input type="checkbox" name="filter_duplicates_date" {if isset($filter.duplicates_date) or (isset($filter.prefilter) and $filter.prefilter ne 'duplicates')}checked="checked"{/if}> {'date & time'|translate}</label>
|
||||
<label class="font-checkbox"><span class="icon-check"></span><input type="checkbox" name="filter_duplicates_dimensions" {if isset($filter.duplicates_dimensions)}checked="checked"{/if}> {'width & height'|translate}</label>
|
||||
</span>
|
||||
|
||||
@@ -998,4 +998,5 @@ $lang['Delete album "%s" and its %d sub-albums.'] = 'Delete album "%s" and its %
|
||||
$lang['delete album and all %d photos, even the %d associated to other albums'] = 'delete album and all %d photos, even the %d associated to other albums';
|
||||
$lang['delete album and the %d orphan photos'] = 'delete album and the %d orphan photos';
|
||||
$lang['delete only album, not photos'] = 'delete only album, not photos';
|
||||
$lang['Confirm deletion'] = 'Confirm deletion';
|
||||
$lang['Confirm deletion'] = 'Confirm deletion';
|
||||
$lang['checksum'] = 'checksum';
|
||||
@@ -1000,4 +1000,5 @@ $lang['Delete album "%s" and its %d sub-albums.'] = 'Supprimer l\'album "%s" et
|
||||
$lang['delete album and all %d photos, even the %d associated to other albums'] = 'supprimer l\'album et toutes les %d photos, mêmes les %d associées à d\'autres albums';
|
||||
$lang['delete album and the %d orphan photos'] = 'supprimer l\'album et les %d photos orphelines';
|
||||
$lang['delete only album, not photos'] = 'supprimer uniquement l\'album, pas les photos';
|
||||
$lang['Confirm deletion'] = 'Confirmer la suppression';
|
||||
$lang['Confirm deletion'] = 'Confirmer la suppression';
|
||||
$lang['checksum'] = 'somme de contrôle';
|
||||
Reference in New Issue
Block a user