Last active
December 13, 2016 21:52
-
-
Save bdukes/fe8c45e7991c35bc445068892c0c200f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -1040,7 +1040,8 @@ BEGIN | |
DECLARE @TabOrder Int | |
DECLARE @ParentId Int | |
DECLARE @ContentItemId Int | |
- SELECT @TabOrder = TabOrder, @ParentId = ParentID, @ContentItemID = ContentItemID FROM {databaseOwner}[{objectQualifier}Tabs] WHERE TabID = @TabId | |
+ DECLARE @PortalId int | |
+ SELECT @TabOrder = TabOrder, @ParentId = ParentID, @ContentItemID = ContentItemID, @PortalId = PortalID FROM {databaseOwner}[{objectQualifier}Tabs] WHERE TabID = @TabId | |
-- Delete Tab -- | |
DELETE FROM {databaseOwner}[{objectQualifier}Tabs] WHERE TabID = @TabId | |
@@ -1049,6 +1050,7 @@ BEGIN | |
UPDATE {databaseOwner}[{objectQualifier}Tabs] | |
SET TabOrder = TabOrder - 2 | |
WHERE IsNull(ParentID, -1) = IsNull(@ParentId , -1) AND TabOrder > @TabOrder | |
+ AND (PortalID = @PortalId OR (PortalID is Null AND @PortalId is Null)) | |
-- Delete Content Item -- | |
DELETE FROM {databaseOwner}[{objectQualifier}ContentItems] WHERE ContentItemID = @ContentItemId |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment