function shrinktheweb_admin_log_submit in ShrinkTheWeb 7
Same name and namespace in other branches
- 6 shrinktheweb.admin.inc \shrinktheweb_admin_log_submit()
File
- ./
shrinktheweb.admin.inc, line 98
Code
function shrinktheweb_admin_log_submit($form, &$form_state) {
if (!isset($form_state['storage']['confirm'])) {
$form_state['storage']['confirm'] = TRUE;
$form_state['storage']['log_records'] = array_filter($form_state['values']['log_records']);
$form_state['rebuild'] = TRUE;
}
else {
if (!empty($form_state['storage']['log_records'])) {
$num_deleted = db_delete('shrinktheweb_log')
->condition('stw_siteid', $form_state['storage']['log_records'], 'IN')
->execute();
drupal_set_message(t('Deletion successful.'));
}
}
}