Fixed: failed to create instant alias.

This commit is contained in:
robvde 2012-10-01 20:40:11 +04:00
parent 3687e52a4e
commit 8d248737a7
4 changed files with 19 additions and 11 deletions

View file

@ -694,6 +694,7 @@ FROM Domains AS D
INNER JOIN Packages AS P ON D.PackageID = P.PackageID
WHERE CHARINDEX('.' + DomainName, @DomainName) > 0
AND (CHARINDEX('.' + DomainName, @DomainName) + LEN('.' + DomainName)) = LEN(@DomainName) + 1
AND IsDomainPointer = 0
-- this is a domain of other user
IF @UserID <> @DomainUserID AND @HostingAllowed = 0

View file

@ -5,6 +5,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
..\..\LICENSE.txt = ..\..\LICENSE.txt
..\..\Readme.htm = ..\..\Readme.htm
..\..\ReleaseNotes.htm = ..\..\ReleaseNotes.htm
..\Database\update_db.sql = ..\Database\update_db.sql
VersionInfo.vb = VersionInfo.vb
EndProjectSection
EndProject

View file

@ -1800,10 +1800,8 @@ namespace WebsitePanel.EnterpriseServer
else if (isDomainPointer)
{
// domain pointer
/*
if (PackageController.GetPackageQuota(packageId, Quotas.OS_DOMAINPOINTERS).QuotaExhausted)
return BusinessErrorCodes.ERROR_DOMAIN_QUOTA_LIMIT;
*/
}
else
{
@ -2173,14 +2171,17 @@ namespace WebsitePanel.EnterpriseServer
}
// add web site pointer if required
/*
if (domain.WebSiteId > 0 && instantAlias.WebSiteId == 0)
{
int webRes = WebServerController.AddWebSitePointer(domain.WebSiteId, hostName, domainId);
if (webRes < 0)
return webRes;
}
/*
*/
// add mail domain pointer
/*
if (domain.MailDomainId > 0 && instantAlias.MailDomainId == 0)
{
int mailRes = MailServerController.AddMailDomainPointer(domain.MailDomainId, instantAliasId);

View file

@ -275,6 +275,7 @@ namespace WebsitePanel.EnterpriseServer
{
// DEDICATED IP
bindings.Add(new ServerBinding(ipAddr, "80", ""));
bindings.Add(new ServerBinding(ipAddr, "443", ""));
}
UserInfo user = PackageController.GetPackageOwner(packageId);
@ -679,6 +680,10 @@ namespace WebsitePanel.EnterpriseServer
ServerBinding srvBinding = new ServerBinding(ipAddr, "80", "");
newBindings.Add(srvBinding);
srvBinding = new ServerBinding(ipAddr, "443", "");
newBindings.Add(srvBinding);
foreach (ServerBinding b in web.GetSiteBindings(siteItem.SiteId))
{
if (!((b.Host == srvBinding.Host) &