function hashtags_configuration_form_validate in Hashtags 7.2
Same name and namespace in other branches
- 7 hashtags.module \hashtags_configuration_form_validate()
File
- ./
hashtags.module, line 303
Code
function hashtags_configuration_form_validate($form, &$form_state) {
if ($form_state['clicked_button']['#value'] == t('Save configuration')) {
$vocabulary = taxonomy_vocabulary_load(variable_get('hashtags_vocabulary', 0));
if (!$vocabulary) {
form_set_error('', t('Taxonomy has n\'t been created or has been deleted manually.. try to reinstall module.'));
return;
}
$field_name = variable_get('hashtags_terms_field', '');
if (!field_info_field($field_name)) {
form_set_error('', t('Terms field has n\'t been created or has been deleted manually.. try to reinstall module.'));
return;
}
}
}