summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2010-11-12 15:52:00 +0300
committerAndrew Dolgov <[email protected]>2010-11-12 15:52:00 +0300
commit1e87951df5ab94375b732f2094553ac044f50583 (patch)
tree81fa0c6e88b7e06a6b209b8f8231749812ca12a8 /functions.php
parent76d453330df1c5076f3194526f758e368a59c9e6 (diff)
update_rss_feed: lowercase and strip duplicate tags before checking for filters
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/functions.php b/functions.php
index 127704990..f7a54b7c2 100644
--- a/functions.php
+++ b/functions.php
@@ -1016,6 +1016,10 @@
$entry_tags = $entry_tags[1];
$entry_tags = array_merge($entry_tags, $additional_tags);
+ $entry_tags = array_unique($entry_tags);
+
+ for ($i = 0; $i < count($entry_tags); $i++)
+ $entry_tags[$i] = mb_strtolower($entry_tags[$i], 'utf-8');
if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) {
_debug("update_rss_feed: unfiltered tags found:");
@@ -1122,7 +1126,8 @@
/* Collect article tags here so we could filter by them: */
$article_filters = get_article_filters($filters, $entry_title,
- $entry_content, $entry_link, $entry_timestamp, $entry_author, $entry_tags);
+ $entry_content, $entry_link, $entry_timestamp, $entry_author,
+ $entry_tags);
if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) {
_debug("update_rss_feed: article filters: ");