From: Andrew Dolgov Date: Thu, 22 Jan 2009 15:31:19 +0000 (+0100) Subject: update_all_feeds: remove function X-Git-Tag: git2svn-syncpoint-master~51 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=9e97b64e48a03e14ed46961af8fe45585d908c3e;p=tt-rss.git update_all_feeds: remove function --- diff --git a/functions.php b/functions.php index 1b509f3b..d920498c 100644 --- a/functions.php +++ b/functions.php @@ -346,65 +346,6 @@ } } - function update_all_feeds($link, $fetch, $user_id = false, $force_daemon = false) { - - if (WEB_DEMO_MODE) return; - - if (!$user_id) { - $user_id = $_SESSION["uid"]; - purge_old_posts($link); - } - -// db_query($link, "BEGIN"); - - if (MAX_UPDATE_TIME > 0) { - if (DB_TYPE == "mysql") { - $q_order = "RAND()"; - } else { - $q_order = "RANDOM()"; - } - } else { - $q_order = "last_updated DESC"; - } - - $result = db_query($link, "SELECT feed_url,id, - ".SUBSTRING_FOR_DATE."(last_updated,1,19) AS last_updated, - update_interval FROM ttrss_feeds WHERE owner_uid = '$user_id' - ORDER BY $q_order"); - - $upd_start = time(); - - while ($line = db_fetch_assoc($result)) { - $upd_intl = $line["update_interval"]; - - if (!$upd_intl || $upd_intl == 0) { - $upd_intl = get_pref($link, 'DEFAULT_UPDATE_INTERVAL', $user_id, false); - } - - if ($upd_intl < 0) { - // Updates for this feed are disabled - continue; - } - - if ($fetch || (!$line["last_updated"] || - time() - strtotime($line["last_updated"]) > ($upd_intl * 60))) { - -// print ""; - - update_rss_feed($link, $line["feed_url"], $line["id"], $force_daemon); - - $upd_elapsed = time() - $upd_start; - - if (MAX_UPDATE_TIME > 0 && $upd_elapsed > MAX_UPDATE_TIME) { - return; - } - } - } - -// db_query($link, "COMMIT"); - - } - function fetch_file_contents($url) { if (USE_CURL_FOR_ICONS) { $tmpfile = tempnam(TMP_DIRECTORY, "ttrss-tmp");