]> git.wh0rd.org Git - tt-rss.git/commitdiff
code cleanup (remove dashboard initial stuff)
authorAndrew Dolgov <fox@bah.spb.su>
Fri, 16 Jan 2009 16:12:28 +0000 (17:12 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Fri, 16 Jan 2009 16:12:28 +0000 (17:12 +0100)
backend.php
functions.php

index 0c8929f57b2846be3c3de3346c4f0e282aa828dd..08269b3c70977245e885e25fc9a8b2024b2be201 100644 (file)
                        }
 
                        print "<headlines id=\"$feed\"><![CDATA[";
+               
+                       $override_order = false;
+
+                       switch ($order_by) {
+                               case "date":
+                                       if (get_pref($link, 'REVERSE_HEADLINES', $owner_uid)) {
+                                               $override_order = "updated";
+                                       } else {        
+                                               $override_order = "updated DESC";
+                                       }
+                                       break;
 
-                       if ($feed == -4) {
+                               case "title":
+                                       $override_order = "updated DESC";
+                                       break;
 
-                               generate_dashboard_feed($link);
+                               case "score":
+                                       $override_order = "score DESC";
+                                       break;
+                       }
 
-                       } else {
-                               
-                               $override_order = false;
-
-                               switch ($order_by) {
-                                       case "date":
-                                               if (get_pref($link, 'REVERSE_HEADLINES', $owner_uid)) {
-                                                       $override_order = "updated";
-                                               } else {        
-                                                       $override_order = "updated DESC";
-                                               }
-                                               break;
+                       $ret = outputHeadlinesList($link, $feed, $subop, 
+                               $view_mode, $limit, $cat_view, $next_unread_feed, $offset, 
+                               $vgroup_last_feed, $override_order);
 
-                                       case "title":
-                                               $override_order = "updated DESC";
-                                               break;
+                       $topmost_article_ids = $ret[0];
+                       $headlines_count = $ret[1];
+                       $returned_feed = $ret[2];
+                       $disable_cache = $ret[3];
+                       $vgroup_last_feed = $ret[4];
 
-                                       case "score":
-                                               $override_order = "score DESC";
-                                               break;
-                               }
+                       print "]]></headlines>";
 
-                               $ret = outputHeadlinesList($link, $feed, $subop, 
-                                       $view_mode, $limit, $cat_view, $next_unread_feed, $offset, 
-                                       $vgroup_last_feed, $override_order);
-       
-                               $topmost_article_ids = $ret[0];
-                               $headlines_count = $ret[1];
-                               $returned_feed = $ret[2];
-                               $disable_cache = $ret[3];
-                               $vgroup_last_feed = $ret[4];
-       
-                               print "]]></headlines>";
-       
-                               print "<headlines-count value=\"$headlines_count\"/>";
-                               print "<vgroup-last-feed value=\"$vgroup_last_feed\"/>";
+                       print "<headlines-count value=\"$headlines_count\"/>";
+                       print "<vgroup-last-feed value=\"$vgroup_last_feed\"/>";
 
-                               $headlines_unread = ccache_find($link, $returned_feed, $_SESSION["uid"]);
-       
-                               print "<headlines-unread value=\"$headlines_unread\"/>";
-                               printf("<disable-cache value=\"%d\"/>", $disable_cache);
-       
-                               if ($_GET["debug"]) $timing_info = print_checkpoint("10", $timing_info);
-       
-                               if (is_array($topmost_article_ids) && !get_pref($link, 'COMBINED_DISPLAY_MODE') && !$_SESSION["bw_limit"]) {
-                                       print "<articles>";
-                                       foreach ($topmost_article_ids as $id) {
-                                               outputArticleXML($link, $id, $feed, false);
-                                       }
-                                       print "</articles>";
+                       $headlines_unread = ccache_find($link, $returned_feed, $_SESSION["uid"]);
+
+                       print "<headlines-unread value=\"$headlines_unread\"/>";
+                       printf("<disable-cache value=\"%d\"/>", $disable_cache);
+
+                       if ($_GET["debug"]) $timing_info = print_checkpoint("10", $timing_info);
+
+                       if (is_array($topmost_article_ids) && !get_pref($link, 'COMBINED_DISPLAY_MODE') && !$_SESSION["bw_limit"]) {
+                               print "<articles>";
+                               foreach ($topmost_article_ids as $id) {
+                                       outputArticleXML($link, $id, $feed, false);
                                }
+                               print "</articles>";
                        }
 
                        if ($_GET["debug"]) $timing_info = print_checkpoint("20", $timing_info);
index e49dd9d21e3215169462b2df771a487663c63605..78cd39875f48e7140640665b37c83a0c1ad60118 100644 (file)
 
                        }
 
-                       if (!$dashboard_menu) {
-
                                if (strpos($_SESSION["client.userAgent"], "MSIE") === false) {
 
                                        print "<td class=\"headlineActions$rtl_cpart\">
                                        print "</td>";  
        
                                }
-                       } else { // dashboard menu actions
-
-                               // not implemented
-                               print "</td>";
-                       }
 
                        print "<td class=\"headlineTitle$rtl_cpart\">";
 
                        printCategoryHeader($link, -1, $cat_hidden, false);
                }
 
-               if (defined('_ENABLE_DASHBOARD')) {
-                       printFeedEntry(-4, "virt", __("Dashboard"), 0, 
-                               "images/tag.png", $link);
-               }
-
                $num_starred = getFeedUnread($link, -1);
                $num_published = getFeedUnread($link, -2);
                $num_fresh = getFeedUnread($link, -3);
 
        } // function update_daemon_common
 
-       function generate_dashboard_feed($link) {
-
-               print "<div id=\"headlinesContainer\">";
-
-               print_headline_subtoolbar($link, "", "Dashboard", 
-                       false, false, -4, false, false, false,
-                       false, 0, 0, true, true, "tag.png");
-
-               print "<div id=\"headlinesInnerContainer\" class=\"dashboard\">";
-               print "<div>There is <b>666</b> unread articles in <b>666</b> feeds.</div>";
-               print "</div>";
-
-               print "</div>";
-
-               print "]]></headlines>";
-               print "<headlines-count value=\"0\"/>";
-               print "<headlines-unread value=\"0\"/>";
-               print "<disable-cache value=\"1\"/>";
-
-               print "<articles>";
-               print "</articles>";
-       }
-
        function sanitize_article_content($text) {
                # we don't support CDATA sections in articles, they break our own escaping
                $text = preg_replace("/\[\[CDATA/", "", $text);