mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2024-09-19 19:22:14 +02:00
create-domain.php: fix for bug 1831720
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@224 a1433add-5e2c-0410-b055-b7f2511e0802
This commit is contained in:
parent
f1321de6b4
commit
9af76e13e4
@ -52,10 +52,11 @@ if ($_SERVER['REQUEST_METHOD'] == "GET")
|
||||
if ($_SERVER['REQUEST_METHOD'] == "POST")
|
||||
{
|
||||
if (isset ($_POST['fDomain'])) $fDomain = escape_string ($_POST['fDomain']);
|
||||
foreach(array('fDescription' => '', 'fAliases' => '0', 'fMailboxes' => '0',
|
||||
'fMaxquota' => '0', 'fTransport' => 'virtual',
|
||||
'fDefaultaliases' => '0', 'fBackupmx' => '0') as $key => $default) {
|
||||
if(isset($_POST[$key]) && !empty($POST[$key])) {
|
||||
$form_fields = array('fDescription' => '', 'fAliases' => '0', 'fMailboxes' => '0',
|
||||
'fMaxquota' => '0', 'fTransport' => 'virtual', 'fDefaultaliases' => '0',
|
||||
'fBackupmx' => '0');
|
||||
foreach($form_fields as $key => $default) {
|
||||
if(isset($_POST[$key]) && (!empty($_POST[$key]))) {
|
||||
$$key = escape_string($_POST[$key]);
|
||||
}
|
||||
else {
|
||||
@ -63,6 +64,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (empty ($fDomain) or domain_exist ($fDomain) or !check_domain ($fDomain))
|
||||
{
|
||||
$error = 1;
|
||||
@ -77,7 +79,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST")
|
||||
if (domain_exist ($fDomain)) $pAdminCreate_domain_domain_text = $PALANG['pAdminCreate_domain_domain_text_error'];
|
||||
if (empty ($fDomain) or !check_domain ($fDomain)) $pAdminCreate_domain_domain_text = $PALANG['pAdminCreate_domain_domain_text_error2'];
|
||||
}
|
||||
|
||||
|
||||
if ($error != 1)
|
||||
{
|
||||
$tAliases = $CONF['aliases'];
|
||||
|
Loading…
Reference in New Issue
Block a user