Fixed: Upon migration ensured that Domain and Pointers are configured as
required for the new version. The website pointer added as a dedicated record. The domain alias made visible as a top-level or sub-domain. Fixed duplicate pointers when reconstructing pointers for legacy sites. Legacy sites do not have all their hostheaders stored within the domains table
This commit is contained in:
parent
18dd0d9096
commit
6795a0feb1
2 changed files with 63 additions and 6 deletions
|
@ -5853,3 +5853,55 @@ WHERE
|
|||
RETURN'
|
||||
END
|
||||
GO
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
BEGIN TRAN
|
||||
CREATE TABLE #TempDomains
|
||||
(
|
||||
[PackageID] [int] NOT NULL,
|
||||
[ZoneItemID] [int] NULL,
|
||||
[DomainName] [nvarchar](100) COLLATE Latin1_General_CI_AS NOT NULL,
|
||||
[HostingAllowed] [bit] NOT NULL,
|
||||
[WebSiteID] [int] NULL,
|
||||
[IsSubDomain] [bit] NOT NULL,
|
||||
[IsInstantAlias] [bit] NOT NULL,
|
||||
[IsDomainPointer] [bit] NOT NULL,
|
||||
)
|
||||
|
||||
|
||||
INSERT INTO #TempDomains SELECT PackageID,
|
||||
ZoneItemID,
|
||||
DomainName,
|
||||
HostingAllowed,
|
||||
WebSiteID,
|
||||
IsSubDomain,
|
||||
IsInstantAlias,
|
||||
IsDomainPointer FROM Domains WHERE IsDomainPointer = 1
|
||||
|
||||
|
||||
UPDATE Domains SET IsDomainPointer=0,WebSiteID=NULL WHERE IsDomainPointer = 1 AND DomainName IN (SELECT DomainName FROM Domains AS D WHERE
|
||||
D.DomainName = (SELECT DISTINCT ItemName FROM ServiceItems WHERE ItemID = D.ZoneItemId )
|
||||
Group BY DOmainName
|
||||
HAVING (COUNT(DomainName) = 1))
|
||||
|
||||
|
||||
INSERT INTO Domains SELECT PackageID,
|
||||
ZoneItemID,
|
||||
DomainName,
|
||||
HostingAllowed,
|
||||
WebSiteID,
|
||||
NULL,
|
||||
IsSubDomain,
|
||||
IsInstantAlias,
|
||||
IsDomainPointer
|
||||
FROM #TempDomains As T WHERE DomainName IN (SELECT DomainName FROM Domains AS D WHERE
|
||||
D.DomainName = (SELECT DISTINCT ItemName FROM ServiceItems WHERE ItemID = D.ZoneItemId )
|
||||
Group BY DOmainName
|
||||
HAVING (COUNT(DomainName) = 1))
|
||||
|
||||
DROP TABLE #TempDomains
|
||||
COMMIT TRAN
|
||||
GO
|
|
@ -1143,8 +1143,12 @@ namespace WebsitePanel.EnterpriseServer
|
|||
if (!string.IsNullOrEmpty(b.Host))
|
||||
{
|
||||
domain.DomainName = b.Host;
|
||||
|
||||
DomainInfo domainTmp = ServerController.GetDomain(domain.DomainName);
|
||||
if (!((domainTmp != null) && (domainTmp.WebSiteId == siteItemId)))
|
||||
{
|
||||
int domainID = ServerController.AddDomain(domain, domain.IsInstantAlias, false);
|
||||
DomainInfo domainTmp = ServerController.GetDomain(domainID);
|
||||
domainTmp = ServerController.GetDomain(domainID);
|
||||
if (domainTmp != null)
|
||||
{
|
||||
domainTmp.WebSiteId = siteItemId;
|
||||
|
@ -1154,6 +1158,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue