From 5ec67ab3fdb50d0b01ca17d9de90a17229d19a03 Mon Sep 17 00:00:00 2001 From: Brian Powell Date: Fri, 9 Jun 2017 11:40:38 -0400 Subject: [PATCH 01/13] Apply Tom Fulton's fix for U4-9430 from https://github.com/tomfulton/Umbraco-CMS/commit/ba670586eba14092e6f1d20ee5e9aceb93e05f23 --- src/Umbraco.Web/Routing/UrlProviderExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web/Routing/UrlProviderExtensions.cs b/src/Umbraco.Web/Routing/UrlProviderExtensions.cs index 54ef8a42b5..b4d36eeb70 100644 --- a/src/Umbraco.Web/Routing/UrlProviderExtensions.cs +++ b/src/Umbraco.Web/Routing/UrlProviderExtensions.cs @@ -68,7 +68,7 @@ namespace Umbraco.Web.Routing else { // test for collisions - var uri = new Uri(url.TrimEnd('/'), UriKind.RelativeOrAbsolute); + var uri = UriUtility.UriToUmbraco(new Uri(url.TrimEnd('/'), UriKind.RelativeOrAbsolute)); if (uri.IsAbsoluteUri == false) uri = uri.MakeAbsolute(UmbracoContext.Current.CleanedUmbracoUrl); var pcr = new PublishedContentRequest(uri, UmbracoContext.Current.RoutingContext, UmbracoConfig.For.UmbracoSettings().WebRouting, s => Roles.Provider.GetRolesForUser(s)); pcr.Engine.TryRouteRequest(); From 6b289e1a7d5d9b7879d2c25a6be06432c4be17cf Mon Sep 17 00:00:00 2001 From: Dave Woestenborghs Date: Tue, 18 Jul 2017 14:44:57 +0200 Subject: [PATCH 02/13] Fix value converter work for legacy media picker Fix for issue http://issues.umbraco.org/issue/U4-10178 --- .../LegacyMediaPickerPropertyConverter.cs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/Umbraco.Web/PropertyEditors/ValueConverters/LegacyMediaPickerPropertyConverter.cs b/src/Umbraco.Web/PropertyEditors/ValueConverters/LegacyMediaPickerPropertyConverter.cs index db115f58de..b8e33c27a1 100644 --- a/src/Umbraco.Web/PropertyEditors/ValueConverters/LegacyMediaPickerPropertyConverter.cs +++ b/src/Umbraco.Web/PropertyEditors/ValueConverters/LegacyMediaPickerPropertyConverter.cs @@ -56,14 +56,10 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters { if (UmbracoConfig.For.UmbracoSettings().Content.EnablePropertyValueConverters) { - return propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MultipleMediaPickerAlias); - } - - if (UmbracoConfig.For.UmbracoSettings().Content.EnablePropertyValueConverters) - { - // this is the double legacy media picker, it can pick only single media items - return propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MediaPickerAlias); + return propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MultipleMediaPickerAlias) || + propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MediaPickerAlias); // this is the double legacy media picker, it can pick only single media items } + return false; } @@ -270,4 +266,4 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters Storages.Clear(); } } -} \ No newline at end of file +} From 56cff6bba837b4d469212d9204a6a03bcabd1ba8 Mon Sep 17 00:00:00 2001 From: Dave Woestenborghs Date: Tue, 18 Jul 2017 17:11:49 +0200 Subject: [PATCH 03/13] implemented suggestions from @jeavon --- .../LegacyMediaPickerPropertyConverter.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Web/PropertyEditors/ValueConverters/LegacyMediaPickerPropertyConverter.cs b/src/Umbraco.Web/PropertyEditors/ValueConverters/LegacyMediaPickerPropertyConverter.cs index b8e33c27a1..8ef11bec8d 100644 --- a/src/Umbraco.Web/PropertyEditors/ValueConverters/LegacyMediaPickerPropertyConverter.cs +++ b/src/Umbraco.Web/PropertyEditors/ValueConverters/LegacyMediaPickerPropertyConverter.cs @@ -54,12 +54,17 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters /// public override bool IsConverter(PublishedPropertyType propertyType) { - if (UmbracoConfig.For.UmbracoSettings().Content.EnablePropertyValueConverters) + if (UmbracoConfig.For.UmbracoSettings().Content.EnablePropertyValueConverters && propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MultipleMediaPickerAlias)) { - return propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MultipleMediaPickerAlias) || - propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MediaPickerAlias); // this is the double legacy media picker, it can pick only single media items + return true; } - + + if (UmbracoConfig.For.UmbracoSettings().Content.EnablePropertyValueConverters && propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MediaPickerAlias)) + { + // this is the double legacy media picker, it can pick only single media items + return true; + } + return false; } From 82661d9af486d6d47831602bc3c0d6f1955b41a2 Mon Sep 17 00:00:00 2001 From: Stephan Date: Wed, 19 Jul 2017 11:51:46 +0200 Subject: [PATCH 04/13] U4-10128 - GetKey unwraps --- src/Umbraco.Web/PublishedContentExtensions.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Umbraco.Web/PublishedContentExtensions.cs b/src/Umbraco.Web/PublishedContentExtensions.cs index 1c1aa2d5a2..9098cdcb0b 100644 --- a/src/Umbraco.Web/PublishedContentExtensions.cs +++ b/src/Umbraco.Web/PublishedContentExtensions.cs @@ -24,7 +24,20 @@ namespace Umbraco.Web public static Guid GetKey(this IPublishedContent content) { + // fast var contentWithKey = content as IPublishedContentWithKey; + if (contentWithKey != null) return contentWithKey.Key; + + // try to unwrap (models...) + var contentWrapped = content as PublishedContentWrapped; + while (contentWrapped != null) + { + content = contentWrapped.Unwrap(); + contentWrapped = content as PublishedContentWrapped; + } + + // again + contentWithKey = content as IPublishedContentWithKey; return contentWithKey == null ? Guid.Empty : contentWithKey.Key; } From 11e4bf5de8d3d1badbe9ead7f97ccdc0f1e3fd4c Mon Sep 17 00:00:00 2001 From: Stephan Date: Wed, 19 Jul 2017 12:08:31 +0200 Subject: [PATCH 05/13] U4-10128 - improve --- .../PublishedContent/PublishedContentTests.cs | 44 ++++++++++++++----- src/Umbraco.Web/PublishedContentExtensions.cs | 6 ++- 2 files changed, 38 insertions(+), 12 deletions(-) diff --git a/src/Umbraco.Tests/PublishedContent/PublishedContentTests.cs b/src/Umbraco.Tests/PublishedContent/PublishedContentTests.cs index 3967afce79..e9af22b968 100644 --- a/src/Umbraco.Tests/PublishedContent/PublishedContentTests.cs +++ b/src/Umbraco.Tests/PublishedContent/PublishedContentTests.cs @@ -44,11 +44,11 @@ namespace Umbraco.Tests.PublishedContent var propertyTypes = new[] { // AutoPublishedContentType will auto-generate other properties - new PublishedPropertyType("umbracoNaviHide", 0, Constants.PropertyEditors.TrueFalseAlias), - new PublishedPropertyType("selectedNodes", 0, "?"), - new PublishedPropertyType("umbracoUrlAlias", 0, "?"), - new PublishedPropertyType("content", 0, Constants.PropertyEditors.TinyMCEAlias), - new PublishedPropertyType("testRecursive", 0, "?"), + new PublishedPropertyType("umbracoNaviHide", 0, Constants.PropertyEditors.TrueFalseAlias), + new PublishedPropertyType("selectedNodes", 0, "?"), + new PublishedPropertyType("umbracoUrlAlias", 0, "?"), + new PublishedPropertyType("content", 0, Constants.PropertyEditors.TinyMCEAlias), + new PublishedPropertyType("testRecursive", 0, "?"), }; var compositionAliases = new[] {"MyCompositionAlias"}; var type = new AutoPublishedContentType(0, "anything", compositionAliases, propertyTypes); @@ -73,7 +73,7 @@ namespace Umbraco.Tests.PublishedContent protected override string GetXmlContent(int templateId) { return @" - @@ -87,17 +87,17 @@ namespace Umbraco.Tests.PublishedContent This is some content]]> - + - + - + 1 @@ -211,8 +211,8 @@ namespace Umbraco.Tests.PublishedContent [PublishedContentModel("Home")] internal class Home : PublishedContentModel { - public Home(IPublishedContent content) - : base(content) + public Home(IPublishedContent content) + : base(content) {} } @@ -659,6 +659,28 @@ namespace Umbraco.Tests.PublishedContent Assert.AreEqual((int)1178, (int)result.Id); } + [Test] + public void GetKey() + { + var key = Guid.Parse("CDB83BBC-A83B-4BA6-93B8-AADEF67D3C09"); + + // doc is Home (a model) and GetKey unwraps and works + var doc = GetNode(1176); + Assert.IsInstanceOf(doc); + Assert.AreEqual(key, doc.GetKey()); + + // wrapped is PublishedContentWrapped and WithKey unwraps + var wrapped = new TestWrapped(doc); + Assert.AreEqual(key, wrapped.GetKey()); + } + + class TestWrapped : PublishedContentWrapped + { + public TestWrapped(IPublishedContent content) + : base(content) + { } + } + [Test] public void DetachedProperty1() { diff --git a/src/Umbraco.Web/PublishedContentExtensions.cs b/src/Umbraco.Web/PublishedContentExtensions.cs index 9098cdcb0b..a65c353eff 100644 --- a/src/Umbraco.Web/PublishedContentExtensions.cs +++ b/src/Umbraco.Web/PublishedContentExtensions.cs @@ -10,6 +10,7 @@ using Umbraco.Core.Models.PublishedContent; using Umbraco.Core.Services; using Umbraco.Web.Models; using Umbraco.Core; +using Umbraco.Core.Logging; using Umbraco.Web.Routing; using ContentType = umbraco.cms.businesslogic.ContentType; @@ -38,7 +39,10 @@ namespace Umbraco.Web // again contentWithKey = content as IPublishedContentWithKey; - return contentWithKey == null ? Guid.Empty : contentWithKey.Key; + if (contentWithKey != null) return contentWithKey.Key; + + LogHelper.Debug(typeof(PublishedContentExtensions), "Could not get key for IPublishedContent of type " + content.GetType().FullName); + return Guid.Empty; } #endregion From d57de05453711291257388a590058faf6a68c7b6 Mon Sep 17 00:00:00 2001 From: Stephan Date: Wed, 19 Jul 2017 12:24:00 +0200 Subject: [PATCH 06/13] U4-10128 - super improve --- src/Umbraco.Web/PublishedContentExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web/PublishedContentExtensions.cs b/src/Umbraco.Web/PublishedContentExtensions.cs index a65c353eff..38666dadb9 100644 --- a/src/Umbraco.Web/PublishedContentExtensions.cs +++ b/src/Umbraco.Web/PublishedContentExtensions.cs @@ -41,7 +41,7 @@ namespace Umbraco.Web contentWithKey = content as IPublishedContentWithKey; if (contentWithKey != null) return contentWithKey.Key; - LogHelper.Debug(typeof(PublishedContentExtensions), "Could not get key for IPublishedContent of type " + content.GetType().FullName); + LogHelper.Debug(typeof(PublishedContentExtensions), string.Format("Could not get key for IPublishedContent with id {0} of type {1}.", content.Id, content.GetType().FullName)); return Guid.Empty; } From 2c64f91b258ffe1c0d101677bb010ba91455fa44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Gregersen?= Date: Wed, 19 Jul 2017 22:23:22 +0200 Subject: [PATCH 07/13] Changed name of argument in validation Minor change... :) --- src/Umbraco.Core/PropertyEditors/PropertyEditorAttribute.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Core/PropertyEditors/PropertyEditorAttribute.cs b/src/Umbraco.Core/PropertyEditors/PropertyEditorAttribute.cs index 41e4ccc74e..ec87af29ad 100644 --- a/src/Umbraco.Core/PropertyEditors/PropertyEditorAttribute.cs +++ b/src/Umbraco.Core/PropertyEditors/PropertyEditorAttribute.cs @@ -26,7 +26,7 @@ namespace Umbraco.Core.PropertyEditors public PropertyEditorAttribute(string alias, string name) { - Mandate.ParameterNotNullOrEmpty(alias, "id"); + Mandate.ParameterNotNullOrEmpty(alias, "alias"); Mandate.ParameterNotNullOrEmpty(name, "name"); Alias = alias; @@ -82,4 +82,4 @@ namespace Umbraco.Core.PropertyEditors /// public string Group { get; set; } } -} \ No newline at end of file +} From f8fac9f84e0f3ae556282e255bc9e625cbe84be1 Mon Sep 17 00:00:00 2001 From: Stephan Date: Thu, 20 Jul 2017 10:21:21 +0200 Subject: [PATCH 08/13] U4-9430 - fix --- src/Umbraco.Web/Routing/UrlProviderExtensions.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web/Routing/UrlProviderExtensions.cs b/src/Umbraco.Web/Routing/UrlProviderExtensions.cs index b4d36eeb70..d464b8962e 100644 --- a/src/Umbraco.Web/Routing/UrlProviderExtensions.cs +++ b/src/Umbraco.Web/Routing/UrlProviderExtensions.cs @@ -68,8 +68,9 @@ namespace Umbraco.Web.Routing else { // test for collisions - var uri = UriUtility.UriToUmbraco(new Uri(url.TrimEnd('/'), UriKind.RelativeOrAbsolute)); + var uri = new Uri(url.TrimEnd('/'), UriKind.RelativeOrAbsolute); if (uri.IsAbsoluteUri == false) uri = uri.MakeAbsolute(UmbracoContext.Current.CleanedUmbracoUrl); + uri = UriUtility.UriToUmbraco(uri); var pcr = new PublishedContentRequest(uri, UmbracoContext.Current.RoutingContext, UmbracoConfig.For.UmbracoSettings().WebRouting, s => Roles.Provider.GetRolesForUser(s)); pcr.Engine.TryRouteRequest(); From 74e16c0f8d16976bca43b40dca4703d19fa0df6b Mon Sep 17 00:00:00 2001 From: pijemcolu Date: Fri, 21 Jul 2017 10:14:07 +0200 Subject: [PATCH 09/13] fix link to training in Settings->Dashboard --- .../src/views/dashboard/developer/developerdashboardintro.html | 2 +- .../src/views/dashboard/settings/settingsdashboardintro.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/dashboard/developer/developerdashboardintro.html b/src/Umbraco.Web.UI.Client/src/views/dashboard/developer/developerdashboardintro.html index 6ced082c06..9b7f1433e3 100644 --- a/src/Umbraco.Web.UI.Client/src/views/dashboard/developer/developerdashboardintro.html +++ b/src/Umbraco.Web.UI.Client/src/views/dashboard/developer/developerdashboardintro.html @@ -10,5 +10,5 @@
  • Find an add-on package to help you get going quickly
  • Watch our tutorial videos (some are free, some require a subscription)
  • Find out about our productivity boosting tools and commercial support
  • -
  • Find out about real-life training and certification opportunities
  • +
  • Find out about real-life training and certification opportunities
  • diff --git a/src/Umbraco.Web.UI.Client/src/views/dashboard/settings/settingsdashboardintro.html b/src/Umbraco.Web.UI.Client/src/views/dashboard/settings/settingsdashboardintro.html index 3a45776872..d59d10d393 100644 --- a/src/Umbraco.Web.UI.Client/src/views/dashboard/settings/settingsdashboardintro.html +++ b/src/Umbraco.Web.UI.Client/src/views/dashboard/settings/settingsdashboardintro.html @@ -10,5 +10,5 @@
  • Ask a question in the Community Forum
  • Watch our tutorial videos (some are free, some require a subscription)
  • Find out about our productivity boosting tools and commercial support
  • -
  • Find out about real-life training and certification opportunities
  • +
  • Find out about real-life training and certification opportunities
  • From c0eaeb3168f69c8cd5564f51ea3761bb353f5471 Mon Sep 17 00:00:00 2001 From: Stephan Date: Fri, 21 Jul 2017 13:06:23 +0200 Subject: [PATCH 10/13] Fix tests with issues --- .../PublishedContentExtensionTests.cs | 25 +++++++++++----- .../Scheduling/BackgroundTaskRunnerTests.cs | 30 ++++++++++--------- src/Umbraco.Web/PublishedContentExtensions.cs | 20 ++----------- 3 files changed, 36 insertions(+), 39 deletions(-) diff --git a/src/Umbraco.Tests/PublishedContent/PublishedContentExtensionTests.cs b/src/Umbraco.Tests/PublishedContent/PublishedContentExtensionTests.cs index e2e1b91087..8d004e33f0 100644 --- a/src/Umbraco.Tests/PublishedContent/PublishedContentExtensionTests.cs +++ b/src/Umbraco.Tests/PublishedContent/PublishedContentExtensionTests.cs @@ -4,6 +4,7 @@ using System.Linq; using System.Text; using NUnit.Framework; using Umbraco.Core.Models; +using Umbraco.Core.Models.PublishedContent; using Umbraco.Tests.TestHelpers; using Umbraco.Web; @@ -16,8 +17,16 @@ namespace Umbraco.Tests.PublishedContent private UmbracoContext ctx; private string xmlContent = ""; private bool createContentTypes = true; - - protected override string GetXmlContent(int templateId) + + public override void Initialize() + { + base.Initialize(); + + // make sure we get them from the content service + PublishedContentType.GetPublishedContentTypeCallback = null; + } + + protected override string GetXmlContent(int templateId) { return xmlContent; } @@ -57,7 +66,7 @@ namespace Umbraco.Tests.PublishedContent var publishedContent = ctx.ContentCache.GetById(1100); Assert.That(publishedContent.IsDocumentType("base", true)); } - + [Test] public void IsDocumentType_Recursive_InvalidBaseType_ReturnsFalse() { @@ -73,23 +82,23 @@ namespace Umbraco.Tests.PublishedContent if (createContentTypes) { var contentTypeService = ctx.Application.Services.ContentTypeService; - var baseType = new ContentType(-1) {Alias = "base", Name = "Base"}; + var baseType = new ContentType(-1) { Alias = "base", Name = "Base" }; const string contentTypeAlias = "inherited"; - var inheritedType = new ContentType(baseType, contentTypeAlias) {Alias = contentTypeAlias, Name = "Inherited"}; + var inheritedType = new ContentType(baseType, contentTypeAlias) { Alias = contentTypeAlias, Name = "Inherited" }; contentTypeService.Save(baseType); contentTypeService.Save(inheritedType); createContentTypes = false; } - #region setup xml content + xmlContent = @" - ]> "; - #endregion + } } } diff --git a/src/Umbraco.Tests/Scheduling/BackgroundTaskRunnerTests.cs b/src/Umbraco.Tests/Scheduling/BackgroundTaskRunnerTests.cs index aacb056346..7eb4442541 100644 --- a/src/Umbraco.Tests/Scheduling/BackgroundTaskRunnerTests.cs +++ b/src/Umbraco.Tests/Scheduling/BackgroundTaskRunnerTests.cs @@ -15,7 +15,7 @@ namespace Umbraco.Tests.Scheduling [Timeout(30000)] public class BackgroundTaskRunnerTests { - private ILogger _logger; + private ILogger _logger; [TestFixtureSetUp] public void InitializeFixture() @@ -93,7 +93,7 @@ namespace Umbraco.Tests.Scheduling { runner.Add(new MyTask()); }); - } + } } [Test] @@ -242,7 +242,7 @@ namespace Umbraco.Tests.Scheduling } } - + [Test] public void Create_IsNotRunning() { @@ -252,16 +252,18 @@ namespace Umbraco.Tests.Scheduling } } - + [Test] public async void Create_AutoStart_IsRunning() { using (var runner = new BackgroundTaskRunner(new BackgroundTaskRunnerOptions { - AutoStart = true + AutoStart = true, + KeepAlive = true // else stops! }, _logger)) { Assert.IsTrue(runner.IsRunning); // because AutoStart is true + runner.Stop(false); // keepalive = must be stopped await runner.StoppedAwaitable; // runner stops, within test's timeout } } @@ -296,7 +298,7 @@ namespace Umbraco.Tests.Scheduling // so that we don't have a runaway task in tests, etc - but it does NOT terminate // the runner - it really is NOT a nice way to end a runner - it's there for tests } - + [Test] public void Startup_KeepAlive_IsRunning() { @@ -359,7 +361,7 @@ namespace Umbraco.Tests.Scheduling } } - + [Test] public async void WaitOnRunner_Tasks() { @@ -504,7 +506,7 @@ namespace Umbraco.Tests.Scheduling //wait till the thread is done await tManager.CurrentThreadingTask; - + foreach (var task in tasks) { Assert.IsTrue(task.Ended != default(DateTime)); @@ -516,7 +518,7 @@ namespace Umbraco.Tests.Scheduling } } - + [Test] public void RecurringTaskTest() { @@ -532,7 +534,7 @@ namespace Umbraco.Tests.Scheduling }; var task = new MyRecurringTask(runner, 200, 500); - + runner.Add(task); Assert.IsTrue(runner.IsRunning); // waiting on delay @@ -577,7 +579,7 @@ namespace Umbraco.Tests.Scheduling runner.Add(task); Assert.IsTrue(runner.IsRunning); Thread.Sleep(5000); - Assert.IsTrue(runner.IsRunning); // still waiting for the task to release + Assert.IsTrue(runner.IsRunning); // still waiting for the task to release Assert.IsFalse(task.HasRun); runner.Shutdown(false, false); await runner.StoppedAwaitable; // wait for the entire runner operation to complete @@ -585,7 +587,7 @@ namespace Umbraco.Tests.Scheduling } } - + [Test] public void LatchedRecurring() { @@ -842,7 +844,7 @@ namespace Umbraco.Tests.Scheduling } public override bool PerformRun() - { + { Thread.Sleep(_runMilliseconds); return true; // repeat } @@ -976,7 +978,7 @@ namespace Umbraco.Tests.Scheduling public virtual Task RunAsync(CancellationToken token) { throw new NotImplementedException(); - //return Task.Delay(500); + //return Task.Delay(500); } public virtual bool IsAsync diff --git a/src/Umbraco.Web/PublishedContentExtensions.cs b/src/Umbraco.Web/PublishedContentExtensions.cs index 38666dadb9..213d46ceb7 100644 --- a/src/Umbraco.Web/PublishedContentExtensions.cs +++ b/src/Umbraco.Web/PublishedContentExtensions.cs @@ -639,23 +639,9 @@ namespace Umbraco.Web /// When true, recurses up the content type tree to check inheritance; when false just calls IsDocumentType(this IPublishedContent content, string docTypeAlias). /// True if the content is of the specified content type or a derived content type; otherwise false. public static bool IsDocumentType(this IPublishedContent content, string docTypeAlias, bool recursive) - { - if (content.IsDocumentType(docTypeAlias)) - return true; - - if (recursive) - return IsDocumentTypeRecursive(content, docTypeAlias); - return false; - } - - private static bool IsDocumentTypeRecursive(IPublishedContent content, string docTypeAlias) - { - var contentTypeService = UmbracoContext.Current.Application.Services.ContentTypeService; - var type = contentTypeService.GetContentType(content.DocumentTypeAlias); - if (type.Alias.InvariantEquals(docTypeAlias) || content.IsComposedOf(docTypeAlias)) - return true; - return false; - } + { + return content.DocumentTypeAlias.InvariantEquals(docTypeAlias) || (recursive && content.IsComposedOf(docTypeAlias)); + } public static bool IsNull(this IPublishedContent content, string alias, bool recurse) { From e0c891719fd95ca7b6707000fa4729354d610b7d Mon Sep 17 00:00:00 2001 From: akierczynska Date: Mon, 24 Jul 2017 00:04:11 +0100 Subject: [PATCH 11/13] Update pl.xml to match en.xml Updating pl.xml with new keys to match en.xml --- src/Umbraco.Web.UI/umbraco/config/lang/pl.xml | 86 ++++++++++++++++++- 1 file changed, 83 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/pl.xml b/src/Umbraco.Web.UI/umbraco/config/lang/pl.xml index 30e4f3039c..e1af9412a3 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/pl.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/pl.xml @@ -177,6 +177,8 @@ także do obecnego węzła, o ile poniższa domena również do niego należy.]] Cel Oznacza to następującą godzinę na serwerze: Co to oznacza?]]> + Dodaj kolejne pole tekstowe + Usuń te pole tekstowe Kliknij, aby załadować plik @@ -304,6 +306,7 @@ także do obecnego węzła, o ile poniższa domena również do niego należy.]] Link do strony Otwórz zlinkowany dokument w nowym oknie lub zakładce Link do mediów + Link do plików Wybierz media Wybierz ikonę Wybierz element @@ -323,6 +326,7 @@ także do obecnego węzła, o ile poniższa domena również do niego należy.]] Odlinkuj swój konto Wybierz edytora + Wybierz snippet Powiązane arkusze stylów Pokaż etykietę Szerokość i wysokość + Wszystkie typy właściwości & dane właściwości + używające tego typu danych zostaną usunięte na zawsze, potwierdź, że chcesz je także usunąć + Tak, usuń + i wszystkie typy właściwości & dane właściwości używające tego typu danych/key> + Wybierz folder do przeniesienia + do w strukturze drzewa poniżej + został przeniesiony poniżej Dane zostały zapisane, lecz wystąpiły błędy, które musisz poprawić przed publikacją strony: @@ -438,6 +449,7 @@ Możesz dodać dodatkowe języki w menu "Języki" po lewej stronie.]]> Zamknij okno Komentarz Potwierdzenie + Zachowaj Zachowaj proporcje Kontynuuj Kopiuj @@ -449,6 +461,7 @@ Możesz dodać dodatkowe języki w menu "Języki" po lewej stronie.]]> Usunięto Usuwanie... Wygląd + Słownik Rozmiary Dół Pobierz @@ -458,6 +471,7 @@ Możesz dodać dodatkowe języki w menu "Języki" po lewej stronie.]]> Email Błąd Znajdź + Pierwszy Wysokość Pomoc Ikona @@ -468,7 +482,8 @@ Możesz dodać dodatkowe języki w menu "Języki" po lewej stronie.]]> Nieprawidłowe Wyrównaj Język - układ + Ostatni + Układ Ładowanie Zablokowany Zaloguj @@ -495,9 +510,11 @@ Możesz dodać dodatkowe języki w menu "Języki" po lewej stronie.]]> E-mail, aby otrzymywać dane z formularzy Kosz Pozostało + Usuń Zmień nazwę Odnów Wymagany + Odzyskaj Ponów próbę Uprawnienia Szukaj @@ -806,6 +823,39 @@ Naciśnij przycisk instaluj, aby zainstalować bazę danych Umb Wskaż pakiet z Twojego komputera, poprzez kliknięcie na przycisk "Przeglądaj"
    i wskaż gdzie jest zapisany. Pakiety Umbraco przeważnie posiadają rozszerzenie ".umb" lub ".zip". ]]> + Upuść, aby załadować + lub kliknij tutaj, aby wybrać pliki + Załaduj pakiet + Zainstaluj lokalny pakiet poprzez wybranie go ze swojego komputera. Instaluj jedynie te pakiety, z zaufanych i znanych Tobie źródeł + Załaduj kolejny pakiet + Anuluj i załaduj kolejny pakiet + Licencja + Zgadzam się + zasady użytkowania + Zainstaluj pakiet + Zakończ + Zainstalowane pakiety + Nie masz żadnych zainstalowanych pakietów + 'Pakiety' w prawym górnym rogu ekranu]]> + Szukaj pakietów + Wyniki dla + Nie mogliśmy znaleźć niczego dla + Spróbuj wyszukać kolejny pakiet lub przeszukaj kategorie pakietów + Popularne + Nowe wydania + ma + punktów karmy + Informacja + Właściciel + Kontrybutor + Utworzone + Obecna wersja + wersja .NET + Pobrania + Polubienia + Zgodność + Według raportów członków społeczności, ten pakiet jest zgodny z następującymi wersjami Umbraco. Pełna zgodność nie może być zagwarantowana dla wersji zaraportowanych poniżej 100% + Zewnętrzne źródła Autor Demonstracja Dokumentacja @@ -841,6 +891,7 @@ Naciśnij przycisk instaluj, aby zainstalować bazę danych Umb Restartowanie, proszę czekać... Wszystko skończone, Twoja przeglądarka się teraz odświeży, proszę czekać... Proszę kliknąć Zakończ, aby zakończyć instalację i przeładować stronę. + Wgrywanie pakietu... Wklej z zachowaniem formatowania (Nie zalecane) @@ -908,6 +959,10 @@ Naciśnij przycisk instaluj, aby zainstalować bazę danych Umb Resetuj + Zdefiniuj przycięcie + Ustaw alias dla przycięcia, a także jego domyślną szerokość i długość + Zapisz przycięcie + Dodaj nowe przycięcie Aktualna wersja @@ -1116,6 +1171,7 @@ Naciśnij przycisk instaluj, aby zainstalować bazę danych Umb Konstruktor zapytań + Zbuduj zapytanie Element zwrócony, w Chcę @@ -1261,25 +1317,36 @@ Naciśnij przycisk instaluj, aby zainstalować bazę danych Umb + Dodaj pole zastępcze + Pole zastępcze + Dodaj domyślną wartość + Domyślna wartość Pole alternatywne Tekst alternatywny Wielkość liter Kodowanie Wybierz pole Konwertuj złamania wiersza + Tak, konwertuj złamania wiersza Zamienia złamania wiersza na html-tag <br> Niestandardowe Pola Tak, tylko data + Format i kodowanie Formatuj jako datę + Formatuj wartość jako datę lub jako datę i czas, zgodnie z aktywną kulturą Kodowanie HTML Zamienia znaki specjalne na ich odpowiedniki HTML Zostanie wstawione za wartością pola Zostanie wstawione przed wartością pola małe znaki + Modyfikuj dane wyjściowe Nic + Próbka danych wyjściowych Wstaw za polem Wstaw przed polem Rekurencyjne + Tak, spraw, aby było to rekurencyjne + Separator Standardowe Pola Wielkie litery Kodowanie URL @@ -1429,6 +1496,14 @@ Naciśnij przycisk instaluj, aby zainstalować bazę danych Umb Waliduj jako URL ...lub wpisz niestandardową walidację Pole jest wymagane + Wprowadź wyrażenie regularne + Musisz dodać przynajmniej + Możesz mieć jedynie + elementy + wybrane elementy + Niepoprawna data + To nie jest numer + Niepoprawny e-mail