--- pathauto.admin.inc 2008-06-24 11:07:51.000000000 -0500 +++ pathauto.admin.inc.new 2009-04-05 12:53:55.000000000 -0500 @@ -57,6 +57,15 @@ function pathauto_admin_settings() { '#description' => t('Character used to separate words in titles. This will replace any spaces and punctuation characters. Using a space or + character can cause unexpected results.'), ); + $form['general']['pathauto_separator_alt'] = array( + '#type' => 'textfield', + '#title' => t('Alternative Separator'), + '#size' => 2, + '#maxlength' => 2, + '#default_value' => variable_get('pathauto_separator_alt', '--'), + '#description' => t('Character used to separate words in titles. This will replace any spaces and punctuation characters. Using a space or + character can cause unexpected results.'), + ); + $form['general']['pathauto_case'] = array( '#type' => 'radios', '#title' => t('Character case'), @@ -158,7 +167,7 @@ function pathauto_admin_settings() { '#type' => 'select', '#title' => $details['name'], '#default_value' => variable_get('pathauto_punctuation_'. $name, 0), - '#options' => array('0' => t('Remove'), '1' => t('Replace by separator'), '2' => t('No action (do not replace)')), + '#options' => array('0' => t('Remove'), '1' => t('Replace by separator'), '2' => t('No action (do not replace)'), '3' => t('Replace by alt separator')), ); } @@ -366,9 +375,10 @@ function pathauto_admin_settings_validat // Validate that the separator is not set to be removed per http://drupal.org/node/184119 // This isn't really all that bad so warn, but still allow them to save the value. $separator = $form_state['values']['pathauto_separator']; + $separator_alt = $form_state['values']['pathauto_separator_alt']; $punctuation = pathauto_punctuation_chars(); foreach ($punctuation as $name => $details) { - if ($details['value'] == $separator) { + if ($details['value'] == $separator || $details['value'] == $separator_alt) { $action = $form_state['values']['pathauto_punctuation_'. $name]; if ($action == 0) { drupal_set_message(t('You have configured the @name to be the separator and to be removed when encountered in strings. This can cause problems with your patterns and especially with the catpath and termpath patterns. You should probably set the action for @name to be "replace by separator"', array('@name' => $details['name'])), 'error');