SF.net SVN: postfixadmin:[709] branches/postfixadmin-smarty
Brought to you by:
christian_boltz,
gingerdog
From: <Seb...@us...> - 2009-08-21 07:50:37
|
Revision: 709 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=709&view=rev Author: Sebastian2009 Date: 2009-08-21 07:50:25 +0000 (Fri, 21 Aug 2009) Log Message: ----------- - get in sync with mainline. Modified Paths: -------------- branches/postfixadmin-smarty/VIRTUAL_VACATION/vacation.pl branches/postfixadmin-smarty/create-domain.php branches/postfixadmin-smarty/edit-vacation.php Modified: branches/postfixadmin-smarty/VIRTUAL_VACATION/vacation.pl =================================================================== --- branches/postfixadmin-smarty/VIRTUAL_VACATION/vacation.pl 2009-08-20 07:09:41 UTC (rev 708) +++ branches/postfixadmin-smarty/VIRTUAL_VACATION/vacation.pl 2009-08-21 07:50:25 UTC (rev 709) @@ -324,16 +324,19 @@ my $rv = $stm->rows; # Recipient has vacation - if ($rv == 1) { - $realemail = $email; - $logger->debug("Found '\$email'\ has vacation active"); - } else { - $logger->debug("Looking for alias records that \'$email\' resolves to with vacation turned on"); - $query = qq{SELECT goto FROM alias WHERE address=? AND (goto LIKE ? OR goto LIKE % OR goto LIKE ?)}; - $stm = $dbh->prepare($query) or panic_prepare($query); - $stm->execute($email,"$email,%","%,$email","%,$email,%") or panic_execute($query,"address='$email'"); - $rv = $stm->rows; + if ($rv == 1) { + $realemail = $email; + $logger->debug("Found '\$email'\ has vacation active"); + } else { + my $vemail = $email; + $vemail =~ s/\@/#/g; + $logger->debug("Looking for alias records that \'$email\' resolves to with vacation turned on"); + $query = qq{SELECT goto FROM alias WHERE address=? AND (goto LIKE ? OR goto LIKE ? OR goto LIKE ?)}; + $stm = $dbh->prepare($query) or panic_prepare($query); + $stm->execute($email,"$email,%","%,$email","%,$email,%") or panic_execute($query,"address='$email'"); + $rv = $stm->rows; + # Recipient is an alias, check if mailbox has vacation if ($rv == 1) { my @row = $stm->fetchrow_array; Modified: branches/postfixadmin-smarty/create-domain.php =================================================================== --- branches/postfixadmin-smarty/create-domain.php 2009-08-20 07:09:41 UTC (rev 708) +++ branches/postfixadmin-smarty/create-domain.php 2009-08-21 07:50:25 UTC (rev 709) @@ -117,7 +117,7 @@ $sqlBackupmx = db_get_boolean(false); } - $sql_query = "INSERT INTO $table_domain (domain,description,aliases,mailboxes,maxquota,transport,backupmx,created,modified) VALUES ('$fDomain','$fDescription',$fAliases,$fMailboxes,$fMaxquota,'$fTransport',$sqlBackupmx,NOW(),NOW())"; + $sql_query = "INSERT INTO $table_domain (domain,description,aliases,mailboxes,maxquota,transport,backupmx,created,modified) VALUES ('$fDomain','$fDescription',$fAliases,$fMailboxes,$fMaxquota,'$fTransport','$sqlBackupmx',NOW(),NOW())"; $result = db_query($sql_query); if ($result['rows'] != 1) { Modified: branches/postfixadmin-smarty/edit-vacation.php =================================================================== --- branches/postfixadmin-smarty/edit-vacation.php 2009-08-20 07:09:41 UTC (rev 708) +++ branches/postfixadmin-smarty/edit-vacation.php 2009-08-21 07:50:25 UTC (rev 709) @@ -122,7 +122,7 @@ { $db_false = db_get_boolean(false); // retain vacation message if possible - i.e disable vacation away-ness. - $result = db_query ("UPDATE $table_vacation SET active = $db_false WHERE email='$fUsername'"); + $result = db_query ("UPDATE $table_vacation SET active = '$db_false' WHERE email='$fUsername'"); $result = db_query("DELETE FROM $table_vacation_notification WHERE on_vacation='$fUsername'"); $result = db_query ("SELECT * FROM $table_alias WHERE address='$fUsername'"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |