BUgfix : oubliais de mettre à jour le DNS lors de l'activation/desactivation d'une entrée.
A backporter
This commit is contained in:
parent
82e8c2e40c
commit
0edf010715
|
@ -535,15 +535,16 @@ class m_dom {
|
|||
$status=strtoupper($status);
|
||||
if (! in_array($status,array('ENABLE', 'DISABLE'))) return false;
|
||||
|
||||
$jh = $this->get_sub_domain_all($sub_id);
|
||||
if ($status == 'ENABLE') { // check compatibility with existing sub_domains
|
||||
$jh = $this->get_sub_domain_all($sub_id);
|
||||
if (! $this->can_create_subdomain($jh['domain'], $jh['name'], $jh['type'], $sub_id) ) {
|
||||
$err->raise("dom", _("The parameters for this subdomain and domain type are invalid. Please check for subdomain entries incompatibility"));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$db->query("update sub_domaines set enable='$status' where id = '$sub_id'");
|
||||
$db->query("update sub_domaines set enable='$status' where id = '".intval($sub_id)."';");
|
||||
$db->query("UPDATE domaines SET dns_action='UPDATE' WHERE domaine='".mysql_escape_string($jh['domain'])."';");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue