- update_rss_feed($link, $line["id"], true);
-
- sleep(1); // prevent flood (FIXME make this an option?)
+ // For each feed, we call the feed update function.
+ foreach ($feeds_to_update as $feed) {
+ if($debug) _debug("Base feed: $feed");
+
+ //update_rss_feed($link, $line["id"], true);
+
+ // since we have the data cached, we can deal with other feeds with the same url
+
+ $tmp_result = db_query($link, "SELECT ttrss_feeds.feed_url,ttrss_feeds.id,last_updated
+ FROM ttrss_feeds, ttrss_users WHERE
+ ttrss_users.id = ttrss_feeds.owner_uid AND
+ feed_url = '".db_escape_string($link, $feed)."' AND
+ ttrss_feeds.update_interval != -1
+ $login_thresh_qpart
+ ORDER BY feed_url $query_limit");
+
+ if (db_num_rows($tmp_result) > 0) {
+ while ($tline = db_fetch_assoc($tmp_result)) {
+ if($debug) _debug(" => " . $tline["last_updated"] . ", " . $tline["id"]);
+ update_rss_feed($link, $tline["id"], true);
+ ++$nf;
+ }
+ }