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 = " diff --git a/VIRTUAL_VACATION/vacation.pl b/VIRTUAL_VACATION/vacation.pl index b7f929a3..06a787c0 100644 --- a/VIRTUAL_VACATION/vacation.pl +++ b/VIRTUAL_VACATION/vacation.pl @@ -117,7 +117,7 @@ use utf8; use DBI; use MIME::Base64 qw(encode_base64); -use Encode qw(encode); +use Encode qw(encode decode); use MIME::EncWords qw(:all); use Email::Valid; use strict; @@ -522,6 +522,7 @@ sub send_vacation_email { $logger->debug("Will send vacation response for $orig_messageid: FROM: $email (orig_to: $orig_to), TO: $orig_from; VACATION SUBJECT: $row[0] ; VACATION BODY: $row[1]"); my $subject = $row[0]; + $orig_subject = decode("mime-header", $orig_subject); $subject =~ s/\$SUBJECT/$orig_subject/g; if ($subject ne $row[0]) { $logger->debug("Patched Subject of vacation message to: $subject"); diff --git a/functions.inc.php b/functions.inc.php index b116951c..734e74d2 100644 --- a/functions.inc.php +++ b/functions.inc.php @@ -1250,7 +1250,7 @@ function db_connect ($ignore_errors = 0) { if ($link) { @mysql_query("SET CHARACTER SET utf8",$link); @mysql_query("SET COLLATION_CONNECTION='utf8_general_ci'",$link); - $succes = @mysql_select_db ($CONF['database_name'], $link) or $error_text .= ("
DEBUG INFORMATION:mkdir -p $incpath/templates_c and make it writeable by the web server\n";
+ $error =+ 1;
+ }
+ else {
+ print "