]> git.wh0rd.org Git - tt-rss.git/commitdiff
mobile: label-related fixes; show article icons
authorAndrew Dolgov <fox@bah.org.ru>
Thu, 17 Dec 2009 19:14:54 +0000 (22:14 +0300)
committerAndrew Dolgov <fox@bah.org.ru>
Thu, 17 Dec 2009 19:14:54 +0000 (22:14 +0300)
mobile/functions.php

index 71baa08d12d706d9264847ef157259ef6fb47ae5..91ca397f96025c706462d608d78c8170af4689d3 100644 (file)
@@ -43,7 +43,7 @@
                        while ($line = db_fetch_assoc($result)) {
                                $id = $line["id"];
                                $unread = $line["unread"];
-       
+
        //                      $unread = rand(0, 100);
        
                                if ($unread > 0) {
                                }
 
                                print "<li class='$class'>
-                                       <a href='feed.php?id=$id&cat=-1'>$title</a></li>";
+                                       <a href='feed.php?id=$id&cat=-2'>$title</a></li>";
 
                        }
                        print "</ul>";
 
                while ($line = db_fetch_assoc($result)) {
                        $id = $line["id"];
+                       $real_feed_id = $line["feed_id"];
 
                        if (sql_bool_to_bool($line["unread"])) {
                                $class = '';
                                $class = 'oldItem';
                        }
 
-                       print "<li class='$class'>
-                               <a href='article.php?id=$id&feed=$feed_id&cat=$cat_id'>";
+                       if (mobile_feed_has_icon($real_feed_id)) {
+                               $icon_url = "../".ICONS_URL."/$real_feed_id.ico";
+                       } else {
+                               $icon_url = "../images/blank_icon.gif";
+                       }
+
+                       print "<li class='$class'><a href='article.php?id=$id&feed=$feed_id&cat=$cat_id'>
+                               <img class='tinyIcon' src='$icon_url'>";
                        print $line["title"];
                        print "</a></li>";