summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorSteven Wittens <steven@10.no-reply.drupal.org>2005-03-18 08:25:07 +0000
committerSteven Wittens <steven@10.no-reply.drupal.org>2005-03-18 08:25:07 +0000
commit4fee0bdbeca6097771e3c0db10154f4830b5eb2d (patch)
tree80a5361c5f3d18ac21d502ad1b360d5510f89069 /modules
parente17490b653b900b46c9a714d273c81efe4dc17d5 (diff)
downloadbrdo-4fee0bdbeca6097771e3c0db10154f4830b5eb2d.tar.gz
brdo-4fee0bdbeca6097771e3c0db10154f4830b5eb2d.tar.bz2
- #13550: Prettier RSS discovery URLs for taxonomy pages.
Diffstat (limited to 'modules')
-rw-r--r--modules/taxonomy.module7
-rw-r--r--modules/taxonomy/taxonomy.module7
2 files changed, 10 insertions, 4 deletions
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('<link rel="alternate" type="application/rss+xml" title="RSS - '. $title .'" href="'. url('taxonomy/term/'. $str_tids .'/'. $depth .'/feed') .'" />');
+ drupal_set_html_head('<link rel="alternate" type="application/rss+xml" title="RSS - '. $title .'" href="'. url('taxonomy/term/'. $rss_tids .'/'. $depth .'/feed') .'" />');
$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('<link rel="alternate" type="application/rss+xml" title="RSS - '. $title .'" href="'. url('taxonomy/term/'. $str_tids .'/'. $depth .'/feed') .'" />');
+ drupal_set_html_head('<link rel="alternate" type="application/rss+xml" title="RSS - '. $title .'" href="'. url('taxonomy/term/'. $rss_tids .'/'. $depth .'/feed') .'" />');
$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;