diff --git a/app/call_center/resources/classes/call_center.php b/app/call_center/resources/classes/call_center.php index 5cff2325c6..ebc78f6c2d 100644 --- a/app/call_center/resources/classes/call_center.php +++ b/app/call_center/resources/classes/call_center.php @@ -70,7 +70,7 @@ $sql = "select dialplan_uuid, dialplan_name, dialplan_description from v_dialplans "; $sql .= "where dialplan_uuid = '".$this->dialplan_uuid."' "; $sql .= "and domain_uuid = '".$this->domain_uuid."' "; - echo $sql; + //echo $sql; $prep_statement = $this->db->prepare($sql); if ($prep_statement) { $prep_statement->execute(); diff --git a/app/sip_profiles/app_defaults.php b/app/sip_profiles/app_defaults.php index fab6a7643f..0e87889da4 100644 --- a/app/sip_profiles/app_defaults.php +++ b/app/sip_profiles/app_defaults.php @@ -69,6 +69,7 @@ else { $sip_profile_dir = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/resources/templates/conf/sip_profiles/*.xml'; } + $db->beginTransaction(); $xml_files = glob($sip_profile_dir); foreach ($xml_files as &$xml_file) { //load the sip profile xml and save it into an array @@ -154,6 +155,7 @@ } } } + $db->commit(); //save the sip profile xml save_sip_profile_xml(); @@ -163,26 +165,6 @@ } unset($prep_statement); } - } - -//if there is more than one domain then disable the force domains sip profile settings - if ($domains_processed == 1) { - if (count($_SESSION['domains']) > 1) { - //disable force domains - $sql = "update v_sip_profile_settings set "; - $sql .= "sip_profile_setting_enabled = 'false' "; - $sql .= "where sip_profile_setting_name = 'force-register-domain'"; - $sql .= "or sip_profile_setting_name = 'force-subscription-domain'"; - $sql .= "or sip_profile_setting_name = 'force-register-db-domain'"; - $db->exec(check_sql($sql)); - unset($sql); - - //save the sip profile xml - save_sip_profile_xml(); - - //apply settings reminder - $_SESSION["reload_xml"] = true; - } } //if empty, set sip_profile_enabled = true diff --git a/resources/install.php b/resources/install.php index e2a8f4e9ba..c677a87e7a 100644 --- a/resources/install.php +++ b/resources/install.php @@ -1068,6 +1068,7 @@ if ($_POST["install_step"] == "3" && count($_POST) > 0 && strlen($_POST["persist $x++; $tmp[$x]['group_name'] = 'agent'; $tmp[$x]['group_description'] = 'Call Center Agent Group'; + $db_tmp->beginTransaction(); foreach($tmp as $row) { $sql = "insert into v_groups "; $sql .= "("; @@ -1088,6 +1089,7 @@ if ($_POST["install_step"] == "3" && count($_POST) > 0 && strlen($_POST["persist unset($sql); } unset($tmp); + $db_tmp->commit(); //add a user and then add the user to the superadmin group //prepare the values @@ -1229,7 +1231,7 @@ if ($_POST["install_step"] == "3" && count($_POST) > 0 && strlen($_POST["persist $sql .= "'$menu_description' "; $sql .= ");"; if ($v_debug) { - fwrite($fp, $sql."\n"); + fwrite($fp, $sql."\n"); } $db->exec(check_sql($sql)); unset($sql);