From 483bb83edc510a98d8387d7652df28f08c98cf3a Mon Sep 17 00:00:00 2001 From: David Goodwin Date: Wed, 10 Aug 2016 10:54:53 +0000 Subject: [PATCH] see #377 - looks like the pg+mysql check is partly the wrong way around - mysql only has ints.... git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1856 a1433add-5e2c-0410-b055-b7f2511e0802 --- ADDITIONS/fetchmail.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ADDITIONS/fetchmail.pl b/ADDITIONS/fetchmail.pl index 5986d2b7..f68c4aa1 100644 --- a/ADDITIONS/fetchmail.pl +++ b/ADDITIONS/fetchmail.pl @@ -81,9 +81,9 @@ $lockmgr->lock($lock_file) || log_and_die "can't lock ${lock_file}"; $dbh = DBI->connect($dsn, $db_username, $db_password) || log_and_die "cannot connect the database"; if($db_type eq "Pg") { - $sql_cond = "active = 1 AND date_part('epoch',now())-date_part('epoch',date)"; + $sql_cond = "active = 't' AND date_part('epoch',now())-date_part('epoch',date)"; } elsif($db_type eq "mysql") { - $sql_cond = "active = 't' AND unix_timestamp(now())-unix_timestamp(date)"; + $sql_cond = "active = 1 AND unix_timestamp(now())-unix_timestamp(date)"; } $sql = "