From c36bf4d57d4678671f60971de16936ebadc596ad Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 9 Aug 2007 14:36:32 +0100 Subject: [PATCH] fix wrong generic feed icon --- backend.php | 13 +++---------- functions.php | 17 ++++++++++------- images/feed-icon-12x12.png | Bin 551 -> 552 bytes 3 files changed, 13 insertions(+), 17 deletions(-) diff --git a/backend.php b/backend.php index 9454702f..24f3bba3 100644 --- a/backend.php +++ b/backend.php @@ -417,16 +417,10 @@ $owner = db_fetch_result($result, 0, "owner_uid"); $login = db_fetch_result($result, 0, "login"); - $_SESSION["uid"] = $owner; - - generate_syndicated_feed($link, -2, false); + generate_syndicated_feed($link, $owner, -2, false); - session_destroy(); } else { - - $_SESSION["uid"] = 0; - generate_syndicated_feed($link, -2, false); - session_destroy(); + print "User not found"; } } @@ -448,11 +442,10 @@ if ($_SESSION["uid"] || http_authenticate_user($link)) { - generate_syndicated_feed($link, $feed, $is_cat, + generate_syndicated_feed($link, 0, $feed, $is_cat, $search, $search_mode, $match_on); } - session_destroy(); } if ($op == "labelFromSearch") { diff --git a/functions.php b/functions.php index 8157d12d..709e2b8e 100644 --- a/functions.php +++ b/functions.php @@ -2433,7 +2433,9 @@ return $search_query_part; } - function queryFeedHeadlines($link, $feed, $limit, $view_mode, $cat_view, $search, $search_mode, $match_on, $override_order = false, $offset = 0) { + function queryFeedHeadlines($link, $feed, $limit, $view_mode, $cat_view, $search, $search_mode, $match_on, $override_order = false, $offset = 0, $owner_uid = 0) { + + if (!$owner_uid) $owner_uid = $_SESSION["uid"]; if ($search) { @@ -2587,7 +2589,7 @@ if ($feed != 0) { $result = db_query($link, "SELECT title FROM ttrss_feed_categories - WHERE id = '$feed' AND owner_uid = " . $_SESSION["uid"]); + WHERE id = '$feed' AND owner_uid = $owner_uid"); $feed_title = db_fetch_result($result, 0, "title"); } else { $feed_title = __("Uncategorized"); @@ -2600,7 +2602,7 @@ } else { $result = db_query($link, "SELECT title,site_url,last_error FROM ttrss_feeds - WHERE id = '$feed' AND owner_uid = " . $_SESSION["uid"]); + WHERE id = '$feed' AND owner_uid = $owner_uid"); $feed_title = db_fetch_result($result, 0, "title"); $feed_site_url = db_fetch_result($result, 0, "site_url"); @@ -2660,7 +2662,7 @@ ttrss_feeds.hidden = false AND ttrss_user_entries.feed_id = ttrss_feeds.id AND ttrss_user_entries.ref_id = ttrss_entries.id AND - ttrss_user_entries.owner_uid = '".$_SESSION["uid"]."' AND + ttrss_user_entries.owner_uid = '$owner_uid' AND $search_query_part $view_query_part $query_strategy_part ORDER BY $order_by @@ -2689,7 +2691,7 @@ ttrss_entries,ttrss_user_entries,ttrss_tags WHERE ref_id = ttrss_entries.id AND - ttrss_user_entries.owner_uid = '".$_SESSION["uid"]."' AND + ttrss_user_entries.owner_uid = '$owner_uid' AND post_int_id = int_id AND tag_name = '$feed' AND $view_query_part $search_query_part @@ -2701,11 +2703,12 @@ } - function generate_syndicated_feed($link, $feed, $is_cat, + function generate_syndicated_feed($link, $owner_uid, $feed, $is_cat, $search, $search_mode, $match_on) { $qfh_ret = queryFeedHeadlines($link, $feed, - 30, false, $is_cat, $search, $search_mode, $match_on, "updated DESC"); + 30, false, $is_cat, $search, $search_mode, $match_on, "updated DESC", 0, + $owner_uid); $result = $qfh_ret[0]; $feed_title = htmlspecialchars($qfh_ret[1]); diff --git a/images/feed-icon-12x12.png b/images/feed-icon-12x12.png index 10faf2548a5336c1f1a1645346e3a4ed0a6194bf..291000eab2b97c9a5a6f76e77afd6837ec10ac5f 100644 GIT binary patch delta 525 zcmV+o0`mQ*1gHctiBL{Q4GJ0x0000DNk~Le0000C0000C2nGNE09JKe=Kufz1ZP1_ zK>z@+$TtOw>5(BPe*wBlL_t(|+DwtXOB_)Y#n1bgx3gg*gUBwil7vJAAqol-5wS1? zBwZk#q*>CW2sSoWBB*~ru+U1du~AS0TdkEgY9)lAU=<|>%_O^FcfQ`seQ#78xWgOf zocn(FT=spYZ@^c6-B&8$9*2+&{6R6n0F$BlHx9#J%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