summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-11-29 04:53:32 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-11-29 04:53:32 +0000
commit14779b97e1a051b68e2977ba6f48932e54da7b25 (patch)
tree0d79c0a340a92e5d7f2d3587ec59d1dc7171e4dc /includes
parent1a685474e698ce3e90dbae87f6a1f83966d9ef63 (diff)
downloadbrdo-14779b97e1a051b68e2977ba6f48932e54da7b25.tar.gz
brdo-14779b97e1a051b68e2977ba6f48932e54da7b25.tar.bz2
#917730 by rfay, David_Rothstein: Fixed various RSS feed links (with tests).
Diffstat (limited to 'includes')
-rw-r--r--includes/common.inc14
-rw-r--r--includes/theme.inc3
2 files changed, 11 insertions, 6 deletions
diff --git a/includes/common.inc b/includes/common.inc
index f1b153781..42b639504 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -348,7 +348,7 @@ function drupal_get_html_head() {
* This function can be called as long the HTML header hasn't been sent.
*
* @param $url
- * A url for the feed.
+ * An internal system path or a fully qualified external URL of the feed.
* @param $title
* The title of the feed.
*/
@@ -358,10 +358,14 @@ function drupal_add_feed($url = NULL, $title = '') {
if (isset($url)) {
$stored_feed_links[$url] = theme('feed_icon', array('url' => $url, 'title' => $title));
- drupal_add_html_head_link(array('rel' => 'alternate',
- 'type' => 'application/rss+xml',
- 'title' => $title,
- 'href' => $url));
+ drupal_add_html_head_link(array(
+ 'rel' => 'alternate',
+ 'type' => 'application/rss+xml',
+ 'title' => $title,
+ // Force the URL to be absolute, for consistency with other <link> tags
+ // output by Drupal.
+ 'href' => url($url, array('absolute' => TRUE)),
+ ));
}
return $stored_feed_links;
}
diff --git a/includes/theme.inc b/includes/theme.inc
index 4d8e054d7..f3ace1368 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -1866,7 +1866,8 @@ function theme_more_help_link($variables) {
*
* @param $variables
* An associative array containing:
- * - url: The url of the feed.
+ * - url: An internal system path or a fully qualified external URL of the
+ * feed.
* - title: A descriptive title of the feed.
*/
function theme_feed_icon($variables) {