diff --git a/bureau/class/m_apache.php b/bureau/class/m_apache.php index 98f4f17f..8371f039 100644 --- a/bureau/class/m_apache.php +++ b/bureau/class/m_apache.php @@ -106,12 +106,13 @@ class m_apache { * launched for each FQDN for which we want to delete a vhost template */ function hook_updatedomains_web_del($subdomid) { - global $db; + global $db,$msg; $db->query("SELECT sd.*, dt.only_dns, dt.has_https_option, m.login FROM domaines_type dt, sub_domaines sd LEFT JOIN membres m ON m.uid=sd.compte WHERE dt.name=sd.type AND sd.web_action!='OK' AND id=?;",array($subdomid)); $db->next_record(); $subdom=$db->Record; $confdir = $this->vhostroot."/".substr($subdom["compte"],-1)."/".$subdom["compte"]; - @unlink($confdir."/".$subdom["fqdn"].".conf"); + $deleteme= $subdom["sub"].(($subdom["sub"])?".":"").$subdom["domaine"].".conf"; + @unlink($confdir."/".$deleteme); $this->shouldreload=true; }