]> git.wh0rd.org Git - tt-rss.git/commitdiff
set title to [Unknown] for newly added feeds, instead of blank string
authorAndrew Dolgov <fox@madoka.spb.ru>
Tue, 20 Dec 2005 09:57:01 +0000 (10:57 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Tue, 20 Dec 2005 09:57:01 +0000 (10:57 +0100)
backend.php
functions.php

index 78760e5e708881289701e0d2ab0129f64a8f78c0..09972cbce75eaaf285637f0ca4c416deba5aa97f 100644 (file)
                                        
                                        $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");
index 78238a069e606cc662d1f10f5be59e4ef3713b5b..b54789fa2fb40996b3b70fbc84361efb897401e1 100644 (file)
                                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'");