diff --git a/app/scripts/resources/classes/scripts.php b/app/scripts/resources/classes/scripts.php index a322f55199..adef00f163 100644 --- a/app/scripts/resources/classes/scripts.php +++ b/app/scripts/resources/classes/scripts.php @@ -60,7 +60,7 @@ class scripts { if (stristr(PHP_OS, 'WIN')) { $IS_WINDOWS = true; } else { $IS_WINDOWS = false; } } if ($IS_WINDOWS) { - return str_replace('/', '\\', $path); + return str_replace('\\', '/', $path); } return $path; } @@ -261,8 +261,13 @@ class scripts { } } //end config_lua - - } //end scripts class +/* +//example use + +//update config.lua + $obj = new scripts; + $obj->write_config(); +*/ ?> \ No newline at end of file diff --git a/resources/classes/domains.php b/resources/classes/domains.php index c0cc1e751f..df3e433c34 100644 --- a/resources/classes/domains.php +++ b/resources/classes/domains.php @@ -330,10 +330,10 @@ if (function_exists('save_dialplan_xml')) { save_dialplan_xml(); } + //update config.lua - require_once "core/install/resources/classes/install_switch.php"; - $switch = new install_switch; - $switch->create_config_lua(); + $obj = new scripts; + $obj->write_config(); //clear the session variables unset($_SESSION['domain']);