From 4703094553165710eeb19d0cccf4fa7e368fca43 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 11 Jan 2010 15:44:44 +0300 Subject: [PATCH] feed browser: save site_url when resubscribing to archived feed --- modules/pref-feeds.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/pref-feeds.php b/modules/pref-feeds.php index a3f1a472..0794bc62 100644 --- a/modules/pref-feeds.php +++ b/modules/pref-feeds.php @@ -26,9 +26,10 @@ $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); } -- 2.39.5