From 1dbe646724d01d91d76b6a1236d50c51e60e912c Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Mon, 13 May 2019 16:39:16 -0400 Subject: [PATCH 1/2] Filter generated bind configuration by current domain Fixes #339 --- bureau/class/m_bind.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bureau/class/m_bind.php b/bureau/class/m_bind.php index 7c903a47..6ffcb9e1 100644 --- a/bureau/class/m_bind.php +++ b/bureau/class/m_bind.php @@ -226,7 +226,8 @@ class m_bind { sd.type=dt.name AND sd.enable IN ('ENABLE', 'ENABLED') AND sd.web_action NOT IN ('DELETE') - ORDER BY ENTRY ;"); + AND sd.domaine = ? + ORDER BY ENTRY ;", array($domain)); $t=""; while ($db->next_record()) { $t.= $db->f('ENTRY')."\n"; From 753c27a9cf8eaaf5af29b2541e225fe3b3514ee2 Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Mon, 13 May 2019 17:12:05 -0400 Subject: [PATCH 2/2] Fix typo in query to update domain type Fixes #339 --- bureau/class/m_dom.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bureau/class/m_dom.php b/bureau/class/m_dom.php index 7d94e238..a484fa0c 100644 --- a/bureau/class/m_dom.php +++ b/bureau/class/m_dom.php @@ -560,7 +560,7 @@ class m_dom { $has_https_option = intval($has_https_option); $create_tmpdir = intval($create_tmpdir); $create_targetdir = intval($create_targetdir); - $db->query("UPDATE domaines_type SET description= ?, target= ?, entry= ?, compatibility= ?, enable= e, need_dns= ?, only_dns= ?, advanced= ?,create_tmpdir= ?,create_targetdir= ?, has_https_option=? where name= ?;", array($description, $target, $entry, $compatibility, $enable, $need_dns, $only_dns, $advanced, $create_tmpdir, $create_targetdir, $has_https_option, $name)); + $db->query("UPDATE domaines_type SET description= ?, target= ?, entry= ?, compatibility= ?, enable= ?, need_dns= ?, only_dns= ?, advanced= ?,create_tmpdir= ?,create_targetdir= ?, has_https_option=? where name= ?;", array($description, $target, $entry, $compatibility, $enable, $need_dns, $only_dns, $advanced, $create_tmpdir, $create_targetdir, $has_https_option, $name)); return true; }