Calls Active: Show gateway name instead of uuid in Application data string, change to jQuery ajax refresh.

This commit is contained in:
Nate Jones
2015-05-18 16:44:38 +00:00
parent a28f7a9f53
commit b809714064
5 changed files with 55 additions and 52 deletions
+5
View File
@@ -147,6 +147,11 @@ else {
$db->exec(check_sql($sql));
unset($sql);
//add new gateway to session variable
if ($enabled == 'true') {
$_SESSION['gateways'][$gateway_uuid] = $gateway;
}
//synchronize the xml config
save_gateway_xml();
+3
View File
@@ -55,6 +55,9 @@ if (strlen($_GET["id"])>0) {
}
unset ($prep_statement);
//remove gateway from session variable
unset($_SESSION['gateways'][$gateway_uuid]);
//delete the xml file
if ($_SESSION['switch']['sip_profiles']['dir'] != '') {
$gateway_xml_file = $_SESSION['switch']['sip_profiles']['dir']."/".$profile."/v_".$gateway_uuid.".xml";
+15
View File
@@ -237,6 +237,12 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
$sql .= ")";
$db->exec(check_sql($sql));
unset($sql);
//add new gateway to session variable
if ($enabled == 'true') {
$_SESSION['gateways'][$gateway_uuid] = $gateway;
}
} //if ($action == "add")
if ($action == "update" && permission_exists('gateway_edit')) {
@@ -277,6 +283,15 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
$sql .= "where gateway_uuid = '$gateway_uuid'";
$db->exec(check_sql($sql));
unset($sql);
//update gateway session variable
if ($enabled == 'true') {
$_SESSION['gateways'][$gateway_uuid] = $gateway;
}
else {
unset($_SESSION['gateways'][$gateway_uuid]);
}
} //if ($action == "update")
//remove xml file (if any) if not enabled