summaryrefslogtreecommitdiff
path: root/classes/rssutils.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-12-06 19:37:20 +0300
committerAndrew Dolgov <[email protected]>2018-12-06 19:37:20 +0300
commit3e4326e34dcb4a9eb922c6d212fd05a58a11b124 (patch)
treee6f8f52053e19cf9cc3f5fa46082276b6ee609c4 /classes/rssutils.php
parenta01c33d65409d8313221b981152ec627b8f8f3f1 (diff)
add ttrss_filters2.last_triggered (bump schema version)
Diffstat (limited to 'classes/rssutils.php')
-rwxr-xr-xclasses/rssutils.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/classes/rssutils.php b/classes/rssutils.php
index 923e98c82..b43e752da 100755
--- a/classes/rssutils.php
+++ b/classes/rssutils.php
@@ -781,6 +781,12 @@ class RSSUtils {
$plugin->hook_filter_triggered($feed, $owner_uid, $article, $matched_filters, $matched_rules, $article_filters);
}
+ $matched_filter_ids = implode(",", array_map(function($f) { return $f['id']; }, $matched_filters));
+
+ $fsth = $pdo->prepare("UPDATE ttrss_filters2 SET last_triggered = NOW() WHERE
+ id IN (?) AND owner_uid = ?");
+ $fsth->execute([$matched_filter_ids, $owner_uid]);
+
if (Debug::get_loglevel() >= Debug::$LOG_EXTENDED) {
Debug::log("matched filters: ", Debug::$LOG_VERBOSE);