]> git.wh0rd.org Git - tt-rss.git/commitdiff
purge_feed: remove obsolete postgresql queries
authorAndrew Dolgov <noreply@fakecake.org>
Thu, 6 Aug 2015 16:28:58 +0000 (19:28 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Thu, 6 Aug 2015 16:28:58 +0000 (19:28 +0300)
include/functions.php

index de48744acb1b0499b2398980b2dc8abedf44894d..d90855ea6bd275acd90e8a0427ece00233e2a674 100644 (file)
                if (!$purge_unread) $query_limit = " unread = false AND ";
 
                if (DB_TYPE == "pgsql") {
-                       $pg_version = get_pgsql_version();
-
-                       if (preg_match("/^7\./", $pg_version) || preg_match("/^8\.0/", $pg_version)) {
-
-                               $result = db_query("DELETE FROM ttrss_user_entries WHERE
-                                       ttrss_entries.id = ref_id AND
-                                       marked = false AND
-                                       feed_id = '$feed_id' AND
-                                       $query_limit
-                                       ttrss_entries.date_updated < NOW() - INTERVAL '$purge_interval days'");
-
-                       } else {
-
-                               $result = db_query("DELETE FROM ttrss_user_entries
-                                       USING ttrss_entries
-                                       WHERE ttrss_entries.id = ref_id AND
-                                       marked = false AND
-                                       feed_id = '$feed_id' AND
-                                       $query_limit
-                                       ttrss_entries.date_updated < NOW() - INTERVAL '$purge_interval days'");
-                       }
+                       $result = db_query("DELETE FROM ttrss_user_entries
+                               USING ttrss_entries
+                               WHERE ttrss_entries.id = ref_id AND
+                               marked = false AND
+                               feed_id = '$feed_id' AND
+                               $query_limit
+                               ttrss_entries.date_updated < NOW() - INTERVAL '$purge_interval days'");
 
                } else {