diff options
author | Ian Moore <imoore76@yahoo.com> | 2015-12-07 08:47:17 -0500 |
---|---|---|
committer | Ian Moore <imoore76@yahoo.com> | 2015-12-07 08:47:17 -0500 |
commit | e3a53018b9fb292654a30fe8a4115ed685231614 (patch) | |
tree | e1f08f80d94d0440d9df8502d9da332576ac9b00 /endpoints/jqueryFileTree.php | |
parent | 94e17f57f3f16628f140cdd5fd5ca00806ca208f (diff) | |
download | phpvirtualbox-e3a53018b9fb292654a30fe8a4115ed685231614.zip phpvirtualbox-e3a53018b9fb292654a30fe8a4115ed685231614.tar.gz phpvirtualbox-e3a53018b9fb292654a30fe8a4115ed685231614.tar.bz2 |
See CHANGELOG
Diffstat (limited to 'endpoints/jqueryFileTree.php')
-rw-r--r-- | endpoints/jqueryFileTree.php | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/endpoints/jqueryFileTree.php b/endpoints/jqueryFileTree.php index 016a29d..7c88428 100644 --- a/endpoints/jqueryFileTree.php +++ b/endpoints/jqueryFileTree.php @@ -172,17 +172,24 @@ if($request['dir'] == DSEP && count($allowed_folders)) { */
if((strtoupper($request['dir']) != strtoupper($f)) && strpos(strtoupper($request['dir']),strtoupper($f)) === 0) {
-
// List entries in this folder
- $path = explode(DSEP,substr($request['dir'],strlen($f)));
+ $path = explode(DSEP, substr($request['dir'],strlen($f)));
- // Folder entry
- array_push($returnData, getdir($f, $request['dirsOnly'], $path));
+ if($path[0] == '') {
+ array_shift($path);
+ }
- } else {
+ $folder_entry = folder_entry($f, true);
+
+ $folder_entry['children'] = getdir($f, $request['dirsOnly'], $path);
+ $folder_entry['expanded'] = true;
+ array_push($returnData, $folder_entry);
+
+ } else {
array_push($returnData, folder_entry($f,true));
}
+
}
/* Just get full path */
|