[fix] (for 3.5) fixing longstanding bug when we didn't deleted (or deleted too many) vhosts files in /var/lib/alternc/apache-vhost/.
This commit is contained in:
parent
4770c268d8
commit
ca0ed3dd40
|
@ -106,12 +106,13 @@ class m_apache {
|
||||||
* launched for each FQDN for which we want to delete a vhost template
|
* launched for each FQDN for which we want to delete a vhost template
|
||||||
*/
|
*/
|
||||||
function hook_updatedomains_web_del($subdomid) {
|
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->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();
|
$db->next_record();
|
||||||
$subdom=$db->Record;
|
$subdom=$db->Record;
|
||||||
$confdir = $this->vhostroot."/".substr($subdom["compte"],-1)."/".$subdom["compte"];
|
$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;
|
$this->shouldreload=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue