Skip to content

Commit e3a5301

Browse files
committed
See CHANGELOG
1 parent 94e17f5 commit e3a5301

7 files changed

Lines changed: 72 additions & 45 deletions

File tree

CHANGELOG.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
-------------------------------------
22
5.0-4
33
-------------------------------------
4+
Fixed bug in file / folder browser when $browserRestrictFolders is
5+
set.
6+
https://sourceforge.net/p/phpvirtualbox/bugs/50/
7+
8+
Fixed bug in host network interface sorting.
9+
https://sourceforge.net/p/phpvirtualbox/bugs/36/
10+
11+
Fixed bug where phpVirtualBox installations on the same server may
12+
share session cookies in certain PHP configurations.
13+
14+
Fixed bug where noPreview=true; was ignored in settings.
15+
https://sourceforge.net/p/phpvirtualbox/bugs/38/
416

517
-------------------------------------
618
5.0-3 2015-09-09

endpoints/jqueryFileTree.php

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -172,17 +172,24 @@ function get_windows_drives() {
172172
*/
173173
if((strtoupper($request['dir']) != strtoupper($f)) && strpos(strtoupper($request['dir']),strtoupper($f)) === 0) {
174174

175-
176175
// List entries in this folder
177-
$path = explode(DSEP,substr($request['dir'],strlen($f)));
176+
$path = explode(DSEP, substr($request['dir'],strlen($f)));
178177

179-
// Folder entry
180-
array_push($returnData, getdir($f, $request['dirsOnly'], $path));
178+
if($path[0] == '') {
179+
array_shift($path);
180+
}
181181

182-
} else {
182+
$folder_entry = folder_entry($f, true);
183+
184+
$folder_entry['children'] = getdir($f, $request['dirsOnly'], $path);
185+
$folder_entry['expanded'] = true;
183186

187+
array_push($returnData, $folder_entry);
188+
189+
} else {
184190
array_push($returnData, folder_entry($f,true));
185191
}
192+
186193
}
187194

188195
/* Just get full path */

endpoints/lib/utils.php

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<?php
22
/**
33
* Common PHP utilities.
4-
*
4+
*
55
* @author Ian Moore (imoore76 at yahoo dot com)
66
* @copyright Copyright (C) 2010-2015 Ian Moore (imoore76 at yahoo dot com)
77
* @version $Id: utils.php 592 2015-04-12 19:53:44Z imoore76 $
88
* @see phpVBoxConfigClass
99
* @package phpVirtualBox
10-
*
10+
*
1111
*/
1212

