]> git.wh0rd.org Git - tt-rss.git/commitdiff
catchup feed on first update after adding
authorAndrew Dolgov <fox@bah.spb.su>
Thu, 22 Jan 2009 07:40:16 +0000 (08:40 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Thu, 22 Jan 2009 07:40:16 +0000 (08:40 +0100)
functions.php

index e7e7d8ca54acac7447927e2e936f9e5aef366506..ef0fc4e6c4322330b79af5114511e69c950bf74b 100644 (file)
                } else {
 
                        $result = db_query($link, "SELECT id,update_interval,auth_login,
-                               auth_pass,cache_images,update_method,hidden
+                               auth_pass,cache_images,update_method,hidden,last_updated
                                FROM ttrss_feeds WHERE id = '$feed'");
 
                }
 
                $hidden = sql_bool_to_bool(db_fetch_result($result, 0, "hidden"));
                $update_method = db_fetch_result($result, 0, "update_method");
+               $last_updated = db_fetch_result($result, 0, "last_updated");
 
                db_query($link, "UPDATE ttrss_feeds SET last_update_started = NOW()
                        WHERE id = '$feed'");
                                }
                        } 
 
+                       if (!$last_updated) {
+                               if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
+                                       _debug("update_rss_feed: new feed, catching it up...");
+                               }
+                               catchup_feed($link, $feed, false);
+                       }
+
                        if (!$hidden) {
                                if (defined('DAEMON_EXTENDED_DEBUG') || $_GET['xdebug']) {
                                        _debug("update_rss_feed: updating counters cache...");