Merge remote-tracking branch 'origin/dev-v7' into temp8

# Conflicts:
#	src/Umbraco.Core/Configuration/GlobalSettings.cs
#	src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenTwelveZero/AddRelationTypeForMediaFolderOnDelete.cs
#	src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenTwelveZero/IncreaseLanguageIsoCodeColumnLength.cs
#	src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenTwelveZero/UpdateUmbracoConsent.cs
#	src/Umbraco.Core/Persistence/PetaPoco.cs
#	src/Umbraco.Core/PluginManager.cs
#	src/Umbraco.Core/Services/Implement/UserService.cs
#	src/Umbraco.Core/StringExtensions.cs
#	src/Umbraco.Core/Strings/DefaultShortStringHelper.cs
#	src/Umbraco.Tests/CodeFirst/ContentTypeMapper.cs
#	src/Umbraco.Tests/CoreXml/NavigableNavigatorTests.cs
#	src/Umbraco.Tests/PublishedContent/PublishedContentTests.cs
#	src/Umbraco.Web.UI.Client/src/common/resources/contenttype.resource.js
#	src/Umbraco.Web.UI.Client/src/common/resources/datatype.resource.js
#	src/Umbraco.Web.UI.Client/src/common/resources/mediatype.resource.js
#	src/Umbraco.Web.UI/Umbraco/developer/Packages/DirectoryBrowser.aspx.cs
#	src/Umbraco.Web/Install/FilePermissionHelper.cs
#	src/Umbraco.Web/Trees/PackagesTreeController.cs
#	src/Umbraco.Web/UI/JavaScript/UmbracoClientDependencyLoader.cs
#	src/Umbraco.Web/UmbracoModule.cs
#	src/Umbraco.Web/umbraco.presentation/content.cs
#	src/Umbraco.Web/umbraco.presentation/requestModule.cs
#	src/umbraco.businesslogic/BasePages/UmbracoEnsuredPage.cs
#	src/umbraco.cms/businesslogic/Content.cs
#	src/umbraco.cms/businesslogic/Packager/PackageActions/publishRootDocument.cs
This commit is contained in:
Shannon
2018-08-01 12:26:26 +10:00
10 changed files with 25 additions and 18 deletions

View File

@@ -15,8 +15,10 @@ namespace Umbraco.Core.Migrations.Upgrade.V_7_12_0
var exists = Context.Database.FirstOrDefault<RelationTypeDto>("WHERE alias=@alias", new { alias = Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteAlias });
if (exists == null)
{
Insert.IntoTable(Constants.DatabaseSchema.Tables.RelationType).Row(new
var uniqueId = (Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteAlias + "____" + Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteName).ToGuid();
Insert.IntoTable("umbracoRelationType").Row(new
{
typeUniqueId = uniqueId,
alias = Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteAlias,
name = Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteName,
childObjectType = Constants.ObjectTypes.MediaType,

View File

@@ -1,4 +1,7 @@
namespace Umbraco.Core.Migrations.Upgrade.V_7_12_0
using System.Linq;
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
namespace Umbraco.Core.Migrations.Upgrade.V_7_12_0
{
public class IncreaseLanguageIsoCodeColumnLength : MigrationBase
{
@@ -8,7 +11,20 @@
public override void Migrate()
{
Delete.Index("IX_umbracoLanguage_languageISOCode").OnTable("umbracoLanguage").Do();
var dbIndexes = SqlSyntax.GetDefinedIndexes(Context.Database)
.Select(x => new DbIndexDefinition
{
TableName = x.Item1,
IndexName = x.Item2,
ColumnName = x.Item3,
IsUnique = x.Item4
}).ToArray();
//Ensure the index exists before dropping it
if (dbIndexes.Any(x => x.IndexName.InvariantEquals("IX_umbracoLanguage_languageISOCode")))
{
Delete.Index("IX_umbracoLanguage_languageISOCode").OnTable("umbracoLanguage").Do();
}
Alter.Table("umbracoLanguage")
.AlterColumn("languageISOCode")

View File

@@ -417,7 +417,6 @@ namespace Umbraco.Tests.CoreXml
{
var source = new TestSource5();
var nav = new NavigableNavigator(source);
TestContent content;
Assert.AreEqual(NavigableNavigator.StatePosition.Root, nav.InternalState.Position);
Assert.IsTrue(nav.MoveToFirstChild());

View File

@@ -12,7 +12,6 @@ namespace Umbraco.Tests.Models.Collections
public abstract class Item : IEntity, ICanBeDirty
{
private bool _hasIdentity;
private int? _hash;
private int _id;
private Guid _key;
@@ -184,12 +183,6 @@ namespace Umbraco.Tests.Models.Collections
public static bool operator ==(Item left, Item right)
{
/*if (ReferenceEquals(null, left))
return false;
if(ReferenceEquals(null, right))
return false;*/
return ReferenceEquals(left, right);
}

View File

@@ -945,8 +945,6 @@ namespace Umbraco.Tests.Scheduling
throw new NotImplementedException();
}
private int i;
public async Task RunAsync(CancellationToken token)
{
Console.WriteLine("boom");

View File

@@ -82,7 +82,7 @@ angular.module("umbraco.directives")
generateAliasTimeout = $timeout(function () {
updateAlias = true;
entityResource.getSafeAlias(value, true).then(function (safeAlias) {
entityResource.getSafeAlias(encodeURIComponent(value), true).then(function (safeAlias) {
if (updateAlias) {
scope.alias = safeAlias.alias;
}

View File

@@ -293,7 +293,7 @@ function contentTypeResource($q, $http, umbRequestHelper, umbDataFormatter, loca
createContainer: function (parentId, name) {
return umbRequestHelper.resourcePromise(
$http.post(umbRequestHelper.getApiUrl("contentTypeApiBaseUrl", "PostCreateContainer", { parentId: parentId, name: name })),
$http.post(umbRequestHelper.getApiUrl("contentTypeApiBaseUrl", "PostCreateContainer", { parentId: parentId, name: encodeURIComponent(name) })),
'Failed to create a folder under parent id ' + parentId);
},

View File

@@ -355,7 +355,7 @@ function dataTypeResource($q, $http, umbDataFormatter, umbRequestHelper) {
umbRequestHelper.getApiUrl(
"dataTypeApiBaseUrl",
"PostCreateContainer",
{ parentId: parentId, name: name })),
{ parentId: parentId, name: encodeURIComponent(name) })),
'Failed to create a folder under parent id ' + parentId);
},

View File

@@ -244,7 +244,7 @@ function mediaTypeResource($q, $http, umbRequestHelper, umbDataFormatter) {
umbRequestHelper.getApiUrl(
"mediaTypeApiBaseUrl",
"PostCreateContainer",
{ parentId: parentId, name: name })),
{ parentId: parentId, name: encodeURIComponent(name) })),
'Failed to create a folder under parent id ' + parentId);
},

View File

@@ -32,7 +32,6 @@
// return root;
// }
// protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings)
// {
// var nodes = new TreeNodeCollection();