From 7e3953ff92d211473a6ee626e3902159af82de9f Mon Sep 17 00:00:00 2001 From: Thomas Pochetat Date: Mon, 21 Aug 2017 18:41:37 +0000 Subject: [PATCH] bug fix setBootOrder wrong argument "device" openMedium wrong argument "accessMode" and "forceNewUuid" --- endpoints/lib/vboxconnector.php | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/endpoints/lib/vboxconnector.php b/endpoints/lib/vboxconnector.php index ce47950..e9fc086 100644 --- a/endpoints/lib/vboxconnector.php +++ b/endpoints/lib/vboxconnector.php @@ -1126,7 +1126,7 @@ class vboxconnector { // Try to register medium. foreach($checks as $iso) { try { - $gem = $this->vbox->openMedium($iso,'DVD','ReadOnly',null); + $gem = $this->vbox->openMedium($iso,'DVD','ReadOnly',false); break; } catch (Exception $e) { // Ignore @@ -1522,7 +1522,7 @@ class vboxconnector { $md->releaseRemote(); } } else { - $med = $this->vbox->openMedium($ma['medium']['location'],$ma['type'],null,null); + $med = $this->vbox->openMedium($ma['medium']['location'],$ma['type'],'ReadWrite',false); } } else { $med = null; @@ -1942,7 +1942,7 @@ class vboxconnector { if($args['bootOrder'][$i]) { $m->setBootOrder(($i + 1),$args['bootOrder'][$i]); } else { - $m->setBootOrder(($i + 1),null); + $m->setBootOrder(($i + 1),'Null'); } } @@ -2028,7 +2028,7 @@ class vboxconnector { } } else { /* @var $med IMedium */ - $med = $this->vbox->openMedium($ma['medium']['location'],$ma['type'], null, null); + $med = $this->vbox->openMedium($ma['medium']['location'],$ma['type'], 'ReadWrite', false); } } else { $med = null; @@ -3697,7 +3697,7 @@ class vboxconnector { $hds = array(); $delete = $machine->unregister('DetachAllReturnHardDisksOnly'); foreach($delete as $hd) { - $hds[] = $this->vbox->openMedium($hd->location,'HardDisk',null,null)->handle; + $hds[] = $this->vbox->openMedium($hd->location,'HardDisk','ReadWrite',false)->handle; } /* @var $progress IProgress */ @@ -3874,7 +3874,7 @@ class vboxconnector { $sc->releaseRemote(); - $m = $this->vbox->openMedium($args['disk'],'HardDisk',null,null); + $m = $this->vbox->openMedium($args['disk'],'HardDisk','ReadWrite',false); $this->session->machine->attachDevice(trans($HDbusType,'UIMachineSettingsStorage'),0,0,'HardDisk',$m->handle); @@ -4853,7 +4853,7 @@ class vboxconnector { // Connect to vboxwebsrv $this->connect(); - $m = $this->vbox->openMedium($args['medium'],'HardDisk',null,null); + $m = $this->vbox->openMedium($args['medium'],'HardDisk','ReadWrite',false); $retval = $m->checkEncryptionPassword($args['password']); @@ -4874,7 +4874,7 @@ class vboxconnector { // Connect to vboxwebsrv $this->connect(); - $m = $this->vbox->openMedium($args['medium'], 'HardDisk', 'ReadWrite', null); + $m = $this->vbox->openMedium($args['medium'], 'HardDisk', 'ReadWrite', false); /* @var $progress IProgress */ $progress = $m->changeEncryption($args['old_password'], @@ -4915,7 +4915,7 @@ class vboxconnector { // Connect to vboxwebsrv $this->connect(); - $m = $this->vbox->openMedium($args['medium'], 'HardDisk', null, null); + $m = $this->vbox->openMedium($args['medium'], 'HardDisk', 'ReadWrite', false); /* @var $progress IProgress */ $progress = $m->resize($args['bytes']); @@ -4953,7 +4953,7 @@ class vboxconnector { $mid = $target->id; /* @var $src IMedium */ - $src = $this->vbox->openMedium($args['src'], 'HardDisk', null, null); + $src = $this->vbox->openMedium($args['src'], 'HardDisk', 'ReadWrite', false); $type = array(($args['type'] == 'fixed' ? 'Fixed' : 'Standard')); if($args['split']) $type[] = 'VmdkSplit2G'; @@ -4991,7 +4991,7 @@ class vboxconnector { $this->connect(); /* @var $m IMedium */ - $m = $this->vbox->openMedium($args['medium'], 'HardDisk', null, null); + $m = $this->vbox->openMedium($args['medium'], 'HardDisk', 'ReadWrite', false); $m->type = $args['type']; $m->releaseRemote(); @@ -5129,7 +5129,7 @@ class vboxconnector { $this->connect(); /* @var $m IMedium */ - $m = $this->vbox->openMedium($args['medium'],$args['type'], null, null); + $m = $this->vbox->openMedium($args['medium'],$args['type'], 'ReadWrite', false); $mediumid = $m->id; // connected to... @@ -5211,7 +5211,7 @@ class vboxconnector { if(!$args['type']) $args['type'] = 'HardDisk'; /* @var $m IMedium */ - $m = $this->vbox->openMedium($args['medium'],$args['type'], null, null); + $m = $this->vbox->openMedium($args['medium'],$args['type'], 'ReadWrite', false); if($args['delete'] && @$this->settings->deleteOnRemove && (string)$m->deviceType == 'HardDisk') { @@ -5380,7 +5380,7 @@ class vboxconnector { // Normal medium } else { /* @var $med IMedium */ - $med = $this->vbox->openMedium($args['medium']['location'],$args['medium']['deviceType'],null,null); + $med = $this->vbox->openMedium($args['medium']['location'],$args['medium']['deviceType'],'ReadWrite',false); } } -- 2.13.3.windows.1