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:
MySQL Select Database: " . mysql_error () . "$DEBUG_TEXT"); + @mysql_select_db ($CONF['database_name'], $link) or $error_text .= ("

DEBUG INFORMATION:
MySQL Select Database: " . mysql_error () . "$DEBUG_TEXT"); } } else { $error_text .= "

DEBUG INFORMATION:
MySQL 3.x / 4.0 functions not available! (php5-mysql installed?)
database_type = 'mysql' in config.inc.php, are you using a different database? $DEBUG_TEXT"; @@ -1261,7 +1261,7 @@ function db_connect ($ignore_errors = 0) { if ($link) { @mysqli_query($link,"SET CHARACTER SET utf8"); @mysqli_query($link,"SET COLLATION_CONNECTION='utf8_general_ci'"); - $success = @mysqli_select_db ($link, $CONF['database_name']) or $error_text .= ("

DEBUG INFORMATION:
MySQLi Select Database: " . mysqli_error ($link) . "$DEBUG_TEXT"); + @mysqli_select_db ($link, $CONF['database_name']) or $error_text .= ("

DEBUG INFORMATION:
MySQLi Select Database: " . mysqli_error ($link) . "$DEBUG_TEXT"); } } else { $error_text .= "

DEBUG INFORMATION:
MySQL 4.1 functions not available! (php5-mysqli installed?)
database_type = 'mysqli' in config.inc.php, are you using a different database? $DEBUG_TEXT"; diff --git a/setup.php b/setup.php index da1fb5dc..e48a4662 100644 --- a/setup.php +++ b/setup.php @@ -152,10 +152,17 @@ else if (!is_writeable($incpath.'/templates_c')) { - print "

  • Error: Smarty template compile directory templates_c is not writable.
    \n"; - print "Please make it writable.
    \n"; - print "If you are using SELinux or AppArmor, you might need to adjust their setup to allow write access.
    \n"; - $error =+ 1; + if(!is_dir($incpath . '/templates_c')) { + print "
  • Error: Smarty template compile directory templates_c not found.
    \n"; + echo "Please mkdir -p $incpath/templates_c and make it writeable by the web server\n"; + $error =+ 1; + } + else { + print "
  • Error: Smarty template compile directory templates_c is not writable.
    \n"; + print "Please make it writable.
    \n"; + print "If you are using SELinux or AppArmor, you might need to adjust their setup to allow write access.
    \n"; + $error =+ 1; + } } else { print "
  • Smarty template compile directory is writable - OK
    \n"; }