mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-05 17:32:25 +02:00
Order by the field(s) used to find duplicates
When searching for duplicates, also sort the results by the fields used to find the duplicates.
This commit is contained in:
committed by
Pierrick Le Gall
parent
551457f2b6
commit
05fb7aafd4
@@ -651,10 +651,15 @@ if (count($page['cat_elements_id']) > 0)
|
||||
$is_category = true;
|
||||
}
|
||||
|
||||
// If using the 'duplicates' filter,
|
||||
// order by the fields that are used to find duplicates.
|
||||
if (isset($_SESSION['bulk_manager_filter']['prefilter'])
|
||||
and 'duplicates' == $_SESSION['bulk_manager_filter']['prefilter'])
|
||||
and 'duplicates' === $_SESSION['bulk_manager_filter']['prefilter']
|
||||
and isset($duplicates_on_fields))
|
||||
{
|
||||
$conf['order_by'] = ' ORDER BY file, id';
|
||||
// The $duplicates_on_fields variable is defined in ./batch_manager.php
|
||||
$order_by_fields = array_merge( $duplicates_on_fields, array( 'id' ) );
|
||||
$conf['order_by'] = ' ORDER BY '.join(', ', $order_by_fields);
|
||||
}
|
||||
|
||||
$query = '
|
||||
|
||||
Reference in New Issue
Block a user