From 68916212b2541344f487354a5ec1e7895aa1370a Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 30 Jun 2012 16:40:47 +0400 Subject: [PATCH] use Uncategorized coalesce in a few more places --- classes/feeds.php | 3 +-- include/functions.php | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/classes/feeds.php b/classes/feeds.php index e37401b8..1e2d5669 100644 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -869,7 +869,7 @@ class Feeds extends Protected_Handler { $query = "SELECT ttrss_feeds.id, ttrss_feeds.title, ".SUBSTRING_FOR_DATE."(last_updated,1,19) AS last_updated_noms, cat_id,last_error, - ttrss_feed_categories.title AS category, + COALESCE(ttrss_feed_categories.title, '".__('Uncategorized')."') AS category, ttrss_feed_categories.collapsed, value AS unread FROM ttrss_feeds LEFT JOIN ttrss_feed_categories @@ -905,7 +905,6 @@ class Feeds extends Protected_Handler { $cat_id = $line["cat_id"]; $tmp_category = $line["category"]; - if (!$tmp_category) $tmp_category = __("Uncategorized"); if ($category != $tmp_category && $enable_cats) { diff --git a/include/functions.php b/include/functions.php index 96b502d5..4b8929a0 100644 --- a/include/functions.php +++ b/include/functions.php @@ -2850,7 +2850,7 @@ $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, @@ -2897,8 +2897,6 @@ } */ 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']; } -- 2.39.5