From: Andrew Dolgov Date: Mon, 19 Jan 2015 09:56:36 +0000 (+0300) Subject: af_psql_trgm: allow dupe checking within one feed X-Git-Tag: 16.3~380 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=97600ddd978e20dde613085ea03453ddd102b8fc;p=tt-rss.git af_psql_trgm: allow dupe checking within one feed --- diff --git a/plugins/af_psql_trgm/init.php b/plugins/af_psql_trgm/init.php index a1ee040e..95b78dec 100644 --- a/plugins/af_psql_trgm/init.php +++ b/plugins/af_psql_trgm/init.php @@ -80,9 +80,6 @@ class Af_Psql_Trgm extends Plugin { print_notice("PostgreSQL trigram extension returns string similarity as a floating point number (0-1). Setting it too low might produce false positives, zero disables checking."); - print "
"; - print_notice("Only data in other feeds is checked, i.e. sequential duplicate posts in one feed will not be detected by this plugin."); - print "
"; print_notice("Enable the plugin for specific feeds in the feed editor."); @@ -112,11 +109,6 @@ class Af_Psql_Trgm extends Plugin { print ""; } - //PluginHost::getInstance()->run_hooks(PluginHost::HOOK_PREFS_EDIT_FEED, - // "hook_prefs_edit_feed", $feed_id); - // PluginHost::getInstance()->run_hooks(PluginHost::HOOK_PREFS_SAVE_FEED, - // "hook_prefs_save_feed", $feed_id); - function hook_prefs_edit_feed($feed_id) { print "
".__("Similarity (pg_trgm)")."
"; print "
"; @@ -179,7 +171,6 @@ class Af_Psql_Trgm extends Plugin { $result = db_query("SELECT MAX(SIMILARITY(title, '$title_escaped')) AS ms FROM ttrss_entries, ttrss_user_entries WHERE ref_id = id AND date_entered >= NOW() - interval '1 day' AND - feed_id != $feed_id AND owner_uid = $owner_uid"); $similarity_result = db_fetch_result($result, 0, "ms");