Fixed: DomainPointer gets not deleted when deleting site

This commit is contained in:
robvde 2012-10-04 01:26:14 +04:00
parent 83886b94e2
commit 734ff40e30

View file

@ -2016,13 +2016,17 @@ namespace WebsitePanel.EnterpriseServer
return BusinessErrorCodes.ERROR_ORGANIZATION_DOMAIN_IS_IN_USE; return BusinessErrorCodes.ERROR_ORGANIZATION_DOMAIN_IS_IN_USE;
} }
List<DomainInfo> domains = GetDomainsByZoneId(domain.ZoneItemId);
foreach (DomainInfo d in domains) if (!domain.IsDomainPointer)
{ {
if (d.WebSiteId > 0) List<DomainInfo> domains = GetDomainsByZoneId(domain.ZoneItemId);
foreach (DomainInfo d in domains)
{ {
TaskManager.WriteError("Domain points to the existing web site"); if (d.WebSiteId > 0)
return BusinessErrorCodes.ERROR_DOMAIN_POINTS_TO_WEB_SITE; {
TaskManager.WriteError("Domain points to the existing web site");
return BusinessErrorCodes.ERROR_DOMAIN_POINTS_TO_WEB_SITE;
}
} }
} }