You are here

function boost_block_db_rm_settings_form_submit in Boost 6

Removes page specific settings in the boost cache database.

1 string reference to 'boost_block_db_rm_settings_form_submit'
boost_block_db_settings_form in ./boost.module

File

./boost.module, line 2436
Provides static file caching for Drupal text output. Pages, Feeds, ect...

Code

function boost_block_db_rm_settings_form_submit(&$form_state, $form) {
  global $_boost;
  $router_item = _boost_get_menu_router();
  $data = array();
  if (is_numeric($form['values']['id'])) {
    boost_remove_settings_db($form['values']['id_value']);
    $data[] = array(
      'base_dir' => BOOST_FILE_PATH,
      'page_callback' => $router_item['page_callback'],
      'page_type' => $router_item['page_type'],
      'page_id' => $router_item['page_id'],
    );
  }
  if (is_numeric($form['values']['type'])) {
    boost_remove_settings_db($form['values']['type_value']);
    $data[] = array(
      'base_dir' => BOOST_FILE_PATH,
      'page_callback' => $router_item['page_callback'],
      'page_type' => $router_item['page_type'],
    );
  }
  if (is_numeric($form['values']['container'])) {
    boost_remove_settings_db($form['values']['container_value']);
    $data[] = array(
      'base_dir' => BOOST_FILE_PATH,
      'page_callback' => $router_item['page_callback'],
    );
  }
  if ($data) {
    $flushed = boost_cache_expire_router($data);
  }
  if (BOOST_VERBOSE >= 7 && isset($_boost['verbose_option_selected']['boost_block_rm_settings_submit'])) {
    watchdog('boost', 'Debug: boost_block_db_rm_settings_form_submit() <br />!flushed pages being expired from the cache in order for the new settings to take effect.', array(
      '!flushed' => $flushed,
    ));
  }
}