From fa3bcfa37997cada30b14a520dc5334a8049e963 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 3 Dec 2017 22:49:57 +0300 Subject: queryfeedheadlines: there's no need to quote order_by/override_order else: feedicon cache busting etc --- classes/feeds.php | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'classes/feeds.php') diff --git a/classes/feeds.php b/classes/feeds.php index 07dd2a600..b52b580f4 100755 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -414,7 +414,7 @@ class Feeds extends Handler_Protected { $entry_author = " — $entry_author"; } - $has_feed_icon = feed_has_icon($feed_id); + $has_feed_icon = feeds::feedHasIcon($feed_id); if ($has_feed_icon) { $feed_icon_img = "\"\""; @@ -537,20 +537,12 @@ class Feeds extends Handler_Protected { if ($vfeed_group_enabled && $line["feed_title"]) { if ($feed_id != $vgroup_last_feed) { - $cur_feed_title = $line["feed_title"]; $vgroup_last_feed = $feed_id; - $cur_feed_title = htmlspecialchars($cur_feed_title); - $vf_catchup_link = "".__('mark feed as read').""; - $has_feed_icon = feed_has_icon($feed_id); - - if ($has_feed_icon) { - $feed_icon_img = "\"\""; - } else { - //$feed_icon_img = "\"\""; - } + $feed_icon_src = Feeds::getFeedIcon($feed_id); + $feed_icon_img = ""; $reply['content'] .= "
". "
$feed_icon_img
". @@ -1590,6 +1582,10 @@ class Feeds extends Handler_Protected { return ICONS_DIR . "/$feed_id.ico"; } + static function feedHasIcon($id) { + return is_file(ICONS_DIR . "/$id.ico") && filesize(ICONS_DIR . "/$id.ico") > 0; + } + static function getFeedIcon($id) { switch ($id) { case 0: @@ -2052,9 +2048,9 @@ class Feeds extends Handler_Protected { // proper override_order applied above if ($vfeed_query_part && !$ignore_vfeed_group && get_pref('VFEED_GROUP_BY_FEED', $owner_uid)) { if (!$override_order) { - $order_by = "ttrss_feeds.title, ".$pdo->quote($order_by); + $order_by = "ttrss_feeds.title, ".$order_by; } else { - $order_by = "ttrss_feeds.title, ".$pdo->quote($override_order); + $order_by = "ttrss_feeds.title, ".$override_order; } } -- cgit v1.2.3-54-g00ecf