Merge branch '1.10.x' into dev

This commit is contained in:
Sipke Schoorstra 2016-06-17 23:24:01 +02:00
commit 83f02b26b6
19 changed files with 54 additions and 42 deletions

View File

@ -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

View File

@ -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

View File

@ -61,8 +61,8 @@
<HintPath>..\packages\Autofac.3.5.2\lib\net40\Autofac.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FluentNHibernate, Version=1.4.0.0, Culture=neutral, PublicKeyToken=8aa435e3cb308880, processorArchitecture=MSIL">
<HintPath>..\packages\FluentNHibernate.1.4.0.0\lib\net35\FluentNHibernate.dll</HintPath>
<Reference Include="FluentNHibernate, Version=2.0.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Iesi.Collections, Version=4.0.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Autofac" version="3.5.2" targetFramework="net452" />
<package id="FluentNHibernate" version="1.4.0.0" targetFramework="net452" />
<package id="FluentNHibernate" version="2.0.3.0" targetFramework="net452" />
<package id="Iesi.Collections" version="4.0.1.4000" targetFramework="net452" />
<package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net452" />
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net452" />

View File

@ -65,8 +65,8 @@
<HintPath>..\packages\Castle.Core.3.3.1\lib\net45\Castle.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FluentNHibernate, Version=1.4.0.0, Culture=neutral, PublicKeyToken=8aa435e3cb308880, processorArchitecture=MSIL">
<HintPath>..\packages\FluentNHibernate.1.4.0.0\lib\net35\FluentNHibernate.dll</HintPath>
<Reference Include="FluentNHibernate, Version=2.0.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FluentPath, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">

View File

@ -2,7 +2,7 @@
<packages>
<package id="Autofac" version="3.5.2" targetFramework="net452" />
<package id="Castle.Core" version="3.3.1" targetFramework="net452" />
<package id="FluentNHibernate" version="1.4.0.0" targetFramework="net452" />
<package id="FluentNHibernate" version="2.0.3.0" targetFramework="net452" />
<package id="HtmlAgilityPack" version="1.4.9" targetFramework="net452" />
<package id="Iesi.Collections" version="4.0.1.4000" targetFramework="net452" />
<package id="log4net" version="2.0.3" targetFramework="net452" />

View File

@ -65,8 +65,8 @@
<HintPath>..\packages\Castle.Core.3.3.1\lib\net45\Castle.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FluentNHibernate, Version=1.4.0.0, Culture=neutral, PublicKeyToken=8aa435e3cb308880, processorArchitecture=MSIL">
<HintPath>..\packages\FluentNHibernate.1.4.0.0\lib\net35\FluentNHibernate.dll</HintPath>
<Reference Include="FluentNHibernate, Version=2.0.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FluentPath, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">

View File

@ -3,7 +3,7 @@
<package id="Autofac" version="3.5.2" targetFramework="net452" />
<package id="Castle.Core" version="3.3.1" targetFramework="net452" />
<package id="DotNetZip" version="1.9.1.8" targetFramework="net452" />
<package id="FluentNHibernate" version="1.4.0.0" targetFramework="net452" />
<package id="FluentNHibernate" version="2.0.3.0" targetFramework="net452" />
<package id="Iesi.Collections" version="4.0.1.4000" targetFramework="net452" />
<package id="IronRuby" version="1.1.3" targetFramework="net452" />
<package id="Lucene.Net" version="3.0.3" targetFramework="net452" />

View File

@ -69,8 +69,8 @@
<HintPath>..\packages\Castle.Core.3.3.1\lib\net45\Castle.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FluentNHibernate, Version=1.4.0.0, Culture=neutral, PublicKeyToken=8aa435e3cb308880, processorArchitecture=MSIL">
<HintPath>..\packages\FluentNHibernate.1.4.0.0\lib\net35\FluentNHibernate.dll</HintPath>
<Reference Include="FluentNHibernate, Version=2.0.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Iesi.Collections, Version=4.0.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">

View File

@ -3,7 +3,7 @@
<package id="Autofac" version="3.5.2" targetFramework="net452" />
<package id="Autofac.Web" version="3.2.0" targetFramework="net452" />
<package id="Castle.Core" version="3.3.1" targetFramework="net452" />
<package id="FluentNHibernate" version="1.4.0.0" targetFramework="net452" />
<package id="FluentNHibernate" version="2.0.3.0" targetFramework="net452" />
<package id="Iesi.Collections" version="4.0.1.4000" targetFramework="net452" />
<package id="IronRuby" version="1.1.3" targetFramework="net452" />
<package id="log4net" version="2.0.3" targetFramework="net452" />

View File

@ -48,8 +48,8 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="FluentNHibernate, Version=1.4.0.0, Culture=neutral, PublicKeyToken=8aa435e3cb308880, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\FluentNHibernate.1.4.0.0\lib\net35\FluentNHibernate.dll</HintPath>
<Reference Include="FluentNHibernate, Version=2.0.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="HtmlAgilityPack, Version=1.4.9.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL">

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="FluentNHibernate" version="1.4.0.0" targetFramework="net452" />
<package id="FluentNHibernate" version="2.0.3.0" targetFramework="net452" />
<package id="HtmlAgilityPack" version="1.4.9" targetFramework="net452" />
<package id="Iesi.Collections" version="4.0.1.4000" targetFramework="net452" />
<package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net452" />

