Fixed CleanupData to prevent recursive delete of all data
This commit is contained in:
@@ -269,8 +269,12 @@ class ApsInstaller extends ApsParser
|
|||||||
$this->db->query('DELETE FROM `' . TABLE_APS_INSTANCES . '` WHERE `ID` = ' . $this->db->escape($Row['InstanceID']));
|
$this->db->query('DELETE FROM `' . TABLE_APS_INSTANCES . '` WHERE `ID` = ' . $this->db->escape($Row['InstanceID']));
|
||||||
$this->db->query('DELETE FROM `' . TABLE_APS_SETTINGS . '` WHERE `InstanceID` = ' . $this->db->escape($Row['InstanceID']));
|
$this->db->query('DELETE FROM `' . TABLE_APS_SETTINGS . '` WHERE `InstanceID` = ' . $this->db->escape($Row['InstanceID']));
|
||||||
|
|
||||||
|
if($this->DomainPath != '' && checkDisallowedPaths($this->DomainPath))
|
||||||
|
{
|
||||||
|
$documentroot = getCustomerDetail($Row['CustomerID'],'documentroot');
|
||||||
|
|
||||||
//remove data, #273
|
//remove data, #273
|
||||||
if($this->DomainPath != '' && $this->DomainPath != '/') {
|
if($this->DomainPath != $documentroot) {
|
||||||
self::UnlinkRecursive($this->RealPath . $this->DomainPath . '/');
|
self::UnlinkRecursive($this->RealPath . $this->DomainPath . '/');
|
||||||
} else {
|
} else {
|
||||||
// save awstats/webalizer folder if it's the docroot
|
// save awstats/webalizer folder if it's the docroot
|
||||||
@@ -284,6 +288,7 @@ class ApsInstaller extends ApsParser
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setup all environment variables from the wizard, they're all needed by the installation script
|
* setup all environment variables from the wizard, they're all needed by the installation script
|
||||||
|
|||||||
Reference in New Issue
Block a user