From 9f6036a68430aecf42d7e4e8a87770b0510da61b Mon Sep 17 00:00:00 2001 From: Will Budicm Date: Sat, 26 Dec 2020 08:49:58 +1100 Subject: [PATCH] Added pgsql support. --- htdocs/cgi-bin/login_ctr.cgi | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/cgi-bin/login_ctr.cgi b/htdocs/cgi-bin/login_ctr.cgi index 4b21c67..f30b72e 100755 --- a/htdocs/cgi-bin/login_ctr.cgi +++ b/htdocs/cgi-bin/login_ctr.cgi @@ -500,14 +500,15 @@ try{ sub createPageViewExcludeSQL { - my $days = 0; + my ($where,$days) = 0; my $parse = $PAGE_EXCLUDES; my @a = split('=',$parse); if(scalar(@a)==2){ $days = $a[0]; $parse = $a[1]; - } - my $where =qq(WHERE date >= date('now', '-$days day') OR); + } + if(Settings::isProgressDB()){$where = "WHERE a.date >= (timestamp 'now' - interval '$days days') OR"} + else{$where = "WHERE a.date >= date('now', '-$days day') OR"} @a = split(',',$parse); foreach (@a){ $where .= " ID_CAT!=$_ AND"; -- 2.34.1