From: Andrew Dolgov Date: Sat, 30 Jun 2012 12:40:47 +0000 (+0400) Subject: use Uncategorized coalesce in a few more places X-Git-Tag: 1.6.0~201 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=68916212b2541344f487354a5ec1e7895aa1370a;p=tt-rss.git use Uncategorized coalesce in a few more places --- 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']; }