If the dialplan dir has no value do not write the dialplan xml files

This commit is contained in:
Mark Crane 2012-07-03 16:22:58 +00:00
parent 14718825e0
commit a95c074648
1 changed files with 289 additions and 287 deletions

View File

@ -3005,6 +3005,8 @@ function save_dialplan_xml() {
unlink($value);
}
//if dialplan dir exists then build and save the dialplan xml
if (is_dir($_SESSION['switch']['dialplan']['dir'])) {
$sql = "select * from v_dialplans ";
$sql .= "where dialplan_enabled = 'true' ";
$prep_statement = $db->prepare(check_sql($sql));
@ -3302,14 +3304,14 @@ function save_dialplan_xml() {
file_put_contents($_SESSION['switch']['dialplan']['dir']."/".$row['dialplan_context']."/".$dialplan_filename, $tmp);
}
}
unset($dialplan_filename);
unset($tmp);
} //end while
}
//apply settings reminder
$_SESSION["reload_xml"] = true;
}
} //end if (is_dir($_SESSION['switch']['dialplan']['dir']))
}