From a6f29aadeb41eaf4ffc41be5d1c164aee0fabe16 Mon Sep 17 00:00:00 2001 From: fusionate Date: Thu, 19 Oct 2023 18:52:26 +0000 Subject: [PATCH] Call Flows - List: Implement natural sorting of Extension column. --- app/call_flows/call_flows.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/call_flows/call_flows.php b/app/call_flows/call_flows.php index 8a6cf3f4b1..e613116a71 100644 --- a/app/call_flows/call_flows.php +++ b/app/call_flows/call_flows.php @@ -89,6 +89,7 @@ //get variables used to control the order $order_by = $_GET["order_by"] ?? ''; $order = $_GET["order"] ?? ''; + $sort = $order_by == 'call_flow_extension' ? 'natural' : null; //add the search term $search = strtolower($search ?? ''); @@ -131,7 +132,7 @@ //get the list $sql = str_replace('count(*)', '*', $sql ?? ''); - $sql .= order_by($order_by, $order, 'call_flow_name', 'asc'); + $sql .= order_by($order_by, $order, 'call_flow_name', 'asc', $sort); $sql .= limit_offset($rows_per_page, $offset); $database = new database; $call_flows = $database->select($sql, $parameters ?? null, 'all');