Update dialplan_outbound_add.php
Use a parameterized query for the domain_uuid.
This commit is contained in:
parent
24ae553d14
commit
8528f38c51
|
|
@ -729,12 +729,13 @@
|
||||||
$sql = "select * from v_gateways ";
|
$sql = "select * from v_gateways ";
|
||||||
$sql .= "where enabled = 'true' ";
|
$sql .= "where enabled = 'true' ";
|
||||||
if (permission_exists('outbound_route_any_gateway')) {
|
if (permission_exists('outbound_route_any_gateway')) {
|
||||||
$sql .= "order by domain_uuid = '$domain_uuid' DESC, gateway ";
|
$sql .= "order by domain_uuid = :domain_uuid DESC, gateway ";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$sql .= "and domain_uuid = :domain_uuid ";
|
$sql .= "and domain_uuid = :domain_uuid ";
|
||||||
$parameters['domain_uuid'] = $domain_uuid;
|
|
||||||
}
|
}
|
||||||
|
$parameters['domain_uuid'] = $domain_uuid;
|
||||||
$database = new database;
|
$database = new database;
|
||||||
$gateways = $database->select($sql, $parameters, 'all');
|
$gateways = $database->select($sql, $parameters, 'all');
|
||||||
unset($sql, $parameters);
|
unset($sql, $parameters);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue