]> git.wh0rd.org Git - tt-rss.git/commitdiff
fix wrong generic feed icon
authorAndrew Dolgov <fox@bah.spb.su>
Thu, 9 Aug 2007 13:36:32 +0000 (14:36 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Thu, 9 Aug 2007 13:36:32 +0000 (14:36 +0100)
backend.php
functions.php
images/feed-icon-12x12.png

index 9454702fba02f1b690af63a052f2fcb68e7c4cdc..24f3bba3bd9b8b07e5a1218adf5cf2d1fc07592d 100644 (file)
                        $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 "<error>User not found</error>";
                }
 
        }
                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") {
index 8157d12d2cf3f76179377d774c4e7109f7053afb..709e2b8e242497f1500a3a33b3ea69545df256dd 100644 (file)
                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) {
                        
 
                                        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");
                                } 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");
                                        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
                                                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
                        
        }
 
-       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]);
index 10faf2548a5336c1f1a1645346e3a4ed0a6194bf..291000eab2b97c9a5a6f76e77afd6837ec10ac5f 100644 (file)
Binary files a/images/feed-icon-12x12.png and b/images/feed-icon-12x12.png differ