summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2009-01-22 16:31:19 +0100
committerAndrew Dolgov <[email protected]>2009-01-22 16:31:19 +0100
commit9e97b64e48a03e14ed46961af8fe45585d908c3e (patch)
treec114e20b20250b8c8abca4f4c128e9477bcc3e2a /functions.php
parentee8091ba785c57caee2a1ebc12311b30d82d27f5 (diff)
update_all_feeds: remove function
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php59
1 files changed, 0 insertions, 59 deletions
diff --git a/functions.php b/functions.php
index 1b509f3b0..d920498c7 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 "<!-- 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");