mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Update provision.php (#2753)
Some extensions are accessible to multiple users. Sort the list to select best directory name match for extension.
This commit is contained in:
committed by
FusionPBX
parent
31575c25f7
commit
2d70c93072
@@ -366,6 +366,7 @@ include "root.php";
|
||||
$sql .= "AND e.enabled = 'true' ";
|
||||
$sql .= "AND e.directory_visible = 'true' "; # TODO: not right field but it works for our district.
|
||||
$sql .= "AND e.directory_exten_visible = 'true' "; # TODO: not right field but it works for our district.
|
||||
$sql .= "ORDER BY CASE WHEN directory_full_name LIKE '%".$contact['contact_name_given']."%' THEN 1 ELSE 2 END DESC ";
|
||||
$prep_statement = $this->db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$user_extentions = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
|
||||
Reference in New Issue
Block a user