From 746b249f9515dd2fa55a99f292e25fa6be69029b Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 20 Dec 2005 10:57:01 +0100 Subject: [PATCH] set title to [Unknown] for newly added feeds, instead of blank string --- backend.php | 5 +++-- functions.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/backend.php b/backend.php index 78760e5e..09972cbc 100644 --- a/backend.php +++ b/backend.php @@ -1658,10 +1658,11 @@ $result = db_query($link, "INSERT INTO ttrss_feeds (owner_uid,feed_url,title,cat_id) - VALUES ('".$_SESSION["uid"]."', '$feed_link', '', $cat_qpart)"); + VALUES ('".$_SESSION["uid"]."', '$feed_link', + '[Unknown]', $cat_qpart)"); $result = db_query($link, - "SELECT id FROM ttrss_feeds WHERE feed_url = '$feed_link' + "SELECT id FROM ttrss_feeds WHERE feed_url = '$feed_link' AND owner_uid = " . $_SESSION["uid"]); $feed_id = db_fetch_result($result, 0, "id"); diff --git a/functions.php b/functions.php index 78238a06..b54789fa 100644 --- a/functions.php +++ b/functions.php @@ -216,7 +216,7 @@ check_feed_favicon($feed_url, $feed, $link); } - if (!$registered_title) { + if (!$registered_title || $registered_title == "[Unknown]") { $feed_title = db_escape_string($rss->channel["title"]); db_query($link, "UPDATE ttrss_feeds SET title = '$feed_title' WHERE id = '$feed'"); -- 2.39.5