You are here

function nodesinblock_settings_clear_confirm_submit in Nodes In Block 6

Same name and namespace in other branches
  1. 7 nodesinblock.admin.inc \nodesinblock_settings_clear_confirm_submit()

Submit callback: clear nodes in block settings.

File

./nodesinblock.admin.inc, line 189
Administration page for nodes in block.

Code

function nodesinblock_settings_clear_confirm_submit($form, &$form_state) {
  db_query("DELETE FROM {variable} WHERE name LIKE 'nodesinblock_%%'");
  db_query("DELETE FROM {blocks} where module = 'nodesinblock'");
  db_query("TRUNCATE {nodesinblock}");
  cache_clear_all('variables', 'cache');
  drupal_set_message(t('All nodes in block settings have been cleared'));
  $form_state['redirect'] = 'admin/settings/nodesinblock';
}