From b0723045b44a58df632e13e67511f389c61def4b Mon Sep 17 00:00:00 2001 From: David Goodwin Date: Sat, 11 Apr 2009 20:44:46 +0000 Subject: [PATCH] AliasHandler: fix undefined varaible (domain - line 157) git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@624 a1433add-5e2c-0410-b055-b7f2511e0802 --- model/AliasHandler.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/model/AliasHandler.php b/model/AliasHandler.php index 38815c20..7456ba74 100644 --- a/model/AliasHandler.php +++ b/model/AliasHandler.php @@ -97,6 +97,8 @@ class AliasHandler { $addresses = array_unique($addresses); $original = $this->get(true); + $tmp = preg_split('/@/', $username); + $domain = $tmp[1]; foreach($original as $address) { if($vacation_persist) { @@ -143,8 +145,6 @@ class AliasHandler { } if($this->hasAliasRecord() == false) { $true = db_get_boolean(True); - $tmp = preg_split('/@/', $username); - $domain = $tmp[1]; $sql = "INSERT INTO $table_alias (address, goto, domain, created, modified, active) VALUES ('$username', '$goto', '$domain', NOW(), NOW(), $true)"; } else {