mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2026-11-20 23:43:26 +03:00
Merge remote-tracking branch 'svnexport/master'
This commit is contained in:
commit
b2504c70f7
4 files changed
+17
-9
No files matched your search
@@ -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 = "
|
||||
|
||||
@@ -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");
|
||||
|
||||
+2
-2
@@ -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 .= ("<p />DEBUG INFORMATION:<br />MySQL Select Database: " . mysql_error () . "$DEBUG_TEXT");
|
||||
@mysql_select_db ($CONF['database_name'], $link) or $error_text .= ("<p />DEBUG INFORMATION:<br />MySQL Select Database: " . mysql_error () . "$DEBUG_TEXT");
|
||||
}
|
||||
} else {
|
||||
$error_text .= "<p />DEBUG INFORMATION:<br />MySQL 3.x / 4.0 functions not available! (php5-mysql installed?)<br />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 .= ("<p />DEBUG INFORMATION:<br />MySQLi Select Database: " . mysqli_error ($link) . "$DEBUG_TEXT");
|
||||
@mysqli_select_db ($link, $CONF['database_name']) or $error_text .= ("<p />DEBUG INFORMATION:<br />MySQLi Select Database: " . mysqli_error ($link) . "$DEBUG_TEXT");
|
||||
}
|
||||
} else {
|
||||
$error_text .= "<p />DEBUG INFORMATION:<br />MySQL 4.1 functions not available! (php5-mysqli installed?)<br />database_type = 'mysqli' in config.inc.php, are you using a different database? $DEBUG_TEXT";
|
||||
|
||||
@@ -152,10 +152,17 @@ else
|
||||
|
||||
if (!is_writeable($incpath.'/templates_c'))
|
||||
{
|
||||
print "<li><b>Error: Smarty template compile directory templates_c is not writable.</b><br />\n";
|
||||
print "<b>Please make it writable.</b><br />\n";
|
||||
print "<b>If you are using SELinux or AppArmor, you might need to adjust their setup to allow write access.</b><br />\n";
|
||||
$error =+ 1;
|
||||
if(!is_dir($incpath . '/templates_c')) {
|
||||
print "<li><b>Error: Smarty template compile directory templates_c not found.</b><br />\n";
|
||||
echo "<b>Please <code>mkdir -p $incpath/templates_c</code> and make it writeable by the web server</b>\n";
|
||||
$error =+ 1;
|
||||
}
|
||||
else {
|
||||
print "<li><b>Error: Smarty template compile directory templates_c is not writable.</b><br />\n";
|
||||
print "<b>Please make it writable.</b><br />\n";
|
||||
print "<b>If you are using SELinux or AppArmor, you might need to adjust their setup to allow write access.</b><br />\n";
|
||||
$error =+ 1;
|
||||
}
|
||||
} else {
|
||||
print "<li>Smarty template compile directory is writable - OK<br />\n";
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user