- added $CONF['alias_domain'] switch to disable alias domains
(includes lots of whitespace changes in list-virtual.php)
functions.php:
- added some comments to boolconf()
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@419 a1433add-5e2c-0410-b055-b7f2511e0802
@ -73,18 +73,19 @@ if (!check_owner(authentication_get_username(), $fDomain)) {
}
# Alias-Domains
# first try to get a list of other domains pointing
# to this currently chosen one (aka. alias domains)
$query = "SELECT $table_alias_domain.alias_domain,$table_alias_domain.target_domain,$table_alias_domain.modified,$table_alias_domain.active FROM $table_alias_domain WHERE target_domain='$fDomain' ORDER BY $table_alias_domain.alias_domain LIMIT $fDisplay, $page_size";
if ('pgsql'==$CONF['database_type'])
{
if (boolconf('alias_domain')) {
# Alias-Domains
# first try to get a list of other domains pointing
# to this currently chosen one (aka. alias domains)
$query = "SELECT $table_alias_domain.alias_domain,$table_alias_domain.target_domain,$table_alias_domain.modified,$table_alias_domain.active FROM $table_alias_domain WHERE target_domain='$fDomain' ORDER BY $table_alias_domain.alias_domain LIMIT $fDisplay, $page_size";
if ('pgsql'==$CONF['database_type'])
{
$query = "SELECT alias_domain,target_domain,extract(epoch from modified) as modified,active FROM $table_alias_domain WHERE target_domain='$fDomain' ORDER BY alias_domain LIMIT $page_size OFFSET $fDisplay";
}
$result = db_query ($query);
$tAliasDomains = array();
if ($result['rows'] > 0)
{
}
$result = db_query ($query);
$tAliasDomains = array();
if ($result['rows'] > 0)
{
while ($row = db_array ($result['result']))
{
if ('pgsql'==$CONF['database_type'])
@ -94,17 +95,17 @@ if ($result['rows'] > 0)
}
$tAliasDomains[] = $row;
}
}
# now let's see if the current domain itself is an alias for another domain
$query = "SELECT $table_alias_domain.alias_domain,$table_alias_domain.target_domain,$table_alias_domain.modified,$table_alias_domain.active FROM $table_alias_domain WHERE alias_domain='$fDomain'";
if ('pgsql'==$CONF['database_type'])
{
}
# now let's see if the current domain itself is an alias for another domain
$query = "SELECT $table_alias_domain.alias_domain,$table_alias_domain.target_domain,$table_alias_domain.modified,$table_alias_domain.active FROM $table_alias_domain WHERE alias_domain='$fDomain'";
if ('pgsql'==$CONF['database_type'])
{
$query = "SELECT alias_domain,target_domain,extract(epoch from modified) as modified,active FROM $table_alias_domain WHERE alias_domain='$fDomain'";
}
$result = db_query ($query);
$tTargetDomain = "";
if ($result['rows'] > 0)
{
}
$result = db_query ($query);
$tTargetDomain = "";
if ($result['rows'] > 0)
{
if($row = db_array ($result['result']))
{
if ('pgsql'==$CONF['database_type'])
@ -114,9 +115,9 @@ if ($result['rows'] > 0)
}
$tTargetDomain = $row;
}
}
}
$query = "SELECT $table_alias.address,$table_alias.goto,$table_alias.modified,$table_alias.active FROM $table_alias LEFT JOIN $table_mailbox ON $table_alias.address=$table_mailbox.username WHERE $table_alias.domain='$fDomain' AND $table_mailbox.maildir IS NULL ORDER BY $table_alias.address LIMIT $fDisplay, $page_size";