mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-05-07 05:44:58 +02:00
batch manager: ability to filter on a specific duplicates option
example : admin.php?page=batch_manager&filter=prefilter-duplicates-checksum this is to prepare Tour of 2.9 new features
This commit is contained in:
+15
-2
@@ -212,7 +212,20 @@ elseif (isset($_GET['filter']))
|
||||
switch ($type)
|
||||
{
|
||||
case 'prefilter':
|
||||
$_SESSION['bulk_manager_filter']['prefilter'] = $value;
|
||||
if (preg_match('/^duplicates-?/', $value))
|
||||
{
|
||||
list(, $duplicate_field) = explode('-', $value, 2);
|
||||
$_SESSION['bulk_manager_filter']['prefilter'] = 'duplicates';
|
||||
|
||||
if (in_array($duplicate_field, array('filename', 'checksum', 'date', 'dimensions')))
|
||||
{
|
||||
$_SESSION['bulk_manager_filter']['duplicates_'.$duplicate_field] = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$_SESSION['bulk_manager_filter']['prefilter'] = $value;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'album': case 'category': case 'cat':
|
||||
@@ -392,7 +405,7 @@ SELECT
|
||||
$duplicates_on_fields[] = 'width';
|
||||
$duplicates_on_fields[] = 'height';
|
||||
}
|
||||
|
||||
|
||||
$query = '
|
||||
SELECT
|
||||
GROUP_CONCAT(id) AS ids
|
||||
|
||||
Reference in New Issue
Block a user