Skip to content

Commit

Permalink
code formatting fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidGoodwin committed Jan 11, 2024
1 parent 85e92f4 commit 45557a6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
10 changes: 5 additions & 5 deletions functions.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 '';
Expand All @@ -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 '';
}

}

/**
Expand Down
4 changes: 3 additions & 1 deletion public/editactive.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
$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");
Expand Down
3 changes: 2 additions & 1 deletion public/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2350,6 +2350,7 @@ function upgrade_1849_sqlite()
");
}

function upgrade_1850() {
function upgrade_1850()
{
_db_add_field('mailbox', 'smtp_active', 'int DEFAULT 1');
}

0 comments on commit 45557a6

Please sign in to comment.