You are here

function mostpopular_addthis_config_submit in Drupal Most Popular 6

When the AddThis config form is submitted, only save the password if it is not empty.

_state

Parameters

$form:

1 string reference to 'mostpopular_addthis_config_submit'
mostpopular_addthis_mostpopular_service in modules/mostpopular_addthis/mostpopular_addthis.module
Implements hook_mostpopular_service().

File

modules/mostpopular_addthis/mostpopular_addthis.module, line 134
Uses the AddThis.com Analytics API to provide Most Popular data.

Code

function mostpopular_addthis_config_submit($form, &$form_state) {
  if (empty($form_state['values']['addthis_password'])) {
    unset($form_state['values']['addthis_password']);
  }
  else {
    drupal_set_message(t('Updated AddThis.com password.'));
  }
}