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:
Alexey Melnichuk
2015-07-02 13:14:35 +04:00
parent c4f1221015
commit 5059613a40
6 changed files with 11 additions and 51 deletions

View File

@@ -211,12 +211,7 @@ function load_extensions() {
}
//if no extension has been assigned then setting the user_context will still need to be set
if (strlen($_SESSION['user_context']) == 0) {
if (count($_SESSION['domains']) == 1) {
$_SESSION['user_context'] = "default";
}
else {
$_SESSION['user_context'] = $_SESSION['domain_name'];
}
$_SESSION['user_context'] = $_SESSION['domain_name'];
}
}
}
@@ -1906,12 +1901,7 @@ function save_dialplan_xml() {
global $db, $domain_uuid;
//get the context based from the domain_uuid
if (count($_SESSION['domains']) == 1) {
$user_context = "default";
}
else {
$user_context = $_SESSION['domains'][$domain_uuid]['domain_name'];
}
$user_context = $_SESSION['domains'][$domain_uuid]['domain_name'];
//prepare for dialplan .xml files to be written. delete all dialplan files that are prefixed with dialplan_ and have a file extension of .xml
$dialplan_list = glob($_SESSION['switch']['dialplan']['dir'] . "/*/*v_dialplan*.xml");