function nodesinblock_settings_clear_confirm_submit in Nodes In Block 7
Same name and namespace in other branches
- 6 nodesinblock.admin.inc \nodesinblock_settings_clear_confirm_submit()
Submit callback: clear nodes in block settings.
File
- ./
nodesinblock.admin.inc, line 179 - Administration page for nodes in block.
Code
function nodesinblock_settings_clear_confirm_submit($form, &$form_state) {
db_delete('variable')
->condition('name', 'nodesinblock_%', 'LIKE')
->execute();
db_delete('blocks')
->condition('module', 'nodesinblock', '=')
->execute();
db_truncate('nodesinblock')
->execute();
cache_clear_all('variables', 'cache');
drupal_set_message(t('All nodes in block settings have been cleared'));
$form_state['redirect'] = 'admin/config/nodesinblock';
}