Update app_defaults.php
Move the if ($domains_processed == 1) { so none of the code is processed more than one time.
This commit is contained in:
parent
25fe0b7f93
commit
fecc8e3510
|
|
@ -24,6 +24,9 @@
|
|||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
if ($domains_processed == 1) {
|
||||
|
||||
//create a json string
|
||||
$vars = <<<EOD
|
||||
[
|
||||
{"var_name":"domain","var_value":"\$\${local_ip_v4}","var_cat":"Domain","var_enabled":"true","var_description":"U2V0cyB0aGUgZGVmYXVsdCBkb21haW4u"},
|
||||
|
|
@ -97,7 +100,7 @@ $vars = <<<EOD
|
|||
]
|
||||
EOD;
|
||||
|
||||
// Set country depend variables as country code and international direct dialing code (exit code)
|
||||
// Set country depend variables as country code and international direct dialing code (exit code)
|
||||
if (!function_exists('set_country_vars')) {
|
||||
function set_country_vars($db, $x) {
|
||||
require "resources/countries.php";
|
||||
|
|
@ -242,7 +245,7 @@ EOD;
|
|||
|
||||
$x = 1;
|
||||
|
||||
//if there are no variables in the vars table then add them
|
||||
//if there are no variables in the vars table then add them
|
||||
if ($domains_processed == 1) {
|
||||
|
||||
$result = json_decode($vars, true);
|
||||
|
|
@ -289,8 +292,7 @@ EOD;
|
|||
unset($result, $row);
|
||||
}
|
||||
|
||||
//adjust the variables required variables
|
||||
if ($domains_processed == 1) {
|
||||
//adjust the variables required variables
|
||||
//set variables that depend on the number of domains
|
||||
if (count($_SESSION['domains']) > 1) {
|
||||
//disable the domain and domain_uuid for systems with multiple domains
|
||||
|
|
@ -341,5 +343,5 @@ EOD;
|
|||
|
||||
//save the vars.xml file
|
||||
save_var_xml();
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
Loading…
Reference in New Issue