You are here

function mostpopular_settings_form_validate in Drupal Most Popular 7

Same name and namespace in other branches
  1. 6 mostpopular.admin.inc \mostpopular_settings_form_validate()
1 string reference to 'mostpopular_settings_form_validate'
mostpopular_settings_form in ./mostpopular.admin.inc

File

./mostpopular.admin.inc, line 109
Defines the main administration forms for the Most Popular module.

Code

function mostpopular_settings_form_validate($form, &$form_state) {

  // Change the encoding for the path fields
  $basepaths = explode("\n", $form_state['values']['mostpopular_basepaths']);
  $form_state['values']['mostpopular_basepaths'] = array();
  foreach ($basepaths as $path) {
    $path = trim($path);
    if (!empty($path)) {
      $form_state['values']['mostpopular_basepaths'][] = $path;
    }
  }
}