You are here

function tweet_admin_submit in Tweet 7.4

Same name and namespace in other branches
  1. 5.2 tweet.module \tweet_admin_submit()
  2. 5 tweet.module \tweet_admin_submit()
  3. 6.4 tweet.admin.inc \tweet_admin_submit()
  4. 6.2 tweet.admin.inc \tweet_admin_submit()
  5. 6.3 tweet.admin.inc \tweet_admin_submit()

Submit handler for tweet_admin().

File

./tweet.admin.inc, line 114
Builds links to post pages to twitter.

Code

function tweet_admin_submit($form, &$form_state) {

  //If no types are selected, assign all types.
  if ($form_state['values']['tweet_types'] == array()) {
    $form_state['values']['tweet_types'] = _tweet_node_types();
  }
  variable_set('tweet_types', $form_state['values']['tweet_types']);

  //Clear the general cache because changed settings may mean that different URLs should be used.
  cache_clear_all('*', 'cache', TRUE);
  drupal_set_message(t('The configuration options have been saved.'));
}