summaryrefslogtreecommitdiffstats
path: root/endpoints
diff options
context:
space:
mode:
authorAndriy Sharandakov <ash.ashway@gmail.com>2016-03-24 15:19:08 +0200
committerAndriy Sharandakov <ash.ashway@gmail.com>2016-03-24 15:19:08 +0200
commit4a1336e40ad9eb651661d18ce6a3153e979507aa (patch)
treea7a97aa238b1696185ab922c27edabb25cc8bed0 /endpoints
parentce7c35ce03ace030a6213d943df88f2304d11b40 (diff)
downloadphpvirtualbox-4a1336e40ad9eb651661d18ce6a3153e979507aa.zip
phpvirtualbox-4a1336e40ad9eb651661d18ce6a3153e979507aa.tar.gz
phpvirtualbox-4a1336e40ad9eb651661d18ce6a3153e979507aa.tar.bz2
Fixed enforceVMOwnership and vmQuotaPerUser functionality which is broken in 5.0-5
Diffstat (limited to 'endpoints')
-rw-r--r--endpoints/lib/vboxconnector.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/endpoints/lib/vboxconnector.php b/endpoints/lib/vboxconnector.php
index d33825c..8c4953c 100644
--- a/endpoints/lib/vboxconnector.php
+++ b/endpoints/lib/vboxconnector.php
@@ -3749,15 +3749,15 @@ class vboxconnector {
if ( @isset($this->settings->vmQuotaPerUser) && @$this->settings->vmQuotaPerUser > 0 && !$_SESSION['admin'] )
{
$newresp = array('data' => array());
- $vmlist = $this->vboxGetMachines(array(), $newresp);
- if ( count($newresp['data']['vmlist']) >= $this->settings->vmQuotaPerUser )
+ $this->vboxGetMachines(array(), array(&$newresp));
+ if ( count($newresp['data']['responseData']) >= $this->settings->vmQuotaPerUser )
{
// we're over quota!
// delete the disk we just created
if ( isset($args['disk']) )
{
$this->mediumRemove(array(
- 'id' => $args['disk'],
+ 'medium' => $args['disk'],
'type' => 'HardDisk',
'delete' => true
), $newresp);