From 63f20c28daed5995f35cda5ca4cd2c011b3db22c Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Sun, 13 Nov 2011 16:19:53 +0000 Subject: [PATCH] AliasdomainHandler.php - initStruct(): - if only one alias_domain available, filter it out from target_domain list git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1271 a1433add-5e2c-0410-b055-b7f2511e0802 --- model/AliasdomainHandler.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/model/AliasdomainHandler.php b/model/AliasdomainHandler.php index 9a8492e7..9f23ee18 100644 --- a/model/AliasdomainHandler.php +++ b/model/AliasdomainHandler.php @@ -45,6 +45,11 @@ class AliasdomainHandler extends PFAHandler { if (isset($used_targets[$dom])) unset ($this->struct['alias_domain']['options'][$dom]); # don't allow chained domain aliases (domain1 -> domain2 -> domain3) } + if (count($this->struct['alias_domain']['options']) == 1) { # only one alias_domain available - filter it out from target_domain list + $keys = array_keys($this->struct['alias_domain']['options']); + unset ($this->struct['target_domain']['options'][$keys[0]]); + } + # TODO: hook to modify $this->struct }