0
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2024-09-19 19:22:14 +02:00

code formatting fix

This commit is contained in:
David Goodwin 2024-01-11 08:57:27 +00:00
parent 85e92f4012
commit 45557a6ed4
3 changed files with 10 additions and 7 deletions

View File

@ -308,15 +308,16 @@ function check_domain($domain)
* @param string $domain * @param string $domain
* @return string empty if the domain is valid, otherwise string with the errormessage * @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 emailcheck_localaliasonly is set to 'YES', disallow aliases to remote servers (but allow aliases on this server)
if (Config::bool('emailcheck_localaliasonly')) { if (Config::bool('emailcheck_localaliasonly')) {
// get the domain part of the e-mail // get the domain part of the e-mail
list(/*NULL*/, $domain) = explode('@', $domain); list(/*NULL*/, $domain) = explode('@', $domain);
// get all domains managed on this system by postfixadmin // get all domains managed on this system by postfixadmin
$domains = list_domains(); $domains = list_domains();
// Only allow local domains to be alias destinations // Only allow local domains to be alias destinations
if (in_array($domain, $domains)) { if (in_array($domain, $domains)) {
return ''; 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)); return sprintf("You may only make aliases to domains hosted on this server. %s is a remote domain name.", htmlentities($domain));
} }
} else { } else {
return ''; return '';
} }
} }
/** /**

View File

@ -30,7 +30,9 @@ $id = safeget('id');
$table = safeget('table'); $table = safeget('table');
$field = safeget('field'); $field = safeget('field');
$active = safeget('active'); $active = safeget('active');
if ($field === '') $field = 'active'; if ($field === '') {
$field = 'active';
}
if (empty($table)) { if (empty($table)) {
die("Invalid table name given"); die("Invalid table name given");

View File

@ -2350,6 +2350,7 @@ function upgrade_1849_sqlite()
"); ");
} }
function upgrade_1850() { function upgrade_1850()
{
_db_add_field('mailbox', 'smtp_active', 'int DEFAULT 1'); _db_add_field('mailbox', 'smtp_active', 'int DEFAULT 1');
} }