]> git.wh0rd.org Git - tt-rss.git/commitdiff
do not show subtoolbar when no headlines are available
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 12 Nov 2010 15:46:27 +0000 (18:46 +0300)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 12 Nov 2010 15:46:27 +0000 (18:46 +0300)
functions.php

index f3e6a62e76a53b8940d91abcaa99d968ca362df2..7727a0a8f44dad0d5a8dd168125fe03f72fa4199 100644 (file)
                                return;
                        }
 
-                       print_headline_subtoolbar($link, $feed_site_url, $feed_title,
-                               $feed, $cat_view, $search, $match_on, $search_mode, $view_mode);
+                       if (db_num_rows($result) > 0) {
+                               print_headline_subtoolbar($link, $feed_site_url, $feed_title,
+                                       $feed, $cat_view, $search, $match_on, $search_mode, $view_mode);
+
+                               print "<div id=\"headlinesInnerContainer\" onscroll=\"headlines_scroll_handler()\">";
 
-                       print "<div id=\"headlinesInnerContainer\" onscroll=\"headlines_scroll_handler()\">";
+                       }
                }
 
                $headlines_count = db_num_rows($result);
                }
 
                if (!$offset) {
-                       print "</div>";
+                       if ($headlines_count > 0) print "</div>";
                        print "</div>";
                }