From 90cd0e5f92d9215fc4b0ecaf992e9ed236830487 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Fri, 4 Jan 2013 08:45:25 -0500 Subject: [PATCH 1/2] Fix issue with Domain Aliases showing on Space Quota Page --- WebsitePanel/Database/update_db.sql | 103 +++++++++++++++++++++++++++- 1 file changed, 101 insertions(+), 2 deletions(-) diff --git a/WebsitePanel/Database/update_db.sql b/WebsitePanel/Database/update_db.sql index a35668b3..88bf5438 100644 --- a/WebsitePanel/Database/update_db.sql +++ b/WebsitePanel/Database/update_db.sql @@ -1,4 +1,4 @@ -USE [${install.database}] +USE [${install.database}] GO -- update database version @@ -7003,4 +7003,103 @@ IF NOT EXISTS (SELECT 1 FROM LyncUsers WHERE SipAddress IS NOT NULL) BEGIN UPDATE LyncUsers SET SipAddress=EA.PrimaryEmailAddress FROM ExchangeAccounts AS EA WHERE LyncUsers.SipAddress IS NULL AND LyncUsers.AccountID = EA.AccountID END -GO \ No newline at end of file +GO + + +ALTER PROCEDURE [dbo].[GetPackageQuotas] +( + @ActorID int, + @PackageID int +) +AS + +-- check rights +IF dbo.CheckActorPackageRights(@ActorID, @PackageID) = 0 +RAISERROR('You are not allowed to access this package', 16, 1) + +DECLARE @PlanID int, @ParentPackageID int +SELECT @PlanID = PlanID, @ParentPackageID = ParentPackageID FROM Packages +WHERE PackageID = @PackageID + +-- get resource groups +SELECT + RG.GroupID, + RG.GroupName, + ISNULL(HPR.CalculateDiskSpace, 0) AS CalculateDiskSpace, + ISNULL(HPR.CalculateBandwidth, 0) AS CalculateBandwidth, + dbo.GetPackageAllocatedResource(@ParentPackageID, RG.GroupID, 0) AS ParentEnabled +FROM ResourceGroups AS RG +LEFT OUTER JOIN HostingPlanResources AS HPR ON RG.GroupID = HPR.GroupID AND HPR.PlanID = @PlanID +WHERE dbo.GetPackageAllocatedResource(@PackageID, RG.GroupID, 0) = 1 +ORDER BY RG.GroupOrder + + +-- return quotas +SELECT + Q.QuotaID, + Q.GroupID, + Q.QuotaName, + Q.QuotaDescription, + Q.QuotaTypeID, + dbo.GetPackageAllocatedQuota(@PackageID, Q.QuotaID) AS QuotaValue, + dbo.GetPackageAllocatedQuota(@ParentPackageID, Q.QuotaID) AS ParentQuotaValue, + ISNULL(dbo.CalculateQuotaUsage(@PackageID, Q.QuotaID), 0) AS QuotaUsedValue +FROM Quotas AS Q +WHERE Q.HideQuota IS NULL OR Q.HideQuota = 0 +ORDER BY Q.QuotaOrder +RETURN + +GO + + + + + + + +ALTER PROCEDURE [dbo].[UpdateServiceProperties] +( + @ServiceID int, + @Xml ntext +) +AS + +-- delete old properties +BEGIN TRAN +DECLARE @idoc int +--Create an internal representation of the XML document. +EXEC sp_xml_preparedocument @idoc OUTPUT, @xml + +-- Execute a SELECT statement that uses the OPENXML rowset provider. +DELETE FROM ServiceProperties +WHERE ServiceID = @ServiceID +AND PropertyName COLLATE Latin1_General_CI_AS IN +( + SELECT PropertyName + FROM OPENXML(@idoc, '/properties/property', 1) + WITH (PropertyName nvarchar(50) '@name') +) + +INSERT INTO ServiceProperties +( + ServiceID, + PropertyName, + PropertyValue +) +SELECT + @ServiceID, + PropertyName, + PropertyValue +FROM OPENXML(@idoc, '/properties/property',1) WITH +( + PropertyName nvarchar(50) '@name', + PropertyValue nvarchar(1000) '@value' +) as PV + +-- remove document +exec sp_xml_removedocument @idoc + +COMMIT TRAN +RETURN +GO + From ced48c71eae1c77184aad13274535f8afb310bb6 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Fri, 4 Jan 2013 08:58:59 -0500 Subject: [PATCH 2/2] Added tag build-2.0.0.232 for changeset 8d67c7edac63