]> lifelog.hopto.org Git - LifeLog.git/commitdiff
Added pgsql support.
authorWill Budicm <redacted>
Fri, 25 Dec 2020 21:49:58 +0000 (08:49 +1100)
committerWill Budicm <redacted>
Fri, 25 Dec 2020 21:49:58 +0000 (08:49 +1100)
htdocs/cgi-bin/login_ctr.cgi

index 4b21c67783ac4b94f9361fa6fc7f1c314bcabf2d..f30b72e549488f9b3f074bc9a60a1979e9f5962e 100755 (executable)
@@ -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";