function hosting_quota_admin_defaults_form_submit in Hosting 6.2
Same name and namespace in other branches
- 7.4 quota/hosting_quota.admin.inc \hosting_quota_admin_defaults_form_submit()
- 7.3 quota/hosting_quota.admin.inc \hosting_quota_admin_defaults_form_submit()
Submit function for hosting_quota_admin_defaults_form
File
- quota/
hosting_quota.admin.inc, line 75
Code
function hosting_quota_admin_defaults_form_submit($form, &$form_state) {
foreach ($form_state['values']['quota'] as $resource => $quota) {
// Set the default quota
variable_set("hosting_quota_default_{$resource}", $quota);
// Set quotas for clients that don't already have them
$client_result = db_query('SELECT nid FROM {hosting_client} WHERE nid not in (SELECT client FROM {hosting_client_quota})');
while ($row = db_fetch_object($client_result)) {
hosting_quota_set_limit($row->nid, $resource, $quota);
}
}
}