mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-07 09:13:02 +02:00
related to #1461 Adding natural sort order ASC and DESC
This commit is contained in:
+4
-2
@@ -30,7 +30,9 @@ $sort_orders = array(
|
||||
'date_creation DESC',
|
||||
'date_creation ASC',
|
||||
'date_available DESC',
|
||||
'date_available ASC'
|
||||
'date_available ASC',
|
||||
'natural_order DESC',
|
||||
'natural_order ASC'
|
||||
);
|
||||
|
||||
if (isset($_POST['simpleAutoOrder']) || isset($_POST['recursiveAutoOrder']) )
|
||||
@@ -98,7 +100,7 @@ SELECT id, name, id_uppercat
|
||||
|
||||
array_multisort(
|
||||
$sort,
|
||||
SORT_REGULAR,
|
||||
$order_by_field === "natural_order" ? SORT_NATURAL : SORT_REGULAR,
|
||||
'ASC' == $order_by_asc ? SORT_ASC : SORT_DESC,
|
||||
$categories
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user