Commit f9a8b51a authored by Alan Garcia's avatar Alan Garcia
Browse files

Rajout d'un check lors du changement de statut d'un sous domaine

parent 86816185
......@@ -212,7 +212,14 @@ class m_dom {
if (! in_array($status,array('ENABLE', 'DISABLE'))) return false;
// FIXME: add check with can_create_subdomain
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'");
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment