Commit 748e1df1 authored by Sebastian Reichel's avatar Sebastian Reichel

Imported Upstream version 1.7.2+dfsg

parent 374f9fce
......@@ -1414,7 +1414,8 @@
FROM ttrss_labels2 LEFT JOIN ttrss_user_labels2 ON
(ttrss_labels2.id = label_id)
LEFT JOIN ttrss_user_entries ON (ref_id = article_id AND unread = true)
WHERE ttrss_labels2.owner_uid = $owner_uid GROUP BY ttrss_labels2.id");
WHERE ttrss_labels2.owner_uid = $owner_uid GROUP BY ttrss_labels2.id,
ttrss_labels2.caption");
while ($line = db_fetch_assoc($result)) {
......
......@@ -158,38 +158,6 @@
// Send feed digests by email if needed.
send_headlines_digests($link, $debug);
// Purge feeds with stale data OR not being updated for a while to keep DB size down
if ($debug) _debug("Purging inactive feeds...");
if (DB_TYPE == "pgsql") {
$interval_qpart = "NOW() - INTERVAL '1 month'";
} else {
$interval_qpart = "DATE_SUB(NOW(), INTERVAL 1 MONTH)";
}
$result = db_query($link, "SELECT id, feed_url FROM ttrss_feeds WHERE
(SELECT MAX(updated) FROM ttrss_entries, ttrss_user_entries WHERE
ttrss_entries.id = ref_id AND
ttrss_user_entries.feed_id = ttrss_feeds.id) < $interval_qpart OR
last_updated < $interval_qpart");
$feeds_purged = 0;
$articles_removed = 0;
while ($line = db_fetch_assoc($result)) {
$articles_removed += purge_feed($link, $line["id"], 0, false);
db_query($link, "UPDATE ttrss_feeds SET last_updated = NOW() WHERE
id = " . $line["id"]);
++$feeds_purged;
}
if ($debug && $articles_removed > 0)
_debug(sprintf("Purged %d feeds (%d articles).", $feeds_purged,
$articles_removed));
} // function update_daemon_common
// ignore_daemon is not used
......@@ -270,8 +238,10 @@
_debug("update_rss_feed: unable to fetch: $fetch_last_error");
}
$error_escaped = db_escape_string($fetch_last_error);
db_query($link,
"UPDATE ttrss_feeds SET last_error = '$fetch_last_error',
"UPDATE ttrss_feeds SET last_error = '$error_escaped',
last_updated = NOW() WHERE id = '$feed'");
return;
......
<?php
define('VERSION', "1.7.1");
define('VERSION', "1.7.2");
?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment