From 5642117bed5b6a17754d2c85e554ff83196e5f15 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?G=C3=A1bor=20Hojtsy?= <gabor@hojtsy.hu>
Date: Wed, 4 Jul 2007 22:47:28 +0000
Subject: [PATCH] #112374 by Wesley Tanaka: drupal_add_feed() should not allow
 adding the same feed more then once to the page

---
 includes/common.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/includes/common.inc b/includes/common.inc
index a2c18d4fa992..3a8d48fcdbbd 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -162,7 +162,7 @@ function drupal_get_headers() {
 function drupal_add_feed($url = NULL, $title = '') {
   static $stored_feed_links = array();
 
-  if (!is_null($url)) {
+  if (!is_null($url) && !isset($stored_feed_links[$url])) {
     $stored_feed_links[$url] = theme('feed_icon', $url, $title);
 
     drupal_add_link(array('rel' => 'alternate',
-- 
GitLab