]> git.wh0rd.org - tt-rss.git/commitdiff
remove option ALLOW_DUPLICATE_POSTS as confusing/useless
authorAndrew Dolgov <noreply@fakecake.org>
Thu, 7 Jan 2016 19:01:35 +0000 (22:01 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Thu, 7 Jan 2016 19:01:35 +0000 (22:01 +0300)
classes/pref/prefs.php
include/rssfuncs.php

index 9cbc425c6115d299efb9d8463744816831311e41..b78aa4d62331bdae364fb85809cf0a5b60f9bbf2 100644 (file)
@@ -164,7 +164,7 @@ class Pref_Prefs extends Handler_Protected {
 
                global $access_level_names;
 
-               $prefs_blacklist = array("STRIP_UNSAFE_TAGS", "REVERSE_HEADLINES",
+               $prefs_blacklist = array("ALLOW_DUPLICATE_POSTS", "STRIP_UNSAFE_TAGS", "REVERSE_HEADLINES",
                        "SORT_HEADLINES_BY_FEED_DATE", "DEFAULT_ARTICLE_LIMIT",
                        "FEEDS_SORT_BY_UNREAD");
 
index cd82481b6803ac30c31033f629dc595b921cf2fa..ad956cd2a587e073cc2289ff3990415e11f9ab72 100755 (executable)
                                        db_query("UPDATE ttrss_entries SET date_updated = NOW()
                                                WHERE id = '$base_entry_id'");
 
-                    // if we allow duplicate posts, we have to continue to
-                    // create the user entries for this feed (if needed)
-                    if (get_pref("ALLOW_DUPLICATE_POSTS", $owner_uid, false)) {
-
-                                               $query = "SELECT int_id FROM ttrss_user_entries WHERE
-                                                       ref_id = '$base_entry_id' AND owner_uid = '$owner_uid'
-                                                       AND (feed_id = '$feed' OR feed_id IS NULL) LIMIT 1";
-
-                                               $result = db_query($query);
-
-                                               if (db_num_rows($result) == 0) {
-                                                       _debug("allow duplicate posts is enabled and user record is not found, continuing.");
-                                               } else {
-                                                       continue;
-                                               }
-
-                                       } else {
-                                               continue;
-                                       }
+                                       continue;
                                }
 
                                _debug("hash differs, applying plugin filters:", $debug_enabled);
 
                                        // check for user post link to main table
 
-                                       // do we allow duplicate posts with same GUID in different feeds?
-                                       if (get_pref("ALLOW_DUPLICATE_POSTS", $owner_uid, false)) {
-                                               $dupcheck_qpart = "AND (feed_id = '$feed' OR feed_id IS NULL)";
-                                       } else {
-                                               $dupcheck_qpart = "";
-                                       }
-
                                        $query = "SELECT ref_id, int_id FROM ttrss_user_entries WHERE
-                                                       ref_id = '$ref_id' AND owner_uid = '$owner_uid'
-                                                       $dupcheck_qpart";
+                                                       ref_id = '$ref_id' AND owner_uid = '$owner_uid'";
 
 //                                     if ($_REQUEST["xdebug"]) print "$query\n";