From c5b6db810fbcf4b486ae4fbaaa0bd94ab7095fae Mon Sep 17 00:00:00 2001 From: Gregory Colpart Date: Sun, 20 Aug 2017 04:41:44 +0200 Subject: [PATCH] introduce bindadmin var to know if we need deal with DNS stuff --- conf/config.php | 1 + inc/accounts.php | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/conf/config.php b/conf/config.php index 03194bd..e2658da 100644 --- a/conf/config.php +++ b/conf/config.php @@ -26,6 +26,7 @@ $oriconf['servers'] = array('servers'); $oriconf['cache'] = '/home/evoadmin/www/cache.sqlite'; $oriconf['known_host'] = '/home/evoadmin/www/known_host'; $oriconf['ftpadmin'] = FALSE; +$oriconf['bindadmin'] = FALSE; $oriconf['noreplication'] = array('srv00.example.com', 'srv01.example.com', 'srv02.example.com'); $oriconf['postponedreplication'] = array('srv00.example.com', 'srv01.example.com', 'srv02.example.com'); diff --git a/inc/accounts.php b/inc/accounts.php index fdea281..232d9ab 100644 --- a/inc/accounts.php +++ b/inc/accounts.php @@ -173,6 +173,7 @@ function web_add_cluster($form, $admin_mail) { $slave, ($realtime ? 'realtime': 'deferred')); + //if ($conf['bindadmin']) domain_add($form->getField('domain')->getValue(), gethostbyname($master), true, $form->getField('use_gmail_mxs')->getValue()); sudoexec($exec_cmd, $exec_output, $exec_return); @@ -199,6 +200,7 @@ function web_add_cluster($form, $admin_mail) { $account['name'] = $form->getField('username')->getValue(); $account['domain'] = $form->getField('domain')->getValue(); + //if ($conf['bindadmin']) if ($form->getField('use_gmail_mxs')->getValue()) $account['mail'] = 'gmail'; else @@ -332,8 +334,10 @@ if ($conf['cluster']) { $form->addField('cluster_mode', new SelectFormField('Mode de réplication', FALSE, $choices)); } -/* Quai13 specific: allow to switch between Gmail MX/Quai13 MX */ -$form->addField('use_gmail_mxs', new CheckboxInputFormField("Utilisation des serveurs Gmail en MX ?", FALSE)); +if ($conf['bindadmin']) { + /* Quai13 specific: allow to switch between Gmail MX/Quai13 MX */ + $form->addField('use_gmail_mxs', new CheckboxInputFormField("Utilisation des serveurs Gmail en MX ?", FALSE)); +} /* Traitement du formulaire */ if(!empty($_POST)) {