From 50c8a2631df19e258cb4cd6534eba7739faa11fc Mon Sep 17 00:00:00 2001 From: Lombiq Date: Sat, 4 Jun 2016 16:46:30 +0200 Subject: [PATCH 1/7] Adding "/m" switch to MSBuild in ClickToBuild.cmd and Deploy.cmd. Fixes #6936. It allows running independent project builds in parallel by using more than one cores. Signed-off-by: Benedek Farkas --- ClickToBuild.cmd | 2 +- deploy.cmd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ClickToBuild.cmd b/ClickToBuild.cmd index 53e1c8d6c..1907d736b 100644 --- a/ClickToBuild.cmd +++ b/ClickToBuild.cmd @@ -31,6 +31,6 @@ IF "%solution%" == "" SET solution=src\Orchard.sln lib\nuget\nuget.exe restore %solution% -msbuild /t:%target% %project% /p:Solution=%solution% +msbuild /t:%target% %project% /p:Solution=%solution% /m pause \ No newline at end of file diff --git a/deploy.cmd b/deploy.cmd index 151965c59..610d2348e 100644 --- a/deploy.cmd +++ b/deploy.cmd @@ -72,7 +72,7 @@ call :ExecuteCmd nuget restore "%DEPLOYMENT_SOURCE%\src\Orchard.sln" IF !ERRORLEVEL! NEQ 0 goto error :: 2. Build to the temporary path -call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\Orchard.proj" /t:Precompiled /v:m +call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\Orchard.proj" /t:Precompiled /v:m /m IF !ERRORLEVEL! NEQ 0 goto error :: 3. KuduSync From 161a2e3204afb3ea35264ebb65a7e6a790594771 Mon Sep 17 00:00:00 2001 From: Lombiq Date: Sat, 11 Jun 2016 16:26:34 +0200 Subject: [PATCH 2/7] Fixing a typo in the Module.txt of Orchard.Warmup --- src/Orchard.Web/Modules/Orchard.Warmup/Module.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Orchard.Web/Modules/Orchard.Warmup/Module.txt b/src/Orchard.Web/Modules/Orchard.Warmup/Module.txt index 9e970c6b0..f991e8cd2 100644 --- a/src/Orchard.Web/Modules/Orchard.Warmup/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.Warmup/Module.txt @@ -4,6 +4,6 @@ Author: The Orchard Team Website: http://orchardproject.net Version: 1.10.1 OrchardVersion: 1.9 -Description: Provides a mecanism to generate a static version of pages for being used during application warm up. +Description: Provides a mechanism to generate a static version of pages for being used during application warm up. FeatureDescription: Generates the static version of specific pages periodically. Category: Hosting From af35f1387cf493bb31fcc0edcf6a098d9bb08ace Mon Sep 17 00:00:00 2001 From: Lombiq Date: Mon, 13 Jun 2016 16:11:22 +0200 Subject: [PATCH 3/7] Orchard.Framework.csproj: Fixing file inclusion syntax by removing unnecessary properties --- src/Orchard/Orchard.Framework.csproj | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/Orchard/Orchard.Framework.csproj b/src/Orchard/Orchard.Framework.csproj index 9b469678e..c975aff46 100644 --- a/src/Orchard/Orchard.Framework.csproj +++ b/src/Orchard/Orchard.Framework.csproj @@ -933,9 +933,7 @@ - - ASPXCodeBehind - + @@ -1015,9 +1013,7 @@ - - ASPXCodeBehind - + From a8d4440c2e4973eee57efe063e318f18dbfb6175 Mon Sep 17 00:00:00 2001 From: Sebastien Ros Date: Tue, 14 Jun 2016 11:06:33 -0700 Subject: [PATCH 4/7] Encoding error messages for custom forms widgets. --- .../Orchard.CustomForms/Controllers/ItemController.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Orchard.Web/Modules/Orchard.CustomForms/Controllers/ItemController.cs b/src/Orchard.Web/Modules/Orchard.CustomForms/Controllers/ItemController.cs index ee278e0df..a9ed5c39a 100644 --- a/src/Orchard.Web/Modules/Orchard.CustomForms/Controllers/ItemController.cs +++ b/src/Orchard.Web/Modules/Orchard.CustomForms/Controllers/ItemController.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Web; using System.Web.Mvc; using Orchard.ContentManagement; using Orchard.ContentManagement.Aspects; @@ -126,14 +127,14 @@ namespace Orchard.CustomForms.Controllers { _contentManager.Create(contentItem, VersionOptions.Draft); var model = _contentManager.UpdateEditor(contentItem, this); - + if (!ModelState.IsValid) { _transactionManager.Cancel(); // if custom form is inside a widget, we display the form itself if (form.ContentType == "CustomFormWidget") { foreach (var error in ModelState.Values.SelectMany(m => m.Errors).Select(e => e.ErrorMessage)) { - Services.Notifier.Error(T(error)); + Services.Notifier.Error(new LocalizedString(HttpUtility.HtmlEncode(error))); } // save the updated editor shape into TempData to survive a redirection and keep the edited values From 3e2b5d5b8288e45bc8810fc4610b34432e0b8ace Mon Sep 17 00:00:00 2001 From: Lombiq Date: Thu, 16 Jun 2016 19:01:07 +0200 Subject: [PATCH 5/7] Upgrading FluentNHibernate so it's sync with other assemblies to prevent exceptions when running tests. Fixes #6933. --- src/Orchard.Core.Tests/Orchard.Core.Tests.csproj | 4 ++-- src/Orchard.Core.Tests/packages.config | 2 +- src/Orchard.Specs/Orchard.Specs.csproj | 4 ++-- src/Orchard.Specs/packages.config | 2 +- src/Orchard.Tests.Modules/Orchard.Tests.Modules.csproj | 4 ++-- src/Orchard.Tests.Modules/packages.config | 2 +- src/Orchard.Tests/Orchard.Framework.Tests.csproj | 4 ++-- src/Orchard.Tests/packages.config | 2 +- .../Orchard.Azure.MediaServices.csproj | 4 ++-- .../Modules/Orchard.Azure.MediaServices/packages.config | 2 +- .../Tests/Orchard.Projections.Tests.csproj | 4 ++-- .../Modules/Orchard.Projections/Tests/packages.config | 2 +- src/Orchard/Orchard.Framework.csproj | 4 ++-- src/Orchard/packages.config | 2 +- 14 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/Orchard.Core.Tests/Orchard.Core.Tests.csproj b/src/Orchard.Core.Tests/Orchard.Core.Tests.csproj index 7aa4ca540..040ebdb03 100644 --- a/src/Orchard.Core.Tests/Orchard.Core.Tests.csproj +++ b/src/Orchard.Core.Tests/Orchard.Core.Tests.csproj @@ -61,8 +61,8 @@ ..\packages\Autofac.3.5.2\lib\net40\Autofac.dll True - - ..\packages\FluentNHibernate.1.4.0.0\lib\net35\FluentNHibernate.dll + + ..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll True diff --git a/src/Orchard.Core.Tests/packages.config b/src/Orchard.Core.Tests/packages.config index acebfbf18..60de4ba33 100644 --- a/src/Orchard.Core.Tests/packages.config +++ b/src/Orchard.Core.Tests/packages.config @@ -1,7 +1,7 @@  - + diff --git a/src/Orchard.Specs/Orchard.Specs.csproj b/src/Orchard.Specs/Orchard.Specs.csproj index 40369c752..86092833a 100644 --- a/src/Orchard.Specs/Orchard.Specs.csproj +++ b/src/Orchard.Specs/Orchard.Specs.csproj @@ -65,8 +65,8 @@ ..\packages\Castle.Core.3.3.1\lib\net45\Castle.Core.dll True - - ..\packages\FluentNHibernate.1.4.0.0\lib\net35\FluentNHibernate.dll + + ..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll True diff --git a/src/Orchard.Specs/packages.config b/src/Orchard.Specs/packages.config index 41efafd72..0d97f7f46 100644 --- a/src/Orchard.Specs/packages.config +++ b/src/Orchard.Specs/packages.config @@ -2,7 +2,7 @@ - + diff --git a/src/Orchard.Tests.Modules/Orchard.Tests.Modules.csproj b/src/Orchard.Tests.Modules/Orchard.Tests.Modules.csproj index 6facc97e1..b925ef7d1 100644 --- a/src/Orchard.Tests.Modules/Orchard.Tests.Modules.csproj +++ b/src/Orchard.Tests.Modules/Orchard.Tests.Modules.csproj @@ -65,8 +65,8 @@ ..\packages\Castle.Core.3.3.1\lib\net45\Castle.Core.dll True - - ..\packages\FluentNHibernate.1.4.0.0\lib\net35\FluentNHibernate.dll + + ..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll True diff --git a/src/Orchard.Tests.Modules/packages.config b/src/Orchard.Tests.Modules/packages.config index 52f90a8e3..e95871a90 100644 --- a/src/Orchard.Tests.Modules/packages.config +++ b/src/Orchard.Tests.Modules/packages.config @@ -3,7 +3,7 @@ - + diff --git a/src/Orchard.Tests/Orchard.Framework.Tests.csproj b/src/Orchard.Tests/Orchard.Framework.Tests.csproj index c433d1879..bd2734006 100644 --- a/src/Orchard.Tests/Orchard.Framework.Tests.csproj +++ b/src/Orchard.Tests/Orchard.Framework.Tests.csproj @@ -69,8 +69,8 @@ ..\packages\Castle.Core.3.3.1\lib\net45\Castle.Core.dll True - - ..\packages\FluentNHibernate.1.4.0.0\lib\net35\FluentNHibernate.dll + + ..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll True diff --git a/src/Orchard.Tests/packages.config b/src/Orchard.Tests/packages.config index a2dd05b2f..c43cb3d10 100644 --- a/src/Orchard.Tests/packages.config +++ b/src/Orchard.Tests/packages.config @@ -3,7 +3,7 @@ - + diff --git a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Orchard.Azure.MediaServices.csproj b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Orchard.Azure.MediaServices.csproj index 520eff940..0a28395b9 100644 --- a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Orchard.Azure.MediaServices.csproj +++ b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Orchard.Azure.MediaServices.csproj @@ -48,8 +48,8 @@ false - - ..\..\..\packages\FluentNHibernate.1.4.0.0\lib\net35\FluentNHibernate.dll + + ..\..\..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll True diff --git a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/packages.config b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/packages.config index 8428ab4a8..1e2280491 100644 --- a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/packages.config +++ b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/packages.config @@ -1,6 +1,6 @@  - + diff --git a/src/Orchard.Web/Modules/Orchard.Projections/Tests/Orchard.Projections.Tests.csproj b/src/Orchard.Web/Modules/Orchard.Projections/Tests/Orchard.Projections.Tests.csproj index b68e36283..7343992e2 100644 --- a/src/Orchard.Web/Modules/Orchard.Projections/Tests/Orchard.Projections.Tests.csproj +++ b/src/Orchard.Web/Modules/Orchard.Projections/Tests/Orchard.Projections.Tests.csproj @@ -39,8 +39,8 @@ ..\..\..\..\packages\Autofac.3.5.2\lib\net40\Autofac.dll True - - ..\..\..\..\packages\FluentNHibernate.1.4.0.0\lib\net35\FluentNHibernate.dll + + ..\..\..\..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll True diff --git a/src/Orchard.Web/Modules/Orchard.Projections/Tests/packages.config b/src/Orchard.Web/Modules/Orchard.Projections/Tests/packages.config index a86dc6c98..c9898a6c3 100644 --- a/src/Orchard.Web/Modules/Orchard.Projections/Tests/packages.config +++ b/src/Orchard.Web/Modules/Orchard.Projections/Tests/packages.config @@ -1,7 +1,7 @@  - + diff --git a/src/Orchard/Orchard.Framework.csproj b/src/Orchard/Orchard.Framework.csproj index c975aff46..02187c3eb 100644 --- a/src/Orchard/Orchard.Framework.csproj +++ b/src/Orchard/Orchard.Framework.csproj @@ -71,8 +71,8 @@ ..\packages\Castle.Core.3.3.1\lib\net45\Castle.Core.dll True - - ..\packages\FluentNHibernate.1.4.0.0\lib\net35\FluentNHibernate.dll + + ..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll True diff --git a/src/Orchard/packages.config b/src/Orchard/packages.config index c25a4d246..2a043ca44 100644 --- a/src/Orchard/packages.config +++ b/src/Orchard/packages.config @@ -3,7 +3,7 @@ - + From a5ac956b6a3490539b496f2602ee1d1ac13ce2cf Mon Sep 17 00:00:00 2001 From: Alex Petryakov Date: Thu, 16 Jun 2016 22:52:51 +0300 Subject: [PATCH 6/7] Fixes a selected path issue This fixes an issue where the selected path is being looked for by comparing string-based urls. It now selects the most nested url. #6899 --- src/Orchard/UI/Navigation/NavigationHelper.cs | 27 ++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/src/Orchard/UI/Navigation/NavigationHelper.cs b/src/Orchard/UI/Navigation/NavigationHelper.cs index b6cb0faa8..2ab551c97 100644 --- a/src/Orchard/UI/Navigation/NavigationHelper.cs +++ b/src/Orchard/UI/Navigation/NavigationHelper.cs @@ -84,6 +84,12 @@ namespace Orchard.UI.Navigation { var path = SetSelectedPath(menuItems, currentRequest, currentRouteData, false) ?? SetSelectedPath(menuItems, currentRequest, currentRouteData, true); + if(path != null) { + foreach(var menuItem in path) { + menuItem.Selected = true; + } + } + return path; } @@ -96,12 +102,17 @@ namespace Orchard.UI.Navigation { /// Should compare raw string URLs instead of route data. /// A stack with the selection path being the last node the currently selected one. private static Stack SetSelectedPath(IEnumerable menuItems, HttpRequestBase currentRequest, RouteValueDictionary currentRouteData, bool compareUrls) { + var selectedPaths = new List>(); foreach (MenuItem menuItem in menuItems) { Stack selectedPath = SetSelectedPath(menuItem.Items, currentRequest, currentRouteData, compareUrls); if (selectedPath != null) { - menuItem.Selected = true; selectedPath.Push(menuItem); - return selectedPath; + if (compareUrls) { + selectedPaths.Add(selectedPath); + } + else { + return selectedPath; + } } // compare route values (if any) first @@ -122,15 +133,19 @@ namespace Orchard.UI.Navigation { } if (match) { - menuItem.Selected = true; - selectedPath = new Stack(); selectedPath.Push(menuItem); - return selectedPath; + + if (compareUrls) { + selectedPaths.Add(selectedPath); + } + else { + return selectedPath; + } } } - return null; + return selectedPaths.OrderByDescending(p => p.First().Href.Split('/').Length).FirstOrDefault(); } /// From 0a06a788b2546301478c59872dafb6fda81ef260 Mon Sep 17 00:00:00 2001 From: Sipke Schoorstra Date: Thu, 16 Jun 2016 21:55:07 +0200 Subject: [PATCH 7/7] Renamed private method in NavigationHelper. --- src/Orchard/UI/Navigation/NavigationHelper.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Orchard/UI/Navigation/NavigationHelper.cs b/src/Orchard/UI/Navigation/NavigationHelper.cs index 2ab551c97..eb0803219 100644 --- a/src/Orchard/UI/Navigation/NavigationHelper.cs +++ b/src/Orchard/UI/Navigation/NavigationHelper.cs @@ -81,8 +81,8 @@ namespace Orchard.UI.Navigation { /// A stack with the selection path being the last node the currently selected one. public static Stack SetSelectedPath(IEnumerable menuItems, HttpRequestBase currentRequest, RouteValueDictionary currentRouteData) { // doing route data comparison first and if that fails, fallback to string-based URL lookup - var path = SetSelectedPath(menuItems, currentRequest, currentRouteData, false) - ?? SetSelectedPath(menuItems, currentRequest, currentRouteData, true); + var path = GetSelectedPath(menuItems, currentRequest, currentRouteData, false) + ?? GetSelectedPath(menuItems, currentRequest, currentRouteData, true); if(path != null) { foreach(var menuItem in path) { @@ -101,10 +101,10 @@ namespace Orchard.UI.Navigation { /// The current route data. /// Should compare raw string URLs instead of route data. /// A stack with the selection path being the last node the currently selected one. - private static Stack SetSelectedPath(IEnumerable menuItems, HttpRequestBase currentRequest, RouteValueDictionary currentRouteData, bool compareUrls) { + private static Stack GetSelectedPath(IEnumerable menuItems, HttpRequestBase currentRequest, RouteValueDictionary currentRouteData, bool compareUrls) { var selectedPaths = new List>(); foreach (MenuItem menuItem in menuItems) { - Stack selectedPath = SetSelectedPath(menuItem.Items, currentRequest, currentRouteData, compareUrls); + Stack selectedPath = GetSelectedPath(menuItem.Items, currentRequest, currentRouteData, compareUrls); if (selectedPath != null) { selectedPath.Push(menuItem); if (compareUrls) {