function certificate_admin_clear_form_submit in Certificate 6
Same name and namespace in other branches
- 8.3 certificate.admin.inc \certificate_admin_clear_form_submit()
- 6.2 certificate.admin.inc \certificate_admin_clear_form_submit()
- 7.2 certificate.admin.inc \certificate_admin_clear_form_submit()
- 4.x certificate.admin.inc \certificate_admin_clear_form_submit()
- 3.x certificate.admin.inc \certificate_admin_clear_form_submit()
Delete selected certificate snapshots.
File
- ./
certificate.admin.inc, line 899 - Administrative pages for the module.
Code
function certificate_admin_clear_form_submit(&$form, &$form_state) {
$nids = array();
foreach ($form_state['values']['nids'] as $nid => $delete) {
if ($delete) {
$nids[] = $nid;
}
}
if (count($nids)) {
$placeholders = db_placeholders($nids);
db_query("delete from {certificate_snapshots} where nid in ({$placeholders})", $nids);
drupal_set_message('Cleared certificate snapshots.');
}
}