1313
require_once(dirname(__FILE__).'/config.php');
@@ -19,15 +19,15 @@
1919
* @uses $_SESSION
2020
*/
2121
function session_init($keepopen = false) {
22-
22+
2323
$settings = new phpVBoxConfigClass();
24-
24+
2525
// Sessions provided by auth module?
2626
if(@$settings->auth->capabilities['sessionStart']) {
2727
call_user_func(array($settings->auth, $settings->auth->capabilities['sessionStart']), $keepopen);
2828
return;
2929
}
30-
30+
3131
// No session support? No login...
3232
if(@$settings->noAuth || !function_exists('session_start')) {
3333
global $_SESSION;
@@ -37,29 +37,29 @@ function session_init($keepopen = false) {
3737
return;
3838
}
3939

40-
// start session
41-
session_start();
42-
43-
// Session is auto-started by PHP?
40+
// Session not is auto-started by PHP
4441
if(!ini_get('session.auto_start')) {
45-
42+
4643
ini_set('session.use_trans_sid', 0);
4744
ini_set('session.use_only_cookies', 1);
48-
45+
4946
// Session path
5047
if(isset($settings->sessionSavePath)) {
5148
session_save_path($settings->sessionSavePath);
5249
}
53-
54-
session_name((isset($settings->session_name) ? $settings->session_name : md5('phpvbx'.$_SERVER['DOCUMENT_ROOT'].$_SERVER['HTTP_USER_AGENT'])));
50+
51+
if(isset($settings->session_name)) {
52+
$session_name = $settings->session_name;
53+
} else {
54+
$session_name = md5($_SERVER['DOCUMENT_ROOT'].$_SERVER['HTTP_USER_AGENT'].dirname(__FILE__));
55+
}
56+
session_name($session_name);
5557
session_start();
5658
}
57-
58-
59+
5960
if(!$keepopen)
6061
session_write_close();
61-
62-
62+
6363
}
6464

6565

@@ -69,7 +69,7 @@ function session_init($keepopen = false) {
6969
* @return array
7070
*/
7171
function clean_request() {
72-
72+
7373
if($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') {
7474
$json = json_decode(file_get_contents('php://input'), true);
7575
if(!is_array($json))

endpoints/lib/vboxconnector.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4234,6 +4234,7 @@ private function _machineGetDetails(&$m) {
42344234
'audioDriver' => (string)$m->audioAdapter->audioDriver,
42354235
),
42364236
'RTCUseUTC' => $m->RTCUseUTC,
4237+
'EffectiveParavirtProvider' => (string)$m->getEffectiveParavirtProvider(),
42374238
'HWVirtExProperties' => array(
42384239
'Enabled' => $m->getHWVirtExProperty('Enabled'),
42394240
'NestedPaging' => $m->getHWVirtExProperty('NestedPaging'),

js/jquery.projectPlugins.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -550,8 +550,7 @@ if(jQuery) (function($){
550550
data.sort(function(a,b){
551551
if(a.type == b.type)
552552
return strnatcasecmp(a.path, b.path);
553-
554-
return a.type == 'folder' ? 1 : -1
553+
return a.type == 'folder' ? -1 : 1
555554
});
556555

557556
var elms = [];

js/phpvirtualbox.js

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/**
22
* @fileOverview Common classes and objects used
33
* @author Ian Moore (imoore76 at yahoo dot com)
4-
* @version $Id: phpvirtualbox.js 599 2015-07-27 10:40:37Z imoore76 $
54
* @copyright Copyright (C) 2010-2015 Ian Moore (imoore76 at yahoo dot com)
65
*/
76

@@ -166,7 +165,9 @@ var vboxHostDetailsSections = {
166165

167166
var netRows = [];
168167

169-
d['networkInterfaces'].sort(strnatcasecmp);
168+
d['networkInterfaces'].sort(function(a,b){
169+
return strnatcasecmp(a.name, b.name);
170+
});
170171

171172
for(var i = 0; i < d['networkInterfaces'].length; i++) {
172173

@@ -338,7 +339,9 @@ var vboxVMDetailsSections = {
338339
if(d['HWVirtExProperties'].Enabled) acList[acList.length] = trans('VT-x/AMD-V');
339340
if(d['HWVirtExProperties'].NestedPaging) acList[acList.length] = trans('Nested Paging');
340341
if(d['CpuProperties']['PAE']) acList[acList.length] = trans('PAE/NX');
341-
342+
if(d['EffectiveParavirtProvider'] != 'None')
343+
acList[acList.length] = trans(d['EffectiveParavirtProvider'] + ' Paravirtualization');
344+
342345
if($('#vboxPane').data('vboxConfig').enableAdvancedConfig) {
343346
if(d['HWVirtExProperties'].LargePages) acList[acList.length] = trans('Large Pages');
344347
if(d['HWVirtExProperties'].UnrestrictedExecution) acList[acList.length] = trans('VT-x unrestricted execution');
@@ -3139,8 +3142,8 @@ function vboxWizard() {
31393142
function vboxToolbar(options) {
31403143

31413144
var self = this;
3142-
this.buttons = options.buttons ? options.buttons : [];
3143-
this.size = options.size ? options.size : 22;
3145+
this.buttons = options.buttons || [];
3146+
this.size = options.size || 22;
31443147
this.addHeight = 24;
31453148
this.lastItem = null;
31463149
this.buttonStyle = options.buttonStyle;
@@ -3394,10 +3397,11 @@ function vboxToolbar(options) {
33943397
*/
33953398
function vboxToolbarSingle(options) {
33963399

3400+
var self = this;
33973401
this.parentClass = vboxToolbarSmall;
3398-
options.buttons = [options.button]
3399-
renderTo = options.renderTo
3400-
options.renderTo = undefined
3402+
options.buttons = [options.button];
3403+
renderTo = options.renderTo;
3404+
options.renderTo = undefined;
34013405
this.parentClass(options);
34023406
this._buttonElement = this.buttonElement; /* copy orig */
34033407

@@ -3743,7 +3747,7 @@ function vboxButtonMediaMenu(type,callback,mediumPath) {
37433747
* @return {Object} jQuery object containing button element
37443748
*/
37453749
this.getButtonElm = function () {
3746-
return this._buttonElement;
3750+
return self._buttonElement;
37473751
};
37483752

37493753
/**

panes/tabVMDetails.html

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -530,20 +530,24 @@
530530
// Multi-select details table sections
531531
////////////////////////////////////////
532532
if(!skipTable) {
533-
533+
534534
var tbl = $('<table />').attr({'id':'vboxDetailsGeneralTable-'+data.id,'class':'vboxInvisible vboxVMDetailsBox-vm-'+data.id,'style':'width: 100%;'}).append(
535535

536-
$('<tr />').attr({'style':'vertical-align: top'}).append(
537-
538-
$('<td />').css({'width':'100%'})
539-
.append(__vboxCreateDetailsSection(data,'general'))
540-
.append(__vboxCreateDetailsSection(data,'system'))
536+
$('<tr />').attr({'style':'vertical-align: top'})
541537

542-
).append(
543-
544-
$('<td />')
545-
.append(__vboxCreateDetailsSection(data,'preview'))
546-
)
538+
.append(
539+
540+
$('<td />').css({'width':'100%'})
541+
.append(__vboxCreateDetailsSection(data,'general'))
542+
.append(__vboxCreateDetailsSection(data,'system'))
543+
544+
).append(
545+
546+
vboxVMDetailsSections['preview'].condition() ?
547+
$('<td />')
548+
.append(__vboxCreateDetailsSection(data,'preview')) :
549+
null
550+
)
547551

548552
).data({'vmid':data.id});
549553

0 commit comments

Comments
 (0)