From 4fee0bdbeca6097771e3c0db10154f4830b5eb2d Mon Sep 17 00:00:00 2001 From: Steven Wittens Date: Fri, 18 Mar 2005 08:25:07 +0000 Subject: - #13550: Prettier RSS discovery URLs for taxonomy pages. --- modules/taxonomy.module | 7 +++++-- modules/taxonomy/taxonomy.module | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'modules') diff --git a/modules/taxonomy.module b/modules/taxonomy.module index 9227db223..ef6b8b9e7 100644 --- a/modules/taxonomy.module +++ b/modules/taxonomy.module @@ -917,6 +917,9 @@ function taxonomy_term_page($str_tids = '', $depth = 0, $op = 'page') { drupal_not_found(); } + // Needed for '+' to show up in RSS discovery URLs + $rss_tids = urlencode($str_tids); + if ($tids) { // Build title: $result = db_query('SELECT name FROM {term_data} WHERE tid IN (%s)', implode(',', $tids)); @@ -940,10 +943,10 @@ function taxonomy_term_page($str_tids = '', $depth = 0, $op = 'page') { $breadcrumbs = array_reverse($breadcrumbs); menu_set_location($breadcrumbs); - drupal_set_html_head(''); + drupal_set_html_head(''); $output = taxonomy_render_nodes(taxonomy_select_nodes($tids, $operator, $depth, TRUE)); - $output .= theme('xml_icon', url("taxonomy/term/$str_tids/$depth/feed")); + $output .= theme('xml_icon', url("taxonomy/term/$rss_tids/$depth/feed")); print theme('page', $output); break; diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 9227db223..ef6b8b9e7 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -917,6 +917,9 @@ function taxonomy_term_page($str_tids = '', $depth = 0, $op = 'page') { drupal_not_found(); } + // Needed for '+' to show up in RSS discovery URLs + $rss_tids = urlencode($str_tids); + if ($tids) { // Build title: $result = db_query('SELECT name FROM {term_data} WHERE tid IN (%s)', implode(',', $tids)); @@ -940,10 +943,10 @@ function taxonomy_term_page($str_tids = '', $depth = 0, $op = 'page') { $breadcrumbs = array_reverse($breadcrumbs); menu_set_location($breadcrumbs); - drupal_set_html_head(''); + drupal_set_html_head(''); $output = taxonomy_render_nodes(taxonomy_select_nodes($tids, $operator, $depth, TRUE)); - $output .= theme('xml_icon', url("taxonomy/term/$str_tids/$depth/feed")); + $output .= theme('xml_icon', url("taxonomy/term/$rss_tids/$depth/feed")); print theme('page', $output); break; -- cgit v1.2.3