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 INNER JOIN Packages AS P ON D.PackageID = P.PackageID
WHERE CHARINDEX('.' + DomainName, @DomainName) > 0 WHERE CHARINDEX('.' + DomainName, @DomainName) > 0
AND (CHARINDEX('.' + DomainName, @DomainName) + LEN('.' + DomainName)) = LEN(@DomainName) + 1 AND (CHARINDEX('.' + DomainName, @DomainName) + LEN('.' + DomainName)) = LEN(@DomainName) + 1
AND IsDomainPointer = 0
-- this is a domain of other user -- this is a domain of other user
IF @UserID <> @DomainUserID AND @HostingAllowed = 0 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 ..\..\LICENSE.txt = ..\..\LICENSE.txt
..\..\Readme.htm = ..\..\Readme.htm ..\..\Readme.htm = ..\..\Readme.htm
..\..\ReleaseNotes.htm = ..\..\ReleaseNotes.htm ..\..\ReleaseNotes.htm = ..\..\ReleaseNotes.htm
..\Database\update_db.sql = ..\Database\update_db.sql
VersionInfo.vb = VersionInfo.vb VersionInfo.vb = VersionInfo.vb
EndProjectSection EndProjectSection
EndProject EndProject

View file

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

View file

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