]> git.wh0rd.org Git - tt-rss.git/commitdiff
provide explanation message in the headlines subtoolbar if feed has update errors
authorAndrew Dolgov <fox@bah.spb.su>
Fri, 16 Dec 2005 17:53:10 +0000 (18:53 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Fri, 16 Dec 2005 17:53:10 +0000 (18:53 +0100)
backend.php
tt-rss.css

index 974eb0a7e3761928ac337ebc784a634fbaa5b303..48d0ca3c1d53c9be0fa8b12b7150d7730558f46e 100644 (file)
                } else if (sprintf("%d", $feed) == 0) {
                        $feed_title = $feed;
                } else if ($feed > 0) {
-                       $result = db_query($link, "SELECT title,site_url FROM ttrss_feeds 
+                       $result = db_query($link, "SELECT title,site_url,last_error FROM ttrss_feeds 
                                WHERE id = '$feed'");
 
                        $feed_title = db_fetch_result($result, 0, "title");
                        $feed_site_url = db_fetch_result($result, 0, "site_url");
+                       $last_error = db_fetch_result($result, 0, "last_error");
 
                } else if ($feed == -1) {
                        $feed_title = "Starred articles";
                                ttrss_entries.id as id,title,
                                SUBSTRING(updated,1,16) as updated,
                                unread,feed_id,
-                               marked,link,last_read,
+                               marked,link,last_read,                          
                                SUBSTRING(last_read,1,19) as last_read_noms,
                                $vfeed_query_part
                                $content_query_part
                                                &nbsp;&nbsp;
                                                Toggle: <a href=\"javascript:selectionToggleUnread()\">Unread</a>,
                                                                <a href=\"javascript:selectionToggleMarked()\">Starred</a>";
-                       
+                               if ($last_error) {
+                                       print "&nbsp;&nbsp;
+                                               <a class=\"warning\" href=\"javascript:alert('Could not update 
+                                                       feed: $last_error')\">Could not update this feed...</a>";
+                               }       
                                print "</td>";
 
                        } else {
index 55795e81a2bc4c93d85c5c8e6491d07d9ffcac1c..48364699d56538e70acfea37c1ffa2cf0a17bdb5 100644 (file)
@@ -896,3 +896,7 @@ div.cdmHeader a:hover {
 
 div.cdmContent {
 }
+
+a.warning {
+       color : #f04040;
+}