mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Call Center - List: Implement natural sorting of Extension column.
This commit is contained in:
@@ -79,6 +79,7 @@
|
||||
//get http variables and set as php variables
|
||||
$order_by = $_GET["order_by"] ?? '';
|
||||
$order = $_GET["order"] ?? '';
|
||||
$sort = $order_by == 'queue_extension' ? 'natural' : null;
|
||||
|
||||
//add the search term
|
||||
$search = strtolower($_GET["search"] ?? '');
|
||||
@@ -117,7 +118,7 @@
|
||||
|
||||
//get the list
|
||||
$sql = str_replace('count(*)', '*', $sql ?? '');
|
||||
$sql .= order_by($order_by, $order, 'queue_name', 'asc');
|
||||
$sql .= order_by($order_by, $order, 'queue_name', 'asc', $sort);
|
||||
$sql .= limit_offset($rows_per_page, $offset);
|
||||
$database = new database;
|
||||
$result = $database->select($sql, $parameters ?? null, 'all');
|
||||
|
||||
Reference in New Issue
Block a user