mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Dialplan Manager: Adjust toggle method to support multiple domains if used on show all.
This commit is contained in:
@@ -1218,9 +1218,11 @@
|
|||||||
}
|
}
|
||||||
if (is_array($uuids) && @sizeof($uuids) != 0) {
|
if (is_array($uuids) && @sizeof($uuids) != 0) {
|
||||||
$sql = "select ".$this->uuid_prefix."uuid as uuid, ".$this->toggle_field." as toggle, dialplan_context from v_".$this->table." ";
|
$sql = "select ".$this->uuid_prefix."uuid as uuid, ".$this->toggle_field." as toggle, dialplan_context from v_".$this->table." ";
|
||||||
$sql .= "where (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
$sql .= "where ".$this->uuid_prefix."uuid in (".implode(', ', $uuids).") ";
|
||||||
$sql .= "and ".$this->uuid_prefix."uuid in (".implode(', ', $uuids).") ";
|
if (!permission_exists('dialplan_all')) {
|
||||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
||||||
|
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||||
|
}
|
||||||
$database = new database;
|
$database = new database;
|
||||||
$rows = $database->select($sql, $parameters, 'all');
|
$rows = $database->select($sql, $parameters, 'all');
|
||||||
if (is_array($rows) && @sizeof($rows) != 0) {
|
if (is_array($rows) && @sizeof($rows) != 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user