]> git.wh0rd.org Git - tt-rss.git/commitdiff
update_all_feeds: remove function
authorAndrew Dolgov <fox@bah.spb.su>
Thu, 22 Jan 2009 15:31:19 +0000 (16:31 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Thu, 22 Jan 2009 15:31:19 +0000 (16:31 +0100)
functions.php

index 1b509f3b04d309dc9ddd1ae9510bdf80d101a3a5..d920498c7e5f21f8bf38bde8443a576ff42a3b23 100644 (file)
                }
        }
 
-       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 "<!-- feed: ".$line["feed_url"]." -->";
-
-                               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");