From f7beda862459eb1296f6b0fa60fc16240fa83514 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 13 Dec 2018 01:11:25 -0700 Subject: [PATCH] Update filelist.php --- app/edit/filelist.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/edit/filelist.php b/app/edit/filelist.php index c8120c43b9..9bbe8c9fa5 100644 --- a/app/edit/filelist.php +++ b/app/edit/filelist.php @@ -112,9 +112,6 @@ case 'grammer': $edit_directory = $_SESSION['switch']['grammar']['dir']; break; - case 'path': - $edit_directory = $_SESSION['editor']['path']['text']; - break; case 'provision': switch (PHP_OS) { case "Linux": @@ -147,7 +144,16 @@ $edit_directory = $_SESSION['switch']['conf']['dir']; break; } + if (!isset($edit_directory)) { + foreach ($_SESSION['editor']['path'] as $path) { + if ($_SESSION["app"]["edit"]["dir"] == $path) { + $edit_directory = $path; + break; + } + } + } +//define ajax functions echo "