]> git.wh0rd.org Git - tt-rss.git/commitdiff
use Uncategorized coalesce in a few more places
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sat, 30 Jun 2012 12:40:47 +0000 (16:40 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sat, 30 Jun 2012 12:40:47 +0000 (16:40 +0400)
classes/feeds.php
include/functions.php

index e37401b8e7867294bccce298bb6ad4fd69b2c764..1e2d566968adbbdaffc847e85289273db2023806 100644 (file)
@@ -869,7 +869,7 @@ class Feeds extends Protected_Handler {
                $query = "SELECT ttrss_feeds.id, ttrss_feeds.title,\r
                        ".SUBSTRING_FOR_DATE."(last_updated,1,19) AS last_updated_noms,\r
                        cat_id,last_error,\r
-                       ttrss_feed_categories.title AS category,\r
+                       COALESCE(ttrss_feed_categories.title, '".__('Uncategorized')."') AS category,\r
                        ttrss_feed_categories.collapsed,\r
                        value AS unread\r
                        FROM ttrss_feeds LEFT JOIN ttrss_feed_categories\r
@@ -905,7 +905,6 @@ class Feeds extends Protected_Handler {
 \r
                                $cat_id = $line["cat_id"];\r
                                $tmp_category = $line["category"];\r
-                               if (!$tmp_category) $tmp_category = __("Uncategorized");\r
 \r
                                if ($category != $tmp_category && $enable_cats) {\r
 \r
index 96b502d58554076c8043d98cc2a0e31e59eb0725..4b8929a0589f2631ca3ff8bf7c675b8e04451340 100644 (file)
 
                $result = db_query($link, "SELECT ttrss_entries.title,
                                ttrss_feeds.title AS feed_title,
-                               ttrss_feed_categories.title AS cat_title,
+                               COALESCE(ttrss_feed_categories.title, '".__('Uncategorized')."') AS cat_title,
                                date_updated,
                                ttrss_user_entries.ref_id,
                                link,
                        } */
 
                        if (get_pref($link, 'ENABLE_FEED_CATS', $user_id)) {
-                               if (!$line['cat_title']) $line['cat_title'] = __("Uncategorized");
-
                                $line['feed_title'] = $line['cat_title'] . " / " . $line['feed_title'];
                        }