summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-04-04 13:20:44 +0400
committerAndrew Dolgov <[email protected]>2013-04-04 13:20:44 +0400
commit5929a0c1e4a544718cd942afe27f9c832f87a2c0 (patch)
tree7302adbf36577d8dc60114c9e365e30ac54f1f28 /include
parentd0eef2a3b0569db718f43fd56ca11f85a93d64e9 (diff)
updater: prevent duplicate feed ids being scheduled for update
Diffstat (limited to 'include')
-rw-r--r--include/rssfuncs.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/rssfuncs.php b/include/rssfuncs.php
index ce197156c..727e42897 100644
--- a/include/rssfuncs.php
+++ b/include/rssfuncs.php
@@ -159,7 +159,7 @@
// 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
+ $tmp_result = db_query($link, "SELECT DISTINCT ttrss_feeds.id,last_updated
FROM ttrss_feeds, ttrss_users, ttrss_user_prefs WHERE
ttrss_user_prefs.owner_uid = ttrss_feeds.owner_uid AND
ttrss_users.id = ttrss_user_prefs.owner_uid AND
@@ -168,7 +168,7 @@
(ttrss_feeds.update_interval > 0 OR
ttrss_user_prefs.value != '-1')
$login_thresh_qpart
- ORDER BY feed_url $query_limit");
+ ORDER BY ttrss_feeds.id $query_limit");
if (db_num_rows($tmp_result) > 0) {
while ($tline = db_fetch_assoc($tmp_result)) {
@@ -286,7 +286,7 @@
$force_refetch = isset($_REQUEST["force_refetch"]);
$feed_data = fetch_file_contents($fetch_url, false,
- $auth_login, $auth_pass, false,
+ $auth_login, $auth_pass, false,
$no_cache ? FEED_FETCH_NO_CACHE_TIMEOUT : FEED_FETCH_TIMEOUT,
$force_refetch ? 0 : max($last_updated_timestamp, $cache_timestamp));