spClone_NewsChannel
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@PKID | int | INOUT | |
@CloneContentID | int | IN | |
@ClonedContentID | int | IN | |
@CurrentUsersID | int | IN |
Definition
Copy
CREATE Procedure [dbo].[spClone_NewsChannel]
(
@PKID int output,
@CloneContentID int,
@ClonedContentID int,
@CurrentUsersID int
)
as
BEGIN TRANSACTION
DECLARE @NewGuid uniqueidentifier
SET @NewGuid = NEWID()
Insert into NewsChannels
(SiteContentID,
Title,
LinkURL,
[Description],
Copyright,
EditorEMail,
PublicationDate,
SiteImageID,
ImageTitle,
ImageLink,
Guid,
AllowMembers,
PersonalPageDataID,
Moderated)
Select @CloneContentID,
Title,
LinkURL,
[Description],
Copyright,
EditorEMail,
PublicationDate,
SiteImageID,
ImageTitle,
ImageLink,
@NewGuid,
AllowMembers,
PersonalPageDataID,
Moderated
From NewsChannels
Where SiteContentiD = @ClonedContentID
SELECT @PKID = @@Identity
DECLARE @OldGuid uniqueidentifier
SELECT @OldGuid=Guid FROM NewsChannels WHERE SiteContentiD = @ClonedContentID
-- DMB CR268460-022807: Security rights were not copying
exec spClone_RoleObjectPrivs @OldGuid, @NewGuid
exec spAuditThis @CurrentUsersID, 1, @NewGuid, 1
COMMIT