summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/blog.module4
-rw-r--r--modules/blog/blog.module4
-rw-r--r--modules/legacy.module16
-rw-r--r--modules/legacy/legacy.module16
4 files changed, 36 insertions, 4 deletions
diff --git a/modules/blog.module b/modules/blog.module
index 6070d193d..dc40360c5 100644
--- a/modules/blog.module
+++ b/modules/blog.module
@@ -162,9 +162,9 @@ function blog_page_user($uid) {
$output .= node_view(node_load(array('nid' => $node->nid)), 1);
}
$output .= theme('pager', NULL, variable_get('default_nodes_main', 10));
- $output .= theme('xml_icon', url("blog/feed/$account->uid"));
+ $output .= theme('xml_icon', url("blog/$account->uid/feed"));
- drupal_set_html_head('<link rel="alternate" type="application/rss+xml" title="RSS - '. $title .'" href="'. url("blog/feed/$account->uid") .'" />');
+ drupal_set_html_head('<link rel="alternate" type="application/rss+xml" title="RSS - '. $title .'" href="'. url("blog/$account->uid/feed") .'" />');
print theme('page', $output);
}
else {
diff --git a/modules/blog/blog.module b/modules/blog/blog.module
index 6070d193d..dc40360c5 100644
--- a/modules/blog/blog.module
+++ b/modules/blog/blog.module
@@ -162,9 +162,9 @@ function blog_page_user($uid) {
$output .= node_view(node_load(array('nid' => $node->nid)), 1);
}
$output .= theme('pager', NULL, variable_get('default_nodes_main', 10));
- $output .= theme('xml_icon', url("blog/feed/$account->uid"));
+ $output .= theme('xml_icon', url("blog/$account->uid/feed"));
- drupal_set_html_head('<link rel="alternate" type="application/rss+xml" title="RSS - '. $title .'" href="'. url("blog/feed/$account->uid") .'" />');
+ drupal_set_html_head('<link rel="alternate" type="application/rss+xml" title="RSS - '. $title .'" href="'. url("blog/$account->uid/feed") .'" />');
print theme('page', $output);
}
else {
diff --git a/modules/legacy.module b/modules/legacy.module
index 39ffc8b8c..882298fa4 100644
--- a/modules/legacy.module
+++ b/modules/legacy.module
@@ -34,6 +34,11 @@ function legacy_menu($may_cache) {
$items[] = array('path' => 'taxonomy/feed', 'title' => t('taxonomy'),
'callback' => 'legacy_taxonomy_feed',
'access' => TRUE, 'type' => MENU_CALLBACK);
+
+ // Map "blog/feed/52" to "blog/52/feed".
+ $items[] = array('path' => 'blog/feed', 'title' => t('blog'),
+ 'callback' => 'legacy_blog_feed',
+ 'access' => TRUE, 'type' => MENU_CALLBACK);
}
else {
// Map "node/view/52" to "node/52".
@@ -79,6 +84,17 @@ function legacy_taxonomy_feed($operation = 'or', $str_tids = '') {
}
/**
+ * Menu callback; redirects users to new blog feed paths.
+ */
+function legacy_blog_feed($str_uid = '') {
+ // if URL is of form blog/feed/52 redirect
+ // if URL is of form blog/feed no need to redirect
+ if (is_numeric($str_uid)) {
+ drupal_goto('blog/'. $str_uid .'/feed');
+ }
+}
+
+/**
* Implementation of hook_filter(). Handles URL upgrades from Drupal 4.1.
*/
function legacy_filter($op, $delta = 0, $format = -1, $text = '') {
diff --git a/modules/legacy/legacy.module b/modules/legacy/legacy.module
index 39ffc8b8c..882298fa4 100644
--- a/modules/legacy/legacy.module
+++ b/modules/legacy/legacy.module
@@ -34,6 +34,11 @@ function legacy_menu($may_cache) {
$items[] = array('path' => 'taxonomy/feed', 'title' => t('taxonomy'),
'callback' => 'legacy_taxonomy_feed',
'access' => TRUE, 'type' => MENU_CALLBACK);
+
+ // Map "blog/feed/52" to "blog/52/feed".
+ $items[] = array('path' => 'blog/feed', 'title' => t('blog'),
+ 'callback' => 'legacy_blog_feed',
+ 'access' => TRUE, 'type' => MENU_CALLBACK);
}
else {
// Map "node/view/52" to "node/52".
@@ -79,6 +84,17 @@ function legacy_taxonomy_feed($operation = 'or', $str_tids = '') {
}
/**
+ * Menu callback; redirects users to new blog feed paths.
+ */
+function legacy_blog_feed($str_uid = '') {
+ // if URL is of form blog/feed/52 redirect
+ // if URL is of form blog/feed no need to redirect
+ if (is_numeric($str_uid)) {
+ drupal_goto('blog/'. $str_uid .'/feed');
+ }
+}
+
+/**
* Implementation of hook_filter(). Handles URL upgrades from Drupal 4.1.
*/
function legacy_filter($op, $delta = 0, $format = -1, $text = '') {