From f407c08674e1d913192436289de75bc8bda4b5db Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 1 Oct 2006 10:08:55 +0100 Subject: gracube updates, code cleanup --- backend.php | 287 ------------------------------------------------------------ 1 file changed, 287 deletions(-) (limited to 'backend.php') diff --git a/backend.php b/backend.php index 74a22e23c..49ca35c32 100644 --- a/backend.php +++ b/backend.php @@ -122,293 +122,6 @@ if (!sanity_check($link)) { return; } - function outputFeedList($link, $tags = false) { - - print ""; - } - - $category = $tmp_category; - - $collapsed = $line["collapsed"]; - - // workaround for NULL category - if ($category == "Uncategorized") { - if ($_COOKIE["ttrss_vf_uclps"] == 1) { - $collapsed = "t"; - } - } - - if ($collapsed == "t" || $collapsed == "1") { - $holder_class = "invisible"; - $ellipsis = "..."; - } else { - $holder_class = ""; - $ellipsis = ""; - } - - $cat_id = sprintf("%d", $cat_id); - - $cat_unread = getCategoryUnread($link, $cat_id); - - print "
  • - $tmp_category - - ($cat_unread unread)$ellipsis -
  • "; - - // !!! NO SPACE before keyboard navigation, etc. - print "
    • "; - } - - printFeedEntry($feed_id, $class, $feed, $unread, - "icons/$feed_id.ico", $link, $rtl_content, - $last_updated, $line["last_error"]); - - ++$lnum; - } - - if (db_num_rows($result) == 0) { - print "
    • No feeds to display.
    • "; - } - - } else { - - // tags - -/* $result = db_query($link, "SELECT tag_name,count(ttrss_entries.id) AS count - FROM ttrss_tags,ttrss_entries,ttrss_user_entries WHERE - post_int_id = ttrss_user_entries.int_id AND - unread = true AND ref_id = ttrss_entries.id - AND ttrss_tags.owner_uid = '$owner_uid' GROUP BY tag_name - UNION - select tag_name,0 as count FROM ttrss_tags WHERE owner_uid = '$owner_uid' - ORDER BY tag_name"); */ - - if (get_pref($link, 'ENABLE_FEED_CATS')) { - print "
    • Tags
    • "; - print "
      • "; - } - - $result = db_query($link, "SELECT tag_name,SUM((SELECT COUNT(int_id) - FROM ttrss_user_entries WHERE int_id = post_int_id - AND unread = true)) AS count FROM ttrss_tags - WHERE owner_uid = 2 GROUP BY tag_name ORDER BY tag_name"); - - $tags = array(); - - while ($line = db_fetch_assoc($result)) { - $tags[$line["tag_name"]] += $line["count"]; - } - - foreach (array_keys($tags) as $tag) { - - $unread = $tags[$tag]; - - $class = "tag"; - - if ($unread > 0) { - $class .= "Unread"; - } - - printFeedEntry($tag, $class, $tag, $unread, "images/tag.png", $link); - - } - - if (db_num_rows($result) == 0) { - print "
      • No tags to display.
      • "; - } - - if (get_pref($link, 'ENABLE_FEED_CATS')) { - print "
      \n"; - } - - } - - print "
    "; - - } - - if ($op == "rpc") { handle_rpc_request($link); } -- cgit v1.2.3