From 9b70409b4d6b2e6642260340c251db4ea6ab0542 Mon Sep 17 00:00:00 2001 From: Alan Garcia Date: Fri, 31 Jan 2014 13:51:28 +0000 Subject: [PATCH] Un poil plus de cache sur la generation de conf bind en PHP --- src/generate_bind_conf.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/generate_bind_conf.php b/src/generate_bind_conf.php index acee7d83..df9de632 100755 --- a/src/generate_bind_conf.php +++ b/src/generate_bind_conf.php @@ -158,9 +158,10 @@ class m_bind_regenerate { function reload_named() { $new_named_conf="// DO NOT EDIT\n// This file is generated by Alternc.\n// Every changes you'll make will be overwrited.\n"; + $tpl=file_get_contents($this->NAMED_TEMPLATE); foreach ($this->get_domain_summary() as $domain => $ds ) { if ( ! $ds['gesdns'] ) continue; - $new_named_conf.=strtr(file_get_contents($this->NAMED_TEMPLATE), array("@@DOMAINE@@"=>$domain, "@@ZONE_FILE@@"=>$this->get_zone_file_uri($domain))); + $new_named_conf.=strtr($tpl, array("@@DOMAINE@@"=>$domain, "@@ZONE_FILE@@"=>$this->get_zone_file_uri($domain))); } $old_named_conf = @file_get_contents($this->NAMED_CONF);