You are here

function campaignmonitor_admin_settings_general_submit in Campaign Monitor 7

Same name and namespace in other branches
  1. 8 includes/campaignmonitor.admin.inc \campaignmonitor_admin_settings_general_submit()

Form submit handler.

Takes care of rehashing the block table to ensure that blocks are available after Campaign Monitor activation.

1 string reference to 'campaignmonitor_admin_settings_general_submit'
campaignmonitor_admin_settings_general in includes/campaignmonitor.admin.inc
Creates the Campaign Monitor settings form.

File

includes/campaignmonitor.admin.inc, line 136
Implementation of the administration interface for the module.

Code

function campaignmonitor_admin_settings_general_submit($form, &$form_state) {

  // If archive block has been selected, rehash the block cache.
  if (isset($form_state['values']['campaignmonitor_general']['archive']) && $form_state['values']['campaignmonitor_general']['archive'] || $form['campaignmonitor_account']['api_key']['#default_value'] != $form_state['values']['campaignmonitor_account']['api_key'] || $form['campaignmonitor_account']['client_id']['#default_value'] != $form_state['values']['campaignmonitor_account']['client_id']) {
    _block_rehash();
  }
}