summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--endpoints/lib/vboxconnector.php6
-rw-r--r--js/datamediator.js2
2 files changed, 4 insertions, 4 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);
diff --git a/js/datamediator.js b/js/datamediator.js
index a214a4f..c701958 100644
--- a/js/datamediator.js
+++ b/js/datamediator.js
@@ -93,7 +93,7 @@ var vboxVMDataMediator = {
for(var i = 0; i < d.responseData.length; i++) {
// Enforce VM ownership
- if($('#vboxPane').data('vboxConfig').enforceVMOwnership && !$('#vboxPane').data('vboxSession').admin && d.vmlist[i].owner != $('#vboxPane').data('vboxSession').user) {
+ if($('#vboxPane').data('vboxConfig').enforceVMOwnership && !$('#vboxPane').data('vboxSession').admin && d.responseData[i].owner != $('#vboxPane').data('vboxSession').user) {
continue;
}