]> git.wh0rd.org Git - tt-rss.git/commitdiff
remove redundant always_display_enclosure queries
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 11 Nov 2011 08:50:34 +0000 (12:50 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 11 Nov 2011 08:50:37 +0000 (12:50 +0400)
functions.php

index fd89f5099908e2a5f6e55f08db38514c9e82b8c9..0fd2a802ffb0a369fdf55ff2e11e96f6cdfa0fa5 100644 (file)
                                                updated,
                                                label_cache,
                                                tag_cache,
+                                               always_display_enclosures,
                                                note,
                                                unread,feed_id,marked,published,link,last_read,orig_feed_id,
                                                ".SUBSTRING_FOR_DATE."(last_read,1,19) as last_read_noms,
                                                                "feed_id," .
                                                                "orig_feed_id," .
                                                                "marked," .
+                                                               "tag_cache," .
+                                                               "label_cache," .
                                                                "link," .
                                                                "last_read," .
                                                                SUBSTRING_FOR_DATE . "(last_read,1,19) as last_read_noms," .
                                        $reply['content'] .= $expand_cdm ? $article_content : '';
                                        $reply['content'] .= "</span>";
 
-                                       $tmp_result = db_query($link, "SELECT always_display_enclosures FROM
+/*                                     $tmp_result = db_query($link, "SELECT always_display_enclosures FROM
                                                ttrss_feeds WHERE id = ".
                                                (($line['feed_id'] == null) ? $line['orig_feed_id'] :
-                                                               $line['feed_id'])." AND owner_uid = ".$_SESSION["uid"]);
+                                                       $line['feed_id'])." AND owner_uid = ".$_SESSION["uid"]);
 
                                        $always_display_enclosures = sql_bool_to_bool(db_fetch_result($tmp_result,
-                                               0, "always_display_enclosures"));
+                                               0, "always_display_enclosures")); */
+
+                                       $always_display_enclosures = sql_bool_to_bool($line["always_display_enclosures"]);
 
                                        $reply['content'] .= format_article_enclosures($link, $id, $always_display_enclosures,
                                                $article_content);