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

@ -737,7 +737,7 @@ function InstallDB_CreateSccpDeviceConfigView($sccp_compatible)
sccpdevice.mwioncall, sccpdevice.dndFeature, sccpdevice.transfer, sccpdevice.cfwdall, sccpdevice.cfwdbusy, sccpdevice.private, sccpdevice.privacy, sccpdevice.mwioncall, sccpdevice.dndFeature, sccpdevice.transfer, sccpdevice.cfwdall, sccpdevice.cfwdbusy, sccpdevice.private, sccpdevice.privacy,
sccpdevice.nat, sccpdevice.directrtp, sccpdevice.softkeyset, sccpdevice.audio_tos, sccpdevice.audio_cos, sccpdevice.video_tos, sccpdevice.video_cos, sccpdevice.nat, sccpdevice.directrtp, sccpdevice.softkeyset, sccpdevice.audio_tos, sccpdevice.audio_cos, sccpdevice.video_tos, sccpdevice.video_cos,
sccpdevice.conf_allow, sccpdevice.conf_play_general_announce, sccpdevice.conf_play_part_announce, sccpdevice.conf_mute_on_entry, sccpdevice.conf_allow, sccpdevice.conf_play_general_announce, sccpdevice.conf_play_part_announce, sccpdevice.conf_mute_on_entry,
sccpdevice.conf_music_on_hold_class, sccpdevice.conf_show_conflist, sccpdevice.force_dtmfmode, sccpdevice.setvar, sccpdevice.backgroundImage, sccpdevice.conf_music_on_hold_class, sccpdevice.conf_show_conflist, sccpdevice.force_dtmfmode, sccpdevice.setvar, sccpdevice.backgroundImage,
sccpdevice.backgroundThumbnail, sccpdevice.ringtone, sccpdevice.callhistory_answered_elsewhere, sccpdevice.useRedialMenu, sccpdevice.cfwdnoanswer, sccpdevice.backgroundThumbnail, sccpdevice.ringtone, sccpdevice.callhistory_answered_elsewhere, sccpdevice.useRedialMenu, sccpdevice.cfwdnoanswer,
sccpdevice.park, sccpdevice.monitor, sccpdevice.phonecodepage, sccpdevice.keepalive sccpdevice.park, sccpdevice.monitor, sccpdevice.phonecodepage, sccpdevice.keepalive
FROM sccpdevice FROM sccpdevice
@ -923,7 +923,7 @@ function Setup_RealTime()
function addDriver($sccp_compatible) { function addDriver($sccp_compatible) {
outn("<li>" . _("Adding driver ...") . "</li>"); 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}'; ?>"; $contents = "<?php include '/var/www/html/admin/modules/sccp_manager/sccpManClasses/Sccp.class.php.v{$sccp_compatible}'; ?>";
file_put_contents($file, $contents); file_put_contents($file, $contents);
@ -931,7 +931,7 @@ function addDriver($sccp_compatible) {
$dir = $cnf_int->get('ASTETCDIR'); $dir = $cnf_int->get('ASTETCDIR');
if (!file_exists("{$dir}/sccp.conf")) { // System re Config if (!file_exists("{$dir}/sccp.conf")) { // System re Config
outn("<li>" . _("Adding default configuration file ...") . "</li>"); 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); file_put_contents("{$dir}/sccp.conf", $sccpfile);
} }
} }
@ -1044,7 +1044,7 @@ function cleanUpSccpSettings() {
*/ */
// Clean up sccpsettings to remove legacy values. // 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->xml_data = simplexml_load_file($xml_vars);
$thisInstaller->initVarfromXml(); $thisInstaller->initVarfromXml();
foreach ( array_diff_key($settingsFromDb,$thisInstaller->sccpvalues) as $key => $valueArray) { 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 // TODO: Need to add index.cnf, after setting defaults correctly
if (!file_exists("{$baseConfig['tftp_templates_path']}/XMLDefault.cnf.xml_template")) { 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"]}/"; $dst_path = "{$baseConfig["tftp_templates_path"]}/";
foreach (glob("{$src_path}*.*_template") as $filename) { foreach (glob("{$src_path}*.*_template") as $filename) {
copy($filename, $dst_path . basename($filename)); copy($filename, $dst_path . basename($filename));