]> git.wh0rd.org Git - tt-rss.git/commitdiff
update_rss_feed: lowercase and strip duplicate tags before checking for filters
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 12 Nov 2010 12:52:00 +0000 (15:52 +0300)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 12 Nov 2010 12:52:00 +0000 (15:52 +0300)
functions.php

index 127704990b6a649923ee4c261f3ab93ce62de844..f7a54b7c2730a78a3d32fbb836296bf075f19823 100644 (file)
                                $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:");
                                        /* 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: ");