From 7277ed8f49a9cdab0354f9ffd7b4ec4a77eebae3 Mon Sep 17 00:00:00 2001 From: markjcrane Date: Fri, 15 Apr 2016 19:57:29 -0600 Subject: [PATCH] Set the sciprt directory from the session variable. --- app/scripts/resources/classes/scripts.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/scripts/resources/classes/scripts.php b/app/scripts/resources/classes/scripts.php index 710cc0d85f..aa3a14a5f3 100644 --- a/app/scripts/resources/classes/scripts.php +++ b/app/scripts/resources/classes/scripts.php @@ -161,11 +161,7 @@ if (!class_exists('scripts')) { $config = "/usr/local/etc/fusionpbx/config.lua"; } else { - //connect to event socket - $esl = new event_socket; - $esl->connect($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); - $script_dir = trim($esl->request('api global_getvar script_dir')); - $config = $script_dir."/resources/config.lua"; + $script_dir = $_SESSION['switch']['scripts']['dir']; } $fout = fopen($config,"w"); if(!$fout){