diff --git a/app/time_conditions/time_condition_edit.php b/app/time_conditions/time_condition_edit.php index e085e17ff1..bd89c2402b 100644 --- a/app/time_conditions/time_condition_edit.php +++ b/app/time_conditions/time_condition_edit.php @@ -526,7 +526,9 @@ //get main dialplan entry $sql = "select * from v_dialplans "; $sql .= "where dialplan_uuid = :dialplan_uuid "; + $sql .= "and domain_uuid = :domain_uuid "; $parameters['dialplan_uuid'] = $dialplan_uuid; + $parameters['domain_uuid'] = $domain_uuid; $database = new database; $row = $database->select($sql, $parameters, 'row'); if (is_array($row) && @sizeof($row) != 0) { @@ -549,6 +551,7 @@ $sql = "select dialplan_detail_group, dialplan_detail_tag, dialplan_detail_type, dialplan_detail_data "; $sql .= "from v_dialplan_details "; $sql .= "where dialplan_uuid = :dialplan_uuid "; + $sql .= "and domain_uuid = :domain_uuid "; $sql .= "and "; $sql .= "( "; $sql .= " ( "; @@ -562,6 +565,7 @@ $sql .= ") "; $sql .= "order by dialplan_detail_group asc, dialplan_detail_order asc"; $parameters['dialplan_uuid'] = $dialplan_uuid; + $parameters['domain_uuid'] = $domain_uuid; $database = new database; $dialplan_details = $database->select($sql, $parameters, 'all'); unset($sql, $parameters); @@ -1265,4 +1269,4 @@ if ($action == 'update') { //include the footer require_once "resources/footer.php"; -?> \ No newline at end of file +?>