From 3bc65aed3f62985b68b92975b1114d76cccc42f3 Mon Sep 17 00:00:00 2001 From: Benjamin Sonntag Date: Tue, 17 Jul 2018 17:28:14 +0200 Subject: [PATCH] [fix] substitute variables AFTER mysql queries in bind zone file --- bureau/class/m_bind.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bureau/class/m_bind.php b/bureau/class/m_bind.php index 12369ef9..b8b88d9a 100644 --- a/bureau/class/m_bind.php +++ b/bureau/class/m_bind.php @@ -72,6 +72,10 @@ class m_bind { // Prepare a new zonefile from a template $zone = file_get_contents($this->ZONE_TEMPLATE); + + // add the SUBDOMAIN entries + $zone .= $this->conf_from_db($domain); + // substitute ALTERNC & domain variables $zone = strtr($zone, array( "%%fqdn%%" => "$L_FQDN", @@ -91,9 +95,6 @@ class m_bind { "@@ZONETTL@@" => $ttl, )); - // add the SUBDOMAIN entries - $zone .= $this->conf_from_db($domain); - // add the "END ALTERNC CONF line"; $zone .= ";;; END ALTERNC AUTOGENERATE CONFIGURATION\n";