set title to [Unknown] for newly added feeds, instead of blank string

This commit is contained in:
Andrew Dolgov 2005-12-20 10:57:01 +01:00
parent dd0e372803
commit 746b249f95
2 changed files with 4 additions and 3 deletions

View File

@ -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");

View File

@ -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'");