mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Change. Does not use default dialplan/directory.
I think it more consistent that it allows edit domain in single place.
Also on my Windows machine while installing all users/context creates not in `default` directory.
And I have problem because remove users did not work, `default.xml` file contain `$${v_domain}` variables.
This commit is contained in:
@@ -192,18 +192,10 @@ include "root.php";
|
||||
$file_default_path = $src_dir.'/dialplan/default.xml';
|
||||
$file_default_contents = file_get_contents($file_default_path);
|
||||
//prepare the file contents and the path
|
||||
if (count($_SESSION['domains']) < 2) {
|
||||
//replace the variables in the template in the future loop through all the line numbers to do a replace for each possible line number
|
||||
$file_default_contents = str_replace("{v_domain}", 'default', $file_default_contents);
|
||||
//set the file path
|
||||
$file_path = $switch_dialplan_dir.'/default.xml';
|
||||
}
|
||||
else {
|
||||
//replace the variables in the template in the future loop through all the line numbers to do a replace for each possible line number
|
||||
$file_default_contents = str_replace("{v_domain}", $_SESSION['domain_name'], $file_default_contents);
|
||||
//set the file path
|
||||
$file_path = $switch_dialplan_dir.'/'.$_SESSION['domain_name'].'.xml';
|
||||
}
|
||||
//replace the variables in the template in the future loop through all the line numbers to do a replace for each possible line number
|
||||
$file_default_contents = str_replace("{v_domain}", $_SESSION['domain_name'], $file_default_contents);
|
||||
//set the file path
|
||||
$file_path = $switch_dialplan_dir.'/'.$_SESSION['domain_name'].'.xml';
|
||||
//write the default dialplan
|
||||
$fh = fopen($file_path,'w') or die('Unable to write to '.$file_path.'. Make sure the path exists and permissons are set correctly.');
|
||||
fwrite($fh, $file_default_contents);
|
||||
|
||||
Reference in New Issue
Block a user