]> git.wh0rd.org Git - tt-rss.git/commitdiff
feed browser: save site_url when resubscribing to archived feed
authorAndrew Dolgov <fox@bah.org.ru>
Mon, 11 Jan 2010 12:44:44 +0000 (15:44 +0300)
committerAndrew Dolgov <fox@bah.org.ru>
Mon, 11 Jan 2010 12:44:44 +0000 (15:44 +0300)
modules/pref-feeds.php

index a3f1a472f60d551c8cd6dd406a2388ac54fb8e48..0794bc6261bde48e8bfa1f82a05c6b3e0959bdfd 100644 (file)
                                        $result = db_query($link, "SELECT feed_url,title FROM ttrss_feeds
                                                WHERE id = '$id'");
                                } else if ($mode == 2) {
-                                       $result = db_query($link, "SELECT id,feed_url,title FROM ttrss_archived_feeds
+                                       $result = db_query($link, "SELECT * FROM ttrss_archived_feeds
                                                WHERE id = '$id' AND owner_uid = " . $_SESSION["uid"]);
                                        $orig_id = db_escape_string(db_fetch_result($result, 0, "id"));
+                                       $site_url = db_escape_string(db_fetch_result($result, 0, "site_url"));
                                }
        
                                $feed_url = db_escape_string(db_fetch_result($result, 0, "feed_url"));
@@ -46,8 +47,8 @@
                                                        VALUES ('".$_SESSION["uid"]."', '$feed_url', '$title', NULL)");
                                        } else if ($mode == 2) {
                                                $result = db_query($link,
-                                                       "INSERT INTO ttrss_feeds (id,owner_uid,feed_url,title,cat_id) 
-                                                       VALUES ('$orig_id','".$_SESSION["uid"]."', '$feed_url', '$title', NULL)");
+                                                       "INSERT INTO ttrss_feeds (id,owner_uid,feed_url,title,cat_id,site_url
+                                                       VALUES ('$orig_id','".$_SESSION["uid"]."', '$feed_url', '$title', NULL, '$site_url')");
                                        }
                                        array_push($subscribed, $title_orig);
                                }