You are here

function seotools_setup_1_form_submit in Drupal SEO Tools 7

File

./seotools.setup.inc, line 198
Admin page callback for the seotools module.

Code

function seotools_setup_1_form_submit($form, &$form_state) {
  $values = $form_state['values'];
  if (module_exists('googleanalytics')) {
    if (!isset($values['googleanalytics_set'])) {
      variable_set('googleanalytics_account', $values['googleanalytics_account']);
    }
  }
  if (module_exists('wordstream')) {
    if (!isset($values['wordstream_set'])) {
      variable_set('wordstream_username', $values['wordstream_username']);
      variable_set('wordstream_password', $values['wordstream_password']);
    }
  }
  if (!isset($values['alchemy_set'])) {
    variable_set('alchemy_apikey', $values['alchemy_apikey']);
  }
  drupal_set_message(t('API account information has been saved.'));
  drupal_goto('admin/config/search/seotools/setup/2');
}