diff --git a/functions.inc.php b/functions.inc.php index 16d5288d..fbde2fac 100644 --- a/functions.inc.php +++ b/functions.inc.php @@ -308,15 +308,16 @@ function check_domain($domain) * @param string $domain * @return string empty if the domain is valid, otherwise string with the errormessage */ -function check_localaliasonly($domain) { +function check_localaliasonly($domain) +{ // If emailcheck_localaliasonly is set to 'YES', disallow aliases to remote servers (but allow aliases on this server) if (Config::bool('emailcheck_localaliasonly')) { // get the domain part of the e-mail list(/*NULL*/, $domain) = explode('@', $domain); - + // get all domains managed on this system by postfixadmin $domains = list_domains(); - + // Only allow local domains to be alias destinations if (in_array($domain, $domains)) { return ''; @@ -325,9 +326,8 @@ function check_localaliasonly($domain) { return sprintf("You may only make aliases to domains hosted on this server. %s is a remote domain name.", htmlentities($domain)); } } else { - return ''; + return ''; } - } /** diff --git a/public/editactive.php b/public/editactive.php index 14194351..32f6981b 100644 --- a/public/editactive.php +++ b/public/editactive.php @@ -30,7 +30,9 @@ $id = safeget('id'); $table = safeget('table'); $field = safeget('field'); $active = safeget('active'); -if ($field === '') $field = 'active'; +if ($field === '') { + $field = 'active'; +} if (empty($table)) { die("Invalid table name given"); diff --git a/public/upgrade.php b/public/upgrade.php index e8c2cc0d..edc0a34c 100644 --- a/public/upgrade.php +++ b/public/upgrade.php @@ -2350,6 +2350,7 @@ function upgrade_1849_sqlite() "); } -function upgrade_1850() { +function upgrade_1850() +{ _db_add_field('mailbox', 'smtp_active', 'int DEFAULT 1'); }