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 "