From: Andrew Dolgov Date: Tue, 20 Dec 2005 09:57:01 +0000 (+0100) Subject: set title to [Unknown] for newly added feeds, instead of blank string X-Git-Tag: schema_freeze_for_1.1.1~18 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=746b249f9515dd2fa55a99f292e25fa6be69029b;p=tt-rss.git set title to [Unknown] for newly added feeds, instead of blank string --- 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'");