File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
modules/servers/solusvmpro Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -681,10 +681,11 @@ function solusvmpro_ChangePackage( $params ) {
681681 $ ccpu = $ solusvm ->getCcpu ();
682682 $ cextraip = $ solusvm ->getCextraip ();
683683 $ cnspeed = $ solusvm ->getCnspeed ();
684+ $ cbandwidth = $ solusvm ->getCbandwidth ();
684685 #########################################
685686
686687 //Apply custom resources
687- if ( !empty ($ cmem ) || !empty ($ cdisk ) || !empty ($ ccpu ) || !empty ($ cextraip ) ){
688+ if ( !empty ($ cmem ) || !empty ($ cdisk ) || !empty ($ ccpu ) || !empty ($ cextraip ) || ! empty ( $ cbandwidth ) ){
688689
689690 $ resource_errors = "" ;
690691 $ error_divider = " " ;
@@ -722,6 +723,14 @@ function solusvmpro_ChangePackage( $params ) {
722723 }
723724
724725 }
726+
727+ if ( $ cbandwidth > 0 ){
728+ $ solusvm ->apiCall ( 'vserver-bandwidth ' , array ( "limit " => $ cbandwidth , "vserverid " => $ customField ["vserverid " ] ) );
729+ if ( !$ solusvm ->isSuccessResponse ($ solusvm ->result ) ) {
730+ $ resource_errors .= (string ) $ solusvm ->result ["statusmsg " ];
731+ }
732+
733+ }
725734
726735 if ( $ cextraip > 0 ){
727736 //first() function doesn't work
@@ -1264,4 +1273,3 @@ function solusvmpro_customclientareaunavailable( $params, $cparams ) {
12641273 return $ output ;
12651274 }
12661275}
1267-
You can’t perform that action at this time.
0 commit comments