summaryrefslogtreecommitdiffstats
path: root/endpoints
diff options
context:
space:
mode:
authorIan Moore <imoore76@yahoo.com>2015-12-07 08:47:17 -0500
committerIan Moore <imoore76@yahoo.com>2015-12-07 08:47:17 -0500
commite3a53018b9fb292654a30fe8a4115ed685231614 (patch)
treee1f08f80d94d0440d9df8502d9da332576ac9b00 /endpoints
parent94e17f57f3f16628f140cdd5fd5ca00806ca208f (diff)
downloadphpvirtualbox-e3a53018b9fb292654a30fe8a4115ed685231614.zip
phpvirtualbox-e3a53018b9fb292654a30fe8a4115ed685231614.tar.gz
phpvirtualbox-e3a53018b9fb292654a30fe8a4115ed685231614.tar.bz2
See CHANGELOG
Diffstat (limited to 'endpoints')
-rw-r--r--endpoints/jqueryFileTree.php17
-rw-r--r--endpoints/lib/utils.php36
-rw-r--r--endpoints/lib/vboxconnector.php1
3 files changed, 31 insertions, 23 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 */
diff --git a/endpoints/lib/utils.php b/endpoints/lib/utils.php
index e324c55..703bdb8 100644
--- a/endpoints/lib/utils.php
+++ b/endpoints/lib/utils.php
@@ -1,13 +1,13 @@
<?php
/**
* Common PHP utilities.
- *
+ *
* @author Ian Moore (imoore76 at yahoo dot com)
* @copyright Copyright (C) 2010-2015 Ian Moore (imoore76 at yahoo dot com)
* @version $Id: utils.php 592 2015-04-12 19:53:44Z imoore76 $
* @see phpVBoxConfigClass
* @package phpVirtualBox
- *
+ *
*/
require_once(dirname(__FILE__).'/config.php');
@@ -19,15 +19,15 @@ require_once(dirname(__FILE__).'/config.php');
* @uses $_SESSION
*/
function session_init($keepopen = false) {
-
+
$settings = new phpVBoxConfigClass();
-
+
// Sessions provided by auth module?
if(@$settings->auth->capabilities['sessionStart']) {
call_user_func(array($settings->auth, $settings->auth->capabilities['sessionStart']), $keepopen);
return;
}
-
+
// No session support? No login...
if(@$settings->noAuth || !function_exists('session_start')) {
global $_SESSION;
@@ -37,29 +37,29 @@ function session_init($keepopen = false) {
return;
}
- // start session
- session_start();
-
- // Session is auto-started by PHP?
+ // Session not is auto-started by PHP
if(!ini_get('session.auto_start')) {
-
+
ini_set('session.use_trans_sid', 0);
ini_set('session.use_only_cookies', 1);
-
+
// Session path
if(isset($settings->sessionSavePath)) {
session_save_path($settings->sessionSavePath);
}
-
- session_name((isset($settings->session_name) ? $settings->session_name : md5('phpvbx'.$_SERVER['DOCUMENT_ROOT'].$_SERVER['HTTP_USER_AGENT'])));
+
+ if(isset($settings->session_name)) {
+ $session_name = $settings->session_name;
+ } else {
+ $session_name = md5($_SERVER['DOCUMENT_ROOT'].$_SERVER['HTTP_USER_AGENT'].dirname(__FILE__));
+ }
+ session_name($session_name);
session_start();
}
-
-
+
if(!$keepopen)
session_write_close();
-
-
+
}
@@ -69,7 +69,7 @@ function session_init($keepopen = false) {
* @return array
*/
function clean_request() {
-
+
if($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') {
$json = json_decode(file_get_contents('php://input'), true);
if(!is_array($json))
diff --git a/endpoints/lib/vboxconnector.php b/endpoints/lib/vboxconnector.php
index c1d6cd7..d33825c 100644
--- a/endpoints/lib/vboxconnector.php
+++ b/endpoints/lib/vboxconnector.php
@@ -4234,6 +4234,7 @@ class vboxconnector {
'audioDriver' => (string)$m->audioAdapter->audioDriver,
),
'RTCUseUTC' => $m->RTCUseUTC,
+ 'EffectiveParavirtProvider' => (string)$m->getEffectiveParavirtProvider(),
'HWVirtExProperties' => array(
'Enabled' => $m->getHWVirtExProperty('Enabled'),
'NestedPaging' => $m->getHWVirtExProperty('NestedPaging'),