]> git.wh0rd.org Git - tt-rss.git/commitdiff
response size optimizations for viewfeed/view
authorAndrew Dolgov <fox@bah.spb.su>
Thu, 8 Sep 2005 02:49:20 +0000 (03:49 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Thu, 8 Sep 2005 02:49:20 +0000 (03:49 +0100)
backend.php

index 10169f7ae1a3961f237a619d73ec1bfb369d4a3f..ae35ee123bd178129eaaf8446628b702cccef8ff 100644 (file)
                $addheader = $_GET["addheader"];
                $limit = $_GET["limit"];
 
+               if (!$feed) {
+                       print "Error: no feed to display.";
+                       return;
+               }
+
                if (!$skip) $skip = 0;
 
                if ($subop == "undefined") $subop = "";
                                </head><body>";
                }
 
-               if (DB_TYPE == "pgsql") {
-                       $result = db_query($link, 
-                               "SELECT *,SUBSTRING(last_updated,1,16) as last_updated_s,
-                               EXTRACT(EPOCH FROM NOW()) - EXTRACT(EPOCH FROM last_updated) as update_timeout
-                               FROM ttrss_feeds WHERE id = '$feed'");
-               } else {
-                       $result = db_query($link, 
-                               "SELECT *,SUBSTRING(last_updated,1,16) as last_updated_s
-                               FROM ttrss_feeds WHERE id = '$feed'");
-               }
-
+               $result = db_query($link, 
+                       "SELECT *,SUBSTRING(last_updated,1,16) as last_updated_s
+                       FROM ttrss_feeds WHERE id = '$feed'");
+       
                if ($result) {
 
                        $line = db_fetch_assoc($result);
 
                $unread_entries = db_fetch_result($result, 0, "unread_entries"); */
 
-               if ($limit != "All") {
+               if ($limit && $limit != "All") {
                        $limit_query_part = "LIMIT " . $limit;
                } 
 
                        print "<tr class='$class' id='RROW-$id'";
                        // onclick=\"javascript:view($id,$feed_id)\">
 
-                       print "<td valign='center' align='center'
-                               class='headlineUpdateMark'>$update_pic</td>";
-
-                       print "<td valign='center' align='center'
-                               class='headlineUpdateMark'>$marked_pic</td>";
+                       print "<td valign='center' align='center'>$update_pic</td>";
+                       print "<td valign='center' align='center'>$marked_pic</td>";
 
-                       print "<td class='headlineUpdated' width='25%'>
+                       print "<td width='25%'>
                                <a href=\"javascript:view($id,$feed_id);\">".$line["updated"]."</a></td>";
-                       print "<td width='70%' class='headlineTitle'>$content_link</td>";
+                       print "<td width='70%'>$content_link</td>";
 
                        print "</tr>";