Skip to content

Commit

Permalink
Merge branch '4.30-bug-fixes' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
exileDev committed Jul 14, 2020
2 parents dfcc6ec + 8f9bf67 commit 4980b47
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6177,6 +6177,7 @@ protected virtual void InstallSettings()
"config",
"eucookielawaccept",
"page-not-found",
"products",
//system names are not allowed (anyway they will cause a runtime error),
"con",
"lpt1",
Expand Down
18 changes: 18 additions & 0 deletions upgradescripts/4.20-4.30/upgrade.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3348,4 +3348,22 @@ IF NOT EXISTS (SELECT 1 FROM sys.objects WHERE object_id = object_id(N'[StorePic
BEGIN
DELETE FROM [MigrationVersionInfo] WHERE [Description] = 'Pickup.PickupInStore base schema';
END
GO

--add new slug to "reservedurlrecordslugs" setting
IF EXISTS (SELECT 1 FROM [Setting] WHERE [name] = N'seosettings.reservedurlrecordslugs')
BEGIN
DECLARE @NewUrlRecord nvarchar(4000)
SET @NewUrlRecord = N'products'

DECLARE @reservedurlrecordslugs nvarchar(4000)
SELECT @reservedurlrecordslugs = [Value] FROM [Setting] WHERE [name] = N'seosettings.reservedurlrecordslugs'

IF (PATINDEX('%[,]' + @NewUrlRecord + '[,]%', @reservedurlrecordslugs) = 0 or PATINDEX('%[,]' + @NewUrlRecord, @reservedurlrecordslugs) = 0)
BEGIN
UPDATE [Setting]
SET [Value] = @reservedurlrecordslugs + ',' + @NewUrlRecord
WHERE [name] = N'seosettings.reservedurlrecordslugs'
END
END
GO

0 comments on commit 4980b47

Please sign in to comment.