function regcode_admin_manage_submit in Registration codes 7
Same name and namespace in other branches
- 6.2 regcode.admin.php \regcode_admin_manage_submit()
- 7.2 regcode.admin.inc \regcode_admin_manage_submit()
Manage action handler.
File
- ./
regcode.admin.php, line 49 - Functions and pages needed for the admin UI of regcode module.
Code
function regcode_admin_manage_submit($form, $form_state) {
$operations = $form_state['values']['regcode_operations'];
foreach ($operations as $operation) {
switch ($operation) {
case REGCODE_CLEAN_TRUNCATE:
regcode_clean(REGCODE_CLEAN_TRUNCATE);
drupal_set_message(t('All registration codes were deleted.'));
break;
case REGCODE_CLEAN_EXPIRED:
regcode_clean(REGCODE_CLEAN_EXPIRED);
drupal_set_message(t('All expired registration codes were deleted.'));
break;
case REGCODE_CLEAN_INACTIVE:
regcode_clean(REGCODE_CLEAN_INACTIVE);
drupal_set_message(t('All inactive registration codes were deleted.'));
break;
}
}
}