From ab646085be0b0e82c96672e7c1c77a1bb1f93381 Mon Sep 17 00:00:00 2001 From: markjcrane Date: Sat, 17 Jun 2023 21:02:45 -0600 Subject: [PATCH] Use dir to include require.php --- app/scripts/resources/classes/scripts.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/scripts/resources/classes/scripts.php b/app/scripts/resources/classes/scripts.php index b89bbb2e60..e360e28240 100644 --- a/app/scripts/resources/classes/scripts.php +++ b/app/scripts/resources/classes/scripts.php @@ -87,12 +87,9 @@ if (!class_exists('scripts')) { public function copy_files() { //includes files - //require dirname(__DIR__, 2) . "/resources/require.php"; - - //read the config.conf settings - $config_glob = glob("{/usr/local/etc,/etc}/fusionpbx/config.conf", GLOB_BRACE); - $conf = parse_ini_file($config_glob[0]); + require dirname(__DIR__, 4) . "/resources/require.php"; + //copy the scripts directory if (!empty($conf['switch.scripts.dir'])) { $destination_directory = $conf['switch.scripts.dir']; if ($destination_directory != '' && file_exists($destination_directory)) {