Un poil plus de cache sur la generation de conf bind en PHP
This commit is contained in:
parent
192702f772
commit
9b70409b4d
|
@ -158,9 +158,10 @@ class m_bind_regenerate {
|
||||||
|
|
||||||
function reload_named() {
|
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";
|
$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 ) {
|
foreach ($this->get_domain_summary() as $domain => $ds ) {
|
||||||
if ( ! $ds['gesdns'] ) continue;
|
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);
|
$old_named_conf = @file_get_contents($this->NAMED_CONF);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue