diff --git a/WebsitePanel.WHMCSModule/includes/hooks/websitepanel_addons.php b/WebsitePanel.WHMCSModule/includes/hooks/websitepanel_addons.php index 25de3672..4666d0e4 100644 --- a/WebsitePanel.WHMCSModule/includes/hooks/websitepanel_addons.php +++ b/WebsitePanel.WHMCSModule/includes/hooks/websitepanel_addons.php @@ -54,6 +54,11 @@ function websitepanel_addons_AddonActivation($params) // Retrieve the WebsitePanel Addons module settings $modSettings = websitepanel_addons_GetSettings(); + if (empty($modSettings['username']) || empty($modSettings['password'])) || empty($modSettings['serverhost'])) || empty($modSettings['serverport']))) + { + // The module is disabled or has not yet been configured - stop + return; + } // Get the associated WebsitePanel username from WHMCS $results = select_query('tblhosting', 'username', array('id' => $params['serviceid'])); diff --git a/WebsitePanel.WHMCSModule/includes/hooks/websitepanel_sync.php b/WebsitePanel.WHMCSModule/includes/hooks/websitepanel_sync.php index bf3582ac..1487b98e 100644 --- a/WebsitePanel.WHMCSModule/includes/hooks/websitepanel_sync.php +++ b/WebsitePanel.WHMCSModule/includes/hooks/websitepanel_sync.php @@ -53,6 +53,11 @@ function websitepanel_sync_ClientEdit($params) // Retrieve the WebsitePanel Addons module settings $modSettings = websitepanel_sync_GetSettings(); + if (empty($modSettings['username']) || empty($modSettings['password'])) || empty($modSettings['serverhost'])) || empty($modSettings['serverport']))) + { + // The module is disabled or has not yet been configured - stop + return; + } // Create the WebsitePanel object instance $wsp = new WebsitePanel($modSettings['username'], $modSettings['password'], $modSettings['serverhost'], $modSettings['serverport'], (($modSettings['serversecured']) == 'on' ? TRUE : FALSE)); diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/IIs70.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/IIs70.cs index a9e02df8..a6a5d76b 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/IIs70.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/IIs70.cs @@ -2037,6 +2037,19 @@ namespace WebsitePanel.Providers.Web return System.Diagnostics.FileVersionInfo.GetVersionInfo(apeModulePath).FileVersion; } + apeModulePath = Path.Combine(installDir, "ManualInstall\\bin\\Helicon.Ape.dll"); + if (File.Exists(apeModulePath)) + { + return System.Diagnostics.FileVersionInfo.GetVersionInfo(apeModulePath).FileVersion; + } + + apeModulePath = Path.Combine(installDir, "Helicon.Ape.dll"); + if (File.Exists(apeModulePath)) + { + return System.Diagnostics.FileVersionInfo.GetVersionInfo(apeModulePath).FileVersion; + } + + return HELICON_APE_NOT_REGISTERED; } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/DomainsAddDomain.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/DomainsAddDomain.ascx.resx index 49b87726..2389512c 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/DomainsAddDomain.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/DomainsAddDomain.ascx.resx @@ -163,10 +163,10 @@ Provisioning Options - Point to existing Mail Domain + Assign to existing Mail Domain - Point to existing Web Site + Assign to existing Web Site Please, enter correct sub-domain name, for example "subdomain" or "sub.subdomain". diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/DomainsAddDomainSelectType.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/DomainsAddDomainSelectType.ascx.resx index 0a0fbe79..007137a7 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/DomainsAddDomainSelectType.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/DomainsAddDomainSelectType.ascx.resx @@ -121,13 +121,13 @@ Cancel - Create a Top-Level Domain (TLD). + Create a Top-Level Domain (TLD). You can create a new web site for domain or assign it to an existing web site. Domain - Create a Top-Level Domain (TLD) or sub-domain that could point to the existing web site only. + Create a Top-Level Domain (TLD) or sub-domain that can point to the existing web site only. Domain Alias @@ -136,13 +136,13 @@ Please choose what type of domain you would like to add: - Create a sub-domain under domains allowed by your hosting provider. You could create a new web site for sub-domain or point it to existing one. + Create a sub-domain under domains allowed by your hosting provider. You can create a new web site for sub-domain or assign it to an existing web site. Provider Sub-domain - Create a sub-domain for already added top-level domain. You could create a new web site for sub-domain. + Create a sub-domain for already added top-level domain. You can create a new web site for sub-domain or assign it to an existing web site. Sub-domain diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx index b84c69b0..2f5a009f 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx @@ -47,7 +47,7 @@ -
@@ -55,7 +55,7 @@ -
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx.cs index 9fe39c8f..f9761a23 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx.cs @@ -99,14 +99,14 @@ namespace WebsitePanel.Portal // load package context PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId); - if ((type == DomainType.DomainPointer || (type == DomainType.Domain && !cntx.Quotas[Quotas.OS_DOMAINPOINTERS].QuotaExhausted)) && !IsPostBack) + if ((type == DomainType.DomainPointer || (type == DomainType.Domain)) && !IsPostBack) { // bind web sites WebSitesList.DataSource = ES.Services.WebServers.GetWebSites(PanelSecurity.PackageId, false); WebSitesList.DataBind(); } - if ((type == DomainType.DomainPointer || (type == DomainType.Domain && !cntx.Quotas[Quotas.OS_DOMAINPOINTERS].QuotaExhausted)) && !IsPostBack) + if ((type == DomainType.DomainPointer || (type == DomainType.Domain)) && !IsPostBack) { // bind mail domains MailDomainsList.DataSource = ES.Services.MailServers.GetMailDomains(PanelSecurity.PackageId, false); @@ -130,12 +130,12 @@ namespace WebsitePanel.Portal } // point Web site - PointWebSitePanel.Visible = (type == DomainType.DomainPointer || (type == DomainType.Domain && !cntx.Quotas[Quotas.OS_DOMAINPOINTERS].QuotaExhausted)) + PointWebSitePanel.Visible = (type == DomainType.DomainPointer || (type == DomainType.Domain)) && cntx.Groups.ContainsKey(ResourceGroups.Web) && WebSitesList.Items.Count > 0; WebSitesList.Enabled = PointWebSite.Checked; // point mail domain - PointMailDomainPanel.Visible = (type == DomainType.DomainPointer || (type == DomainType.Domain && !cntx.Quotas[Quotas.OS_DOMAINPOINTERS].QuotaExhausted)) + PointMailDomainPanel.Visible = (type == DomainType.DomainPointer || (type == DomainType.Domain)) && cntx.Groups.ContainsKey(ResourceGroups.Mail) && MailDomainsList.Items.Count > 0; MailDomainsList.Enabled = PointMailDomain.Checked; @@ -205,14 +205,14 @@ namespace WebsitePanel.Portal // load package context PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId); - if (type == DomainType.DomainPointer || (type == DomainType.Domain && !cntx.Quotas[Quotas.OS_DOMAINPOINTERS].QuotaExhausted)) + if (type == DomainType.DomainPointer || (type == DomainType.Domain)) { if (PointWebSite.Checked && WebSitesList.Items.Count > 0) pointWebSiteId = Utils.ParseInt(WebSitesList.SelectedValue, 0); } - if (type == DomainType.DomainPointer || (type == DomainType.Domain && !cntx.Quotas[Quotas.OS_DOMAINPOINTERS].QuotaExhausted)) + if (type == DomainType.DomainPointer || (type == DomainType.Domain)) { if (PointMailDomain.Checked && MailDomainsList.Items.Count > 0) pointMailDomainId = Utils.ParseInt(MailDomainsList.SelectedValue, 0); diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx.designer.cs index da29aa39..835fabf2 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx.designer.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification,