spApprove_NewsStory

Parameters

Parameter Parameter Type Mode Description
@PKID int IN
@CurrentUsersID int IN

Definition

Copy

      CREATE PROCEDURE [dbo].[spApprove_NewsStory]
      (
          @PKID int    ,
          @CurrentUsersID    int
      )
      AS
      BEGIN
      set nocount on

          -- SHL BBIS Bug 320591; If user is anonymous (id = 0) then we don't insert an ID
          -- so that we can avoid the UserId foreign key constraint.
          if @CurrentUsersID < 1
          begin
              set @CurrentUsersID = null
          end

          begin transaction
              UPDATE NewsStories 
              set APPROVED = 1,ApprovedId = @CurrentUsersID, ApprovedDate = getutcdate()
              where ID = @PKID
          commit transaction
      END