Change pathname style from {} to .

Instability seen when pathnames with globals enclosed in {} - revert to . style pathnames
This commit is contained in:
steve-lad 2021-07-30 22:43:35 +02:00
parent 3ea36f5459
commit e313b9da3f
2 changed files with 5 additions and 5 deletions

View file

@ -923,7 +923,7 @@ function Setup_RealTime()
function addDriver($sccp_compatible) {
outn("<li>" . _("Adding driver ...") . "</li>");
$file = "{$_SERVER['DOCUMENT_ROOT']}/admin/modules/core/functions.inc/drivers/Sccp.class.php";
$file = $_SERVER['DOCUMENT_ROOT'] . '/admin/modules/core/functions.inc/drivers/Sccp.class.php';
$contents = "<?php include '/var/www/html/admin/modules/sccp_manager/sccpManClasses/Sccp.class.php.v{$sccp_compatible}'; ?>";
file_put_contents($file, $contents);
@ -931,7 +931,7 @@ function addDriver($sccp_compatible) {
$dir = $cnf_int->get('ASTETCDIR');
if (!file_exists("{$dir}/sccp.conf")) { // System re Config
outn("<li>" . _("Adding default configuration file ...") . "</li>");
$sccpfile = file_get_contents("{$_SERVER['DOCUMENT_ROOT']}/admin/modules/sccp_manager/conf/sccp.conf");
$sccpfile = file_get_contents($_SERVER['DOCUMENT_ROOT'] . '/admin/modules/sccp_manager/conf/sccp.conf');
file_put_contents("{$dir}/sccp.conf", $sccpfile);
}
}
@ -1044,7 +1044,7 @@ function cleanUpSccpSettings() {
*/
// Clean up sccpsettings to remove legacy values.
$xml_vars = "{$_SERVER['DOCUMENT_ROOT']}/admin/modules/sccp_manager/conf/sccpgeneral.xml.v{$sccp_compatible}";
$xml_vars = $_SERVER['DOCUMENT_ROOT'] . '/admin/modules/sccp_manager/conf/sccpgeneral.xml.v{$sccp_compatible}';
$thisInstaller->xml_data = simplexml_load_file($xml_vars);
$thisInstaller->initVarfromXml();
foreach ( array_diff_key($settingsFromDb,$thisInstaller->sccpvalues) as $key => $valueArray) {

View file

@ -352,7 +352,7 @@ class extconfigs
}
// TODO: Need to add index.cnf, after setting defaults correctly
if (!file_exists("{$baseConfig['tftp_templates_path']}/XMLDefault.cnf.xml_template")) {
$src_path = "{$_SERVER['DOCUMENT_ROOT']}/admin/modules/sccp_manager/conf/";
$src_path = $_SERVER['DOCUMENT_ROOT'] . '/admin/modules/sccp_manager/conf/';
$dst_path = "{$baseConfig["tftp_templates_path"]}/";
foreach (glob("{$src_path}*.*_template") as $filename) {
copy($filename, $dst_path . basename($filename));