Commit
This commit is contained in:
commit
2a7f2e303e
2 changed files with 76 additions and 2 deletions
|
@ -5416,4 +5416,79 @@ exec sp_executesql @sql, N'@StartRow int, @MaximumRows int, @PackageID int, @Fil
|
||||||
|
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
GO
|
GO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ALTER PROCEDURE [dbo].[DeleteServiceItem]
|
||||||
|
(
|
||||||
|
@ActorID int,
|
||||||
|
@ItemID int
|
||||||
|
)
|
||||||
|
AS
|
||||||
|
|
||||||
|
-- check rights
|
||||||
|
DECLARE @PackageID int
|
||||||
|
SELECT PackageID = @PackageID FROM ServiceItems
|
||||||
|
WHERE ItemID = @ItemID
|
||||||
|
|
||||||
|
IF dbo.CheckActorPackageRights(@ActorID, @PackageID) = 0
|
||||||
|
RAISERROR('You are not allowed to access this package', 16, 1)
|
||||||
|
|
||||||
|
BEGIN TRAN
|
||||||
|
|
||||||
|
UPDATE Domains
|
||||||
|
SET ZoneItemID = NULL
|
||||||
|
WHERE ZoneItemID = @ItemID
|
||||||
|
|
||||||
|
DELETE FROM Domains
|
||||||
|
WHERE WebSiteID = @ItemID AND IsDomainPointer = 1
|
||||||
|
|
||||||
|
UPDATE Domains
|
||||||
|
SET WebSiteID = NULL
|
||||||
|
WHERE WebSiteID = @ItemID
|
||||||
|
|
||||||
|
UPDATE Domains
|
||||||
|
SET MailDomainID = NULL
|
||||||
|
WHERE MailDomainID = @ItemID
|
||||||
|
|
||||||
|
-- delete item comments
|
||||||
|
DELETE FROM Comments
|
||||||
|
WHERE ItemID = @ItemID AND ItemTypeID = 'SERVICE_ITEM'
|
||||||
|
|
||||||
|
-- delete item properties
|
||||||
|
DELETE FROM ServiceItemProperties
|
||||||
|
WHERE ItemID = @ItemID
|
||||||
|
|
||||||
|
-- delete external IP addresses
|
||||||
|
EXEC dbo.DeleteItemIPAddresses @ActorID, @ItemID
|
||||||
|
|
||||||
|
-- delete item
|
||||||
|
DELETE FROM ServiceItems
|
||||||
|
WHERE ItemID = @ItemID
|
||||||
|
|
||||||
|
COMMIT TRAN
|
||||||
|
|
||||||
|
RETURN
|
||||||
|
|
||||||
|
GO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio 2010
|
# Visual Studio 2010
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C57D3F9F-7BA0-4D38-A159-B6EDA5C19B13}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C57D3F9F-7BA0-4D38-A159-B6EDA5C19B13}"
|
||||||
ProjectSection(SolutionItems) = preProject
|
ProjectSection(SolutionItems) = preProject
|
||||||
..\Database\install_db.sql = ..\Database\install_db.sql
|
|
||||||
..\..\LICENSE.txt = ..\..\LICENSE.txt
|
..\..\LICENSE.txt = ..\..\LICENSE.txt
|
||||||
..\..\Readme.htm = ..\..\Readme.htm
|
..\..\Readme.htm = ..\..\Readme.htm
|
||||||
..\..\ReleaseNotes.htm = ..\..\ReleaseNotes.htm
|
..\..\ReleaseNotes.htm = ..\..\ReleaseNotes.htm
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue