diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-01-25 20:38:03 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-01-25 20:38:03 +0000 |
commit | dbcda92b76b5e75b5d657a39a3ba8abc9828490a (patch) | |
tree | 19afd90594f7d4239843824fe56a491143f8545a /modules/legacy | |
parent | 01b8e7fdf05cf44ac9d76bbefd3b9c1bb1d473f7 (diff) | |
download | brdo-dbcda92b76b5e75b5d657a39a3ba8abc9828490a.tar.gz brdo-dbcda92b76b5e75b5d657a39a3ba8abc9828490a.tar.bz2 |
- Patch #16021 by tangent: changed the format "/blog/feed/52" to "/blog/52/feed".
Diffstat (limited to 'modules/legacy')
-rw-r--r-- | modules/legacy/legacy.module | 16 |
1 files changed, 16 insertions, 0 deletions
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 = '') { |