@@ -211,6 +211,11 @@ function onSubmit() {
211211 unset($ global_config );
212212 unset($ dbname_prefix );
213213 }
214+
215+ //* ensure that quota value is not 0 when quota is set for client
216+ if ($ client ['limit_database_quota ' ] > 0 && isset ($ _POST ["database_quota " ]) && $ _POST ["database_quota " ] == 0 ) {
217+ $ app ->tform ->errorMessage .= $ app ->tform ->lng ("limit_database_quota_not_0_txt " )."<br> " ;
218+ }
214219
215220 if ($ client ['parent_client_id ' ] > 0 ) {
216221 // Get the limits of the reseller
@@ -357,7 +362,7 @@ function onBeforeUpdate() {
357362 if ($ tmp ['server_id ' ] && $ tmp ['server_id ' ] != $ this ->dataRecord ['server_id ' ]) {
358363 // we need remote access rights for this server, so get it's ip address
359364 $ server_config = $ app ->getconf ->get_server_config ($ tmp ['server_id ' ], 'server ' );
360-
365+
361366 // Add default remote_ips from Main Configuration.
362367 $ remote_ips = explode (", " , $ global_config ['default_remote_dbserver ' ]);
363368 if (!in_array ($ server_config ['ip_address ' ], $ default_remote_db )) { $ remote_ips [] = $ server_config ['ip_address ' ]; }
@@ -380,7 +385,7 @@ function onBeforeUpdate() {
380385 }
381386 }
382387 }
383-
388+
384389 if ($ app ->tform ->errorMessage == '' ) {
385390 // force update of the used database user
386391 if ($ this ->dataRecord ['database_user_id ' ]) {
@@ -442,7 +447,7 @@ function onBeforeInsert() {
442447 if ($ tmp ['server_id ' ] && $ tmp ['server_id ' ] != $ this ->dataRecord ['server_id ' ]) {
443448 // we need remote access rights for this server, so get it's ip address
444449 $ server_config = $ app ->getconf ->get_server_config ($ tmp ['server_id ' ], 'server ' );
445-
450+
446451 // Add default remote_ips from Main Configuration.
447452 $ remote_ips = explode (", " , $ global_config ['default_remote_dbserver ' ]);
448453 if (!in_array ($ server_config ['ip_address ' ], $ default_remote_db )) { $ remote_ips [] = $ server_config ['ip_address ' ]; }
0 commit comments