From bb1f1d03544073d52f69c002fecc22560aefc6ce Mon Sep 17 00:00:00 2001 From: markjcrane Date: Fri, 21 Nov 2025 17:45:28 -0700 Subject: [PATCH] Set the total_ring_groups default value to 0 --- app/ring_groups/ring_group_edit.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/app/ring_groups/ring_group_edit.php b/app/ring_groups/ring_group_edit.php index 9713d2a7cf..13ea5adaf4 100644 --- a/app/ring_groups/ring_group_edit.php +++ b/app/ring_groups/ring_group_edit.php @@ -43,6 +43,9 @@ $language = new text; $text = $language->get(); +//initialize the destinations object + $destination = new destinations; + //set the defaults $ring_group_strategy = ''; $ring_group_name = ''; @@ -56,6 +59,7 @@ $ring_group_forward_toll_allow = ''; $ring_group_description = ''; $onkeyup = ''; + $total_ring_groups = '0'; $ring_group_ringback = $settings->get('ring_group', 'default_ringback', ''); $ring_group_call_screen_enabled = $settings->get('ring_group', 'call_screen_enabled', false); $ring_group_call_forward_enabled = $settings->get('ring_group', 'call_forward_enabled', false); @@ -63,8 +67,9 @@ $destination_delay_max = $settings->get('ring_group', 'destination_delay_max', ''); $destination_timeout_max = $settings->get('ring_group', 'destination_timeout_max', ''); -//initialize the destinations object - $destination = new destinations; +//get the domain_uuid + $domain_uuid = $_SESSION['domain_uuid']; + $domain_name = $_SESSION['domain_name']; //get total domain ring group count $sql = "select count(*) from v_ring_groups "; @@ -73,10 +78,6 @@ $total_ring_groups = $database->select($sql, $parameters ?? null, 'column'); unset($sql, $parameters); -//get the domain_uuid - $domain_uuid = $_SESSION['domain_uuid']; - $domain_name = $_SESSION['domain_name']; - //action add or update if (!empty($_REQUEST["id"]) || !empty($_REQUEST["ring_group_uuid"])) { $action = "update";