View File

@ -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

View File

@ -39,8 +39,8 @@
<HintPath>..\..\..\..\packages\Autofac.3.5.2\lib\net40\Autofac.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FluentNHibernate, Version=1.4.0.0, Culture=neutral, PublicKeyToken=8aa435e3cb308880, processorArchitecture=MSIL">
<HintPath>..\..\..\..\packages\FluentNHibernate.1.4.0.0\lib\net35\FluentNHibernate.dll</HintPath>
<Reference Include="FluentNHibernate, Version=2.0.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Iesi.Collections, Version=4.0.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Autofac" version="3.5.2" targetFramework="net452" />
<package id="FluentNHibernate" version="1.4.0.0" targetFramework="net452" />
<package id="FluentNHibernate" version="2.0.3.0" targetFramework="net452" />
<package id="Iesi.Collections" version="4.0.1.4000" targetFramework="net452" />
<package id="Moq" version="4.2.1510.2205" targetFramework="net452" />
<package id="NHibernate" version="4.0.1.4000" targetFramework="net452" />

View File

@ -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

View File

@ -71,8 +71,8 @@
<HintPath>..\packages\Castle.Core.3.3.1\lib\net45\Castle.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FluentNHibernate, Version=1.4.0.0, Culture=neutral, PublicKeyToken=8aa435e3cb308880, processorArchitecture=MSIL">
<HintPath>..\packages\FluentNHibernate.1.4.0.0\lib\net35\FluentNHibernate.dll</HintPath>
<Reference Include="FluentNHibernate, Version=2.0.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Iesi.Collections, Version=4.0.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
@ -933,9 +933,7 @@
<Compile Include="Mvc\Routes\UrlPrefix.cs" />
<Compile Include="Mvc\Routes\UrlPrefixAdjustedHttpContext.cs" />
<Compile Include="Mvc\Routes\ShellRoute.cs" />
<Compile Include="Mvc\ViewUserControl.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Mvc\ViewUserControl.cs" />
<Compile Include="Mvc\Wrappers\HttpContextBaseWrapper.cs" />
<Compile Include="Mvc\Wrappers\HttpRequestBaseWrapper.cs" />
<Compile Include="Mvc\Wrappers\HttpResponseBaseWrapper.cs" />
@ -1015,9 +1013,7 @@
<Compile Include="UI\Resources\LinkEntry.cs" />
<Compile Include="UI\Resources\ResourceFilter.cs" />
<Compile Include="UI\Resources\ResourceManager.cs" />
<Compile Include="Mvc\ViewPage.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Mvc\ViewPage.cs" />
<Compile Include="Security\IAuthenticationService.cs" />
<Compile Include="Security\Authorizer.cs" />
<Compile Include="Security\Providers\FormsAuthenticationService.cs" />

View File

@ -81,8 +81,14 @@ namespace Orchard.UI.Navigation {
/// <returns>A stack with the selection path being the last node the currently selected one.</returns>
public static Stack<MenuItem> SetSelectedPath(IEnumerable<MenuItem> 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) {
menuItem.Selected = true;
}
}
return path;
}
@ -95,13 +101,18 @@ namespace Orchard.UI.Navigation {
/// <param name="currentRouteData">The current route data.</param>
/// <param name="compareUrls">Should compare raw string URLs instead of route data.</param>
/// <returns>A stack with the selection path being the last node the currently selected one.</returns>
private static Stack<MenuItem> SetSelectedPath(IEnumerable<MenuItem> menuItems, HttpRequestBase currentRequest, RouteValueDictionary currentRouteData, bool compareUrls) {
private static Stack<MenuItem> GetSelectedPath(IEnumerable<MenuItem> menuItems, HttpRequestBase currentRequest, RouteValueDictionary currentRouteData, bool compareUrls) {
var selectedPaths = new List<Stack<MenuItem>>();
foreach (MenuItem menuItem in menuItems) {
Stack<MenuItem> selectedPath = SetSelectedPath(menuItem.Items, currentRequest, currentRouteData, compareUrls);
Stack<MenuItem> selectedPath = GetSelectedPath(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<MenuItem>();
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();
}
/// <summary>

View File

@ -3,7 +3,7 @@
<package id="Autofac" version="3.5.2" targetFramework="net452" />
<package id="Autofac.Configuration" version="3.3.0" targetFramework="net452" />
<package id="Castle.Core" version="3.3.1" targetFramework="net452" />
<package id="FluentNHibernate" version="1.4.0.0" targetFramework="net452" />
<package id="FluentNHibernate" version="2.0.3.0" targetFramework="net452" />
<package id="Iesi.Collections" version="4.0.1.4000" targetFramework="net452" />
<package id="log4net" version="2.0.3" targetFramework="net452" />
<package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net452" />