From 0edf0107158c6ed715a1a77a6891dd4a4e0094dd Mon Sep 17 00:00:00 2001 From: Alan Garcia Date: Wed, 5 Feb 2014 12:36:54 +0000 Subject: [PATCH] =?UTF-8?q?BUgfix=20:=20oubliais=20de=20mettre=20=C3=A0=20?= =?UTF-8?q?jour=20le=20DNS=20lors=20de=20l'activation/desactivation=20d'un?= =?UTF-8?q?e=20entr=C3=A9e.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A backporter --- bureau/class/m_dom.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bureau/class/m_dom.php b/bureau/class/m_dom.php index 04ee2909..aed9d922 100644 --- a/bureau/class/m_dom.php +++ b/bureau/class/m_dom.php @@ -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; }