Provide control over "feed" in url aliases

See http://drupal.org/node/286843 for more details

Let the user specify both the source path of RSS feeds, and the suffix to use
in the generated alias.

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>

Index: pathauto/pathauto.admin.inc
===================================================================
--- pathauto.orig/pathauto.admin.inc	2009-04-19 16:14:51.000000000 +0200
+++ pathauto/pathauto.admin.inc	2009-04-19 16:25:25.000000000 +0200
@@ -277,10 +277,20 @@
         '#size' => 65,
         '#maxlength' => 1280,
         '#default_value' => $current,
-        '#description' => t('The path provided by modules which enable RSS feeds. Examples are "feed" and "0/feed".<br />' .
-                            '<strong>NOTE</strong>: pathauto will use a <em>fixed</em> "feed" suffix in the generated aliases' .
-                            ' independently from this setting.'),
+        '#description' => t('The path provided by modules which enable RSS feeds. Examples are "feed" and "0/feed".'),
       );
+
+      $variable = 'pathauto_'. $module .'_alias_applytofeeds';
+      $current = variable_get($variable, 'feed');
+      $form[$module][$variable] = array(
+        '#type' => 'textfield',
+        '#title' => t('Suffix to use for feeds aliases'),
+        '#size' => 65,
+        '#maxlength' => 1280,
+        '#default_value' => $current,
+        '#description' => t('The suffix to use in aliases generated for RSS feeds. Examples are "feed" and "rss.xml".'),
+      );
+
     }
 
   }
Index: pathauto/pathauto.inc
===================================================================
--- pathauto.orig/pathauto.inc	2009-04-19 16:25:30.000000000 +0200
+++ pathauto/pathauto.inc	2009-04-19 16:27:21.000000000 +0200
@@ -324,16 +324,17 @@
   // Also create a related feed alias if requested, and if supported
   // by the module
   if (drupal_strlen(variable_get('pathauto_'. $module .'_applytofeeds', ''))) {
-    $feedappend = variable_get('pathauto_'. $module .'_applytofeeds', '');
+    $feedsource = variable_get('pathauto_'. $module .'_applytofeeds', '');
+    $feedalias = variable_get('pathauto_'. $module .'_alias_applytofeeds', '');
 
     // For forums and taxonomies, the src doesn't always form the base of the rss feed (ie. image galleries)
     if ($module == 'taxonomy' || $module == 'forum') {
-      $update_data = _pathauto_existing_alias_data("taxonomy/term/$entity_id/$feedappend");
-      _pathauto_set_alias("taxonomy/term/$entity_id/$feedappend", "$alias/feed", $module, $entity_id, $update_data['pid'], $verbose, $update_data['old_alias'], $language);
+      $update_data = _pathauto_existing_alias_data("taxonomy/term/$entity_id/$feedsource");
+      _pathauto_set_alias("taxonomy/term/$entity_id/$feedsource", "$alias/$feedalias", $module, $entity_id, $update_data['pid'], $verbose, $update_data['old_alias'], $language);
     }
     else {
-      $update_data = _pathauto_existing_alias_data("$src/$feedappend");
-      _pathauto_set_alias("$src/$feedappend", "$alias/feed", $module, $entity_id, $update_data['pid'], $verbose, $update_data['old_alias'], $language);
+      $update_data = _pathauto_existing_alias_data("$src/$feedsource");
+      _pathauto_set_alias("$src/$feedsource", "$alias/$feedalias", $module, $entity_id, $update_data['pid'], $verbose, $update_data['old_alias'], $language);
     }
   }
 
