diff --git a/modules/servers/solusvmpro/solusvmpro.php b/modules/servers/solusvmpro/solusvmpro.php index 3acc63d..4f8c880 100644 --- a/modules/servers/solusvmpro/solusvmpro.php +++ b/modules/servers/solusvmpro/solusvmpro.php @@ -681,10 +681,11 @@ function solusvmpro_ChangePackage( $params ) { $ccpu = $solusvm->getCcpu(); $cextraip = $solusvm->getCextraip(); $cnspeed = $solusvm->getCnspeed(); + $cbandwidth = $solusvm->getCbandwidth(); ######################################### //Apply custom resources - if ( !empty($cmem) || !empty($cdisk) || !empty($ccpu) || !empty($cextraip) ){ + if ( !empty($cmem) || !empty($cdisk) || !empty($ccpu) || !empty($cextraip) || !empty($cbandwidth) ){ $resource_errors = ""; $error_divider = " "; @@ -722,6 +723,14 @@ function solusvmpro_ChangePackage( $params ) { } } + + if ( $cbandwidth > 0 ){ + $solusvm->apiCall( 'vserver-bandwidth', array( "limit" => $cbandwidth, "vserverid" => $customField["vserverid"] ) ); + if ( !$solusvm->isSuccessResponse($solusvm->result) ) { + $resource_errors .= (string) $solusvm->result["statusmsg"]; + } + + } if ( $cextraip > 0 ){ //first() function doesn't work @@ -1264,4 +1273,3 @@ function solusvmpro_customclientareaunavailable( $params, $cparams ) { return $output; } } -