Un poil plus de cache sur la generation de conf bind en PHP

This commit is contained in:
Alan Garcia 2014-01-31 13:51:28 +00:00
parent 192702f772
commit 9b70409b4d
1 changed files with 2 additions and 1 deletions

View File

@ -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);