mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-04-05 21:01:35 +08:00
Merge remote-tracking branch 'origin/1.10.x' into dev
# Conflicts: # Orchard.proj
This commit is contained in:
commit
ef6c7b4d3f
@ -282,7 +282,6 @@
|
||||
<!-- Packaging (MsDeploy) -->
|
||||
<Target Name="Package-MsDeploy">
|
||||
<ItemGroup>
|
||||
<!--<MsDeploy-Folder-Input Include="$(StageFolder)\**\*" Exclude="$(StageFolder)\**\bin\**\*.pdb;$(StageFolder)\**\bin\**\*.xml" />-->
|
||||
|
||||
<MsDeploy-Exclude-Modules Include="
|
||||
$(StageFolder)\**\Modules\Orchard.CustomForms\**;
|
||||
@ -293,7 +292,7 @@
|
||||
$(StageFolder)\**\Modules\Orchard.TaskLease\**;
|
||||
" />
|
||||
|
||||
<MsDeploy-Folder-Input Include="$(StageFolder)\**\*" Exclude="$(StageFolder)\**\bin\**\*.xml;$(StageFolder)\**\obj\**\*;@(MsDeploy-Exclude-Modules)" />
|
||||
<MsDeploy-Folder-Input Include="$(StageFolder)\**\*" Exclude="$(StageFolder)\**\bin\**\*.xml;$(StageFolder)\**\obj\**\*;$(StageFolder)\**\bin\**\*.pdb;$(StageFolder)\**\bin\**\*.dll.config;@(MsDeploy-Exclude-Modules)" />
|
||||
<MsDeploy-Parameters Include="$(LibFolder)\msdeploy\*.xml;$(LibFolder)\msdeploy\*.sql"/>
|
||||
</ItemGroup>
|
||||
|
||||
@ -337,7 +336,7 @@
|
||||
|
||||
<Zip-Stage Include="$(StageFolder)\**\*" />
|
||||
|
||||
<Zip-MsDeploy Include="$(MsDeployFolder)\**\*" Exclude="$(MSBuildProjectDirectory)\**\bin\**\*.pdb;" />
|
||||
<Zip-MsDeploy Include="$(MsDeployFolder)\**\*" Exclude=""/>
|
||||
|
||||
<Zip-Source Include="
|
||||
$(MSBuildProjectDirectory)\lib\**\*;
|
||||
|
@ -320,7 +320,6 @@
|
||||
<Compile Include="Localization\DateTimePartsTests.cs" />
|
||||
<Compile Include="Localization\DefaultDateLocalizationServicesTests.cs" />
|
||||
<Compile Include="Localization\DefaultDateFormatterTests.cs" />
|
||||
<Compile Include="Services\YamlParserTests.cs" />
|
||||
<Compile Include="Stubs\StubApplicationEnvironment.cs" />
|
||||
<Compile Include="Stubs\StubCultureSelector.cs" />
|
||||
<Compile Include="Localization\TestHelpers.cs" />
|
||||
|
@ -1,70 +0,0 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using NUnit.Framework;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Orchard.Services;
|
||||
|
||||
namespace Orchard.Tests.Services {
|
||||
|
||||
[TestFixture]
|
||||
public class YamlParserTests {
|
||||
|
||||
[Test]
|
||||
public void ShouldConvertYamlToWellknowType() {
|
||||
var parser = new YamlParser();
|
||||
var yaml = SampleYamlDocument;
|
||||
|
||||
var order = parser.Deserialize<Order>(yaml);
|
||||
|
||||
Assert.AreEqual("Nikola", order.Customer.FirstName);
|
||||
Assert.AreEqual(2, order.Items.Count);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ShouldConvertYamlToDynamic()
|
||||
{
|
||||
var parser = new YamlParser();
|
||||
var yaml = SampleYamlDocument;
|
||||
|
||||
var order = parser.Deserialize(yaml);
|
||||
|
||||
Assert.AreEqual("Nikola", (string)order.Customer.FirstName);
|
||||
Assert.AreEqual(2, (int)order.Items.Count);
|
||||
}
|
||||
|
||||
public class Order {
|
||||
public DateTime Date { get; set; }
|
||||
public Customer Customer { get; set; }
|
||||
public IList<OrderItem> Items { get; set; }
|
||||
}
|
||||
|
||||
public class OrderItem {
|
||||
public string Product { get; set; }
|
||||
public int Quantity { get; set; }
|
||||
public decimal Price { get; set; }
|
||||
}
|
||||
|
||||
public class Customer {
|
||||
public string FirstName { get; set; }
|
||||
public string LastName { get; set; }
|
||||
|
||||
}
|
||||
|
||||
private const string SampleYamlDocument =
|
||||
@"
|
||||
Date: 1916-04-01
|
||||
Customer:
|
||||
FirstName: Nikola
|
||||
LastName: Tesla
|
||||
Items:
|
||||
- Product: Bulb
|
||||
Quantity: 1
|
||||
Price: 1.46
|
||||
|
||||
- Product: Wire
|
||||
Quantity: 1
|
||||
Price: 0.32
|
||||
";
|
||||
}
|
||||
}
|
@ -213,10 +213,6 @@
|
||||
<Project>{d10ad48f-407d-4db5-a328-173ec7cb010f}</Project>
|
||||
<Name>Orchard.Roles</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Orchard.TaskLease\Orchard.TaskLease.csproj">
|
||||
<Project>{3f72a4e9-7b72-4260-b010-c16ec54f9baf}</Project>
|
||||
<Name>Orchard.TaskLease</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Orchard.Users\Orchard.Users.csproj">
|
||||
<Project>{79aed36e-abd0-4747-93d3-8722b042454b}</Project>
|
||||
<Name>Orchard.Users</Name>
|
||||
|
@ -32,6 +32,6 @@ using System.Security;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: AssemblyVersion("1.10")]
|
||||
[assembly: AssemblyFileVersion("1.10")]
|
||||
|
||||
|
@ -28,7 +28,7 @@ namespace Orchard.AuditTrail.Services {
|
||||
var totalCount = query.List().Count;
|
||||
|
||||
query.SetFirstResult((page - 1) * pageSize);
|
||||
query.SetFetchSize(pageSize);
|
||||
query.SetMaxResults(pageSize);
|
||||
|
||||
var contentItems = LoadContentItems<T>(query);
|
||||
|
||||
|
@ -307,10 +307,6 @@
|
||||
<Project>{c889167c-e52c-4a65-a419-224b3d1b957d}</Project>
|
||||
<Name>Orchard.PublishLater</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Orchard.TaskLease\Orchard.TaskLease.csproj">
|
||||
<Project>{3f72a4e9-7b72-4260-b010-c16ec54f9baf}</Project>
|
||||
<Name>Orchard.TaskLease</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Controllers\AssetController.cs" />
|
||||
|
@ -32,6 +32,6 @@ using System.Security;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: AssemblyVersion("1.10")]
|
||||
[assembly: AssemblyFileVersion("1.10")]
|
||||
|
||||
|
@ -32,6 +32,6 @@ using System.Security;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: AssemblyVersion("1.10")]
|
||||
[assembly: AssemblyFileVersion("1.10")]
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
.orchard-contenttypes #main h2 {
|
||||
margin:42px 0 0;
|
||||
border-bottom:1px solid #ccc;
|
||||
margin: 42px 0 0;
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.orchard-contenttypes .summary .properties h3 {
|
||||
@ -12,67 +12,100 @@
|
||||
}
|
||||
|
||||
#main .properties p {
|
||||
margin:0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.manage.add-to-type {
|
||||
margin-top:-32px;
|
||||
margin-top: -32px;
|
||||
}
|
||||
.manage-part {
|
||||
margin-bottom:1em;
|
||||
|
||||
.manage-part, .manage-field {
|
||||
margin-bottom: 0;
|
||||
padding:0;
|
||||
border-bottom: 1px solid #EAEAEA;
|
||||
}
|
||||
|
||||
.manage-part h3,
|
||||
.manage-field h3 {
|
||||
border-bottom:1px solid #EAEAEA;
|
||||
display:relative;
|
||||
line-height:1.4em;
|
||||
padding-bottom:0;
|
||||
padding-top:0;
|
||||
display: relative;
|
||||
line-height: 1.4em;
|
||||
padding-bottom: 0;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.manage-part h3,
|
||||
.manage-field h3,
|
||||
.manage-part h4,
|
||||
.manage-type .manage-field .details,
|
||||
.manage-type .manage-part .manage-field,
|
||||
.manage-type .manage-part .settings {
|
||||
padding-left:20px;
|
||||
padding-left: 30px;
|
||||
padding-right: 30px;
|
||||
}
|
||||
|
||||
.manage-part h3, .manage-field h3 {
|
||||
margin: 1em 0 !important;
|
||||
padding-left: 30px;
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
.manage-part .expando-glyph, .manage-field .expando-glyph {
|
||||
width:16px;
|
||||
height:16px;
|
||||
}
|
||||
|
||||
.manage-type .manage-field .settings {
|
||||
padding-bottom:10px;
|
||||
padding-left:0;
|
||||
padding-bottom: 10px;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.manage-part h4 {
|
||||
padding-left:0;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.manage-part .manage-field h4 {
|
||||
line-height:1.8em;
|
||||
padding-bottom:0;
|
||||
padding-left:15px;
|
||||
line-height: 1.8em;
|
||||
padding-bottom: 0;
|
||||
padding-left: 15px;
|
||||
}
|
||||
|
||||
.manage-part .settings #content {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.manage-type .manage-part .manage,
|
||||
.manage-type .manage-field .manage,
|
||||
.manage-part .manage-field .manage {
|
||||
margin-top:-2.4em;
|
||||
margin-top: -2.9em;
|
||||
padding-right: 20px;
|
||||
position: relative;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.manage-field .details,
|
||||
.manage-part .details {
|
||||
overflow:auto;
|
||||
overflow: auto;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.manage-part .manage.minor {
|
||||
margin:0 0 -1.2em;
|
||||
margin: 0 0 -1.2em;
|
||||
}
|
||||
|
||||
.manage-part label,
|
||||
.manage-field label {
|
||||
font-weight:normal;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.manage-field fieldset,
|
||||
.manage-part fieldset {
|
||||
margin:.5em 0 1em;
|
||||
padding:0;
|
||||
margin: .5em 0 1em;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.manage-field .settings {
|
||||
margin:0 0 0 15px;
|
||||
padding-left:0;
|
||||
margin: 0 0 0 15px;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.manage-part .description {
|
||||
@ -82,48 +115,56 @@
|
||||
}
|
||||
|
||||
.manage-part .settings {
|
||||
overflow:auto;
|
||||
}
|
||||
.manage-part .settings fieldset {
|
||||
padding-left:0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.manage-part .settings fieldset {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
fieldset.action {
|
||||
margin-top:2em;
|
||||
margin-top: 2em;
|
||||
}
|
||||
|
||||
/* should pull this back into the base admin theme css, w/out the .manage-part of course */
|
||||
.manage-part dl {
|
||||
margin:0 0 1em;
|
||||
overflow:auto;
|
||||
padding:6px 0 0;
|
||||
margin: 0 0 1em;
|
||||
overflow: auto;
|
||||
padding: 6px 0 0;
|
||||
}
|
||||
|
||||
.manage-part dt,
|
||||
.manage-part dd {
|
||||
float:left;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.manage-part dt {
|
||||
clear:left;
|
||||
}
|
||||
.manage-part dt::after {
|
||||
content:":";
|
||||
clear: left;
|
||||
}
|
||||
|
||||
.manage-part dt::after {
|
||||
content: ":";
|
||||
}
|
||||
|
||||
.manage-part dd {
|
||||
font-style:italic;
|
||||
padding-left:.5em;
|
||||
font-style: italic;
|
||||
padding-left: .5em;
|
||||
}
|
||||
|
||||
.manage-part dl dl {
|
||||
font-size:1em;
|
||||
margin:0;
|
||||
padding:0;
|
||||
font-size: 1em;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.manage-part dd dt {
|
||||
clear:left;
|
||||
float:left;
|
||||
clear: left;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.manage-part dd dd {
|
||||
float:left;
|
||||
padding-left:.5em;
|
||||
float: left;
|
||||
padding-left: .5em;
|
||||
}
|
||||
|
||||
.available-parts .part.hint {
|
||||
@ -147,7 +188,7 @@ fieldset.action {
|
||||
background-color: #eee;
|
||||
background: #EEE url(images/move.gif) no-repeat 10px 15px;
|
||||
height: 30px;
|
||||
padding: 10px 0px 0px 30px;
|
||||
padding: 10px 0px 0px 30px;
|
||||
}
|
||||
|
||||
#placement li .shape-editor {
|
||||
@ -160,9 +201,8 @@ fieldset.action {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
#placement fieldset
|
||||
{
|
||||
float: inherit; /* prevent bad layout if float is defined to left in specific parts, e.g. datetimepicker */
|
||||
#placement fieldset {
|
||||
float: inherit; /* prevent bad layout if float is defined to left in specific parts, e.g. datetimepicker */
|
||||
height: auto;
|
||||
}
|
||||
|
||||
@ -170,4 +210,4 @@ fieldset.action {
|
||||
background: #FDF5BC;
|
||||
border: 1px solid #FDF5BC;
|
||||
height: 100px;
|
||||
}
|
||||
}
|
||||
|
@ -32,6 +32,6 @@ using System.Security;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: AssemblyVersion("1.10")]
|
||||
[assembly: AssemblyFileVersion("1.10")]
|
||||
|
||||
|
@ -34,8 +34,14 @@ namespace Orchard.DynamicForms.Drivers {
|
||||
Name: "Value",
|
||||
Title: "Value",
|
||||
Classes: new[] { "text", "medium", "tokenized" },
|
||||
Description: T("The value of this radio button.")));
|
||||
|
||||
Description: T("The value of this radio button.")),
|
||||
_DefaultValue:
|
||||
shape.Checkbox(
|
||||
Id: "DefaultValue",
|
||||
Name: "DefaultValue",
|
||||
Title: "Default Value",
|
||||
Value: "true",
|
||||
Description: T("Sets default value to unchecked or checked.")));
|
||||
return form;
|
||||
});
|
||||
}
|
||||
|
@ -1,7 +1,14 @@
|
||||
namespace Orchard.DynamicForms.Elements {
|
||||
using Orchard.Layouts.Elements;
|
||||
using Orchard.Layouts.Helpers;
|
||||
|
||||
namespace Orchard.DynamicForms.Elements {
|
||||
public class RadioButton : LabeledFormElement {
|
||||
public override string ToolboxIcon {
|
||||
get { return "\uf192"; }
|
||||
}
|
||||
public bool DefaultValue {
|
||||
get { return this.Retrieve(x => x.DefaultValue); }
|
||||
set { this.Store(x => x.DefaultValue, value); }
|
||||
}
|
||||
}
|
||||
}
|
@ -32,6 +32,6 @@ using System.Security;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: AssemblyVersion("1.10")]
|
||||
[assembly: AssemblyFileVersion("1.10")]
|
||||
|
||||
|
@ -7,6 +7,9 @@
|
||||
tagBuilder.Attributes["type"] = "radio";
|
||||
tagBuilder.Attributes["name"] = element.Name;
|
||||
tagBuilder.Attributes["value"] = element.Value;
|
||||
if (element.DefaultValue) {
|
||||
tagBuilder.Attributes["checked"] = "checked";
|
||||
}
|
||||
}
|
||||
@if (element.ShowLabel) {
|
||||
<label>
|
||||
|
@ -7,6 +7,9 @@
|
||||
tagBuilder.Attributes["type"] = "radio";
|
||||
tagBuilder.Attributes["name"] = Model.ProcessedName;
|
||||
tagBuilder.Attributes["value"] = Model.ProcessedValue;
|
||||
if ((String.IsNullOrWhiteSpace(element.PostedValue) && element.DefaultValue) || Model.ProcessedValue == element.PostedValue) {
|
||||
tagBuilder.Attributes["checked"] = "checked";
|
||||
}
|
||||
}
|
||||
@if (element.ShowLabel) {
|
||||
<label>
|
||||
|
@ -102,6 +102,14 @@
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="YamlDotNet, Version=3.8.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\YamlDotNet.3.8.0\lib\net35\YamlDotNet.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="YamlDotNet.Dynamic, Version=3.2.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\YamlDotNet.Dynamic.3.2.3\lib\net40\YamlDotNet.Dynamic.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Assets\JavaScript\Models\RecycleBin.js" />
|
||||
|
@ -32,6 +32,6 @@ using System.Security;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: AssemblyVersion("1.10")]
|
||||
[assembly: AssemblyFileVersion("1.10")]
|
||||
|
||||
|
@ -17,10 +17,10 @@ using Orchard.Layouts.Services;
|
||||
using Orchard.Layouts.Shapes;
|
||||
using Orchard.Layouts.ViewModels;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Services;
|
||||
using Orchard.Themes.Services;
|
||||
using Orchard.Tokens;
|
||||
using Orchard.Utility.Extensions;
|
||||
using YamlDotNet.Dynamic;
|
||||
|
||||
namespace Orchard.Layouts.Providers {
|
||||
[OrchardFeature("Orchard.Layouts.Snippets")]
|
||||
@ -34,7 +34,6 @@ namespace Orchard.Layouts.Providers {
|
||||
private readonly Work<ICurrentThemeShapeBindingResolver> _currentThemeShapeBindingResolver;
|
||||
private readonly Work<ITokenizer> _tokenizer;
|
||||
private readonly IWorkContextAccessor _wca;
|
||||
private readonly Work<IYamlParser> _yamlParser;
|
||||
|
||||
public SnippetElementHarvester(
|
||||
IWorkContextAccessor workContextAccessor,
|
||||
@ -44,8 +43,7 @@ namespace Orchard.Layouts.Providers {
|
||||
Work<IElementFactory> elementFactory,
|
||||
Work<IShapeDisplay> shapeDisplay,
|
||||
Work<ITokenizer> tokenizer,
|
||||
Work<ICurrentThemeShapeBindingResolver> currentThemeShapeBindingResolver,
|
||||
Work<IYamlParser> yamlParser) {
|
||||
Work<ICurrentThemeShapeBindingResolver> currentThemeShapeBindingResolver) {
|
||||
|
||||
_shapeFactory = shapeFactory;
|
||||
_siteThemeService = siteThemeService;
|
||||
@ -54,7 +52,6 @@ namespace Orchard.Layouts.Providers {
|
||||
_shapeDisplay = shapeDisplay;
|
||||
_tokenizer = tokenizer;
|
||||
_currentThemeShapeBindingResolver = currentThemeShapeBindingResolver;
|
||||
_yamlParser = yamlParser;
|
||||
_wca = workContextAccessor;
|
||||
}
|
||||
|
||||
@ -149,7 +146,7 @@ namespace Orchard.Layouts.Providers {
|
||||
return null;
|
||||
|
||||
var yaml = File.ReadAllText(paramsFileName);
|
||||
var snippetConfig = _yamlParser.Value.Deserialize(yaml);
|
||||
var snippetConfig = Deserialize(yaml);
|
||||
var fieldsConfig = snippetConfig.Fields != null ? snippetConfig.Fields.Children : new dynamic[0];
|
||||
var descriptor = new SnippetDescriptor();
|
||||
|
||||
@ -202,5 +199,9 @@ namespace Orchard.Layouts.Providers {
|
||||
var markup = File.ReadAllText(localFileName);
|
||||
return markup.Contains("@Html.SnippetField");
|
||||
}
|
||||
|
||||
private dynamic Deserialize(string yaml) {
|
||||
return new DynamicYaml(yaml);
|
||||
}
|
||||
}
|
||||
}
|
@ -7,4 +7,6 @@
|
||||
<package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net452" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net452" />
|
||||
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net452" />
|
||||
<package id="YamlDotNet" version="3.8.0" targetFramework="net452" />
|
||||
<package id="YamlDotNet.Dynamic" version="3.2.3" targetFramework="net452" />
|
||||
</packages>
|
@ -379,12 +379,17 @@ $(function () {
|
||||
var nextFetch = self.folderPath();
|
||||
|
||||
if (deepestChildPath !== undefined && deepestChildPath !== null && (deepestChildPath.indexOf(self.folderPath()) === 0)) {
|
||||
var deepestChildPathBreadCrumbs = deepestChildPath.split('\\');
|
||||
var currentBreadCrumbs = self.folderPath().split('\\');
|
||||
/* NTFS uses "\" as the directory separator, but AFS uses "/".
|
||||
Since both of them are illegal characters for file and folder names, it's safe to determine the type of file storage
|
||||
currently in use based on the directory separator character. */
|
||||
var separator = deepestChildPath.contains('/') ? '/' : '\\';
|
||||
|
||||
var deepestChildPathBreadCrumbs = deepestChildPath.split(separator);
|
||||
var currentBreadCrumbs = self.folderPath().split(separator);
|
||||
|
||||
var diff = deepestChildPathBreadCrumbs.length - currentBreadCrumbs.length;
|
||||
if (diff > 0) {
|
||||
nextFetch = self.folderPath() + '\\' + deepestChildPathBreadCrumbs[deepestChildPathBreadCrumbs.length - diff];
|
||||
nextFetch = self.folderPath() + separator + deepestChildPathBreadCrumbs[deepestChildPathBreadCrumbs.length - diff];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -133,6 +133,14 @@ namespace Orchard.MediaLibrary.Services {
|
||||
/// <param name="inputStream">The stream with the file's contents.</param>
|
||||
/// <returns>The path to the uploaded file.</returns>
|
||||
string UploadMediaFile(string folderPath, string fileName, Stream inputStream);
|
||||
|
||||
/// <summary>
|
||||
/// Combines two paths.
|
||||
/// </summary>
|
||||
/// <param name="path1">The parent path.</param>
|
||||
/// <param name="path2">The child path.</param>
|
||||
/// <returns>The combined path.</returns>
|
||||
string Combine(string path1, string path2);
|
||||
}
|
||||
|
||||
public static class MediaLibrayServiceExtensions {
|
||||
@ -145,8 +153,8 @@ namespace Orchard.MediaLibrary.Services {
|
||||
return true;
|
||||
}
|
||||
|
||||
var mediaPath = folderPath + "\\";
|
||||
var rootPath = rootMediaFolder.MediaPath + "\\";
|
||||
var mediaPath = service.Combine(folderPath, " ").Trim();
|
||||
var rootPath = service.Combine(rootMediaFolder.MediaPath, " ").Trim();
|
||||
|
||||
return mediaPath.StartsWith(rootPath, StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
@ -154,7 +162,7 @@ namespace Orchard.MediaLibrary.Services {
|
||||
public static string GetRootedFolderPath(this IMediaLibraryService service, string folderPath) {
|
||||
var rootMediaFolder = service.GetRootMediaFolder();
|
||||
if (rootMediaFolder != null) {
|
||||
return Path.Combine(rootMediaFolder.MediaPath, folderPath ?? "");
|
||||
return service.Combine(rootMediaFolder.MediaPath, folderPath ?? "");
|
||||
}
|
||||
|
||||
return folderPath;
|
||||
|
@ -441,5 +441,15 @@ namespace Orchard.MediaLibrary.Services {
|
||||
|
||||
return _storageProvider.GetPublicUrl(filePath);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Combines two paths.
|
||||
/// </summary>
|
||||
/// <param name="path1">The parent path.</param>
|
||||
/// <param name="path2">The child path.</param>
|
||||
/// <returns>The combined path.</returns>
|
||||
public string Combine(string path1, string path2) {
|
||||
return _storageProvider.Combine(path1, path2);
|
||||
}
|
||||
}
|
||||
}
|
@ -32,6 +32,6 @@ using System.Security;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: AssemblyVersion("1.10")]
|
||||
[assembly: AssemblyFileVersion("1.10")]
|
||||
|
||||
|
@ -32,6 +32,6 @@ using System.Security;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: AssemblyVersion("1.10")]
|
||||
[assembly: AssemblyFileVersion("1.10")]
|
||||
|
||||
|
@ -32,6 +32,6 @@ using System.Security;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: AssemblyVersion("1.10")]
|
||||
[assembly: AssemblyFileVersion("1.10")]
|
||||
|
||||
|
@ -5,6 +5,7 @@ using Orchard.ContentManagement;
|
||||
using Orchard.Environment.Extensions;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Security;
|
||||
using Orchard.Users.Events;
|
||||
using Orchard.Users.Models;
|
||||
using Orchard.Workflows.Models;
|
||||
using Orchard.Workflows.Services;
|
||||
@ -14,10 +15,12 @@ namespace Orchard.Users.Activities {
|
||||
public class SignInUserActivity : Task {
|
||||
private readonly IMembershipService _membershipService;
|
||||
private readonly IAuthenticationService _authenticationService;
|
||||
private readonly IUserEventHandler _userEventHandler;
|
||||
|
||||
public SignInUserActivity(IMembershipService membershipService, IAuthenticationService authenticationService) {
|
||||
public SignInUserActivity(IMembershipService membershipService, IAuthenticationService authenticationService, IUserEventHandler userEventHandler) {
|
||||
_membershipService = membershipService;
|
||||
_authenticationService = authenticationService;
|
||||
_userEventHandler = userEventHandler;
|
||||
T = NullLocalizer.Instance;
|
||||
}
|
||||
|
||||
@ -66,7 +69,9 @@ namespace Orchard.Users.Activities {
|
||||
yield break;
|
||||
}
|
||||
|
||||
_userEventHandler.LoggingIn(userNameOrEmail, password);
|
||||
_authenticationService.SignIn(user, createPersistentCookie);
|
||||
_userEventHandler.LoggedIn(user);
|
||||
|
||||
yield return T("Done");
|
||||
}
|
||||
|
@ -267,7 +267,7 @@
|
||||
</RootBinFiles>
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<ExcludeFilesFromDeployment>@(RootBinFiles->'Modules\**\bin\%(Filename)%(Extension)');@(RootBinFiles->'Themes\**\%(Filename)%(Extension)');@(RootBinFiles->'Core\**\bin\%(Filename)%(Extension)');**\*.Debug.config;**\*.Release.config;**\obj\**;**\bin\*.xml;**\*.cs;**\*.csproj;Modules\**\Tests\**;Modules\**\Specs\**;Themes\bin\**;**\.hgignore;**\.hgtags;**\.hg\**;**\.gitignore;**\.git\**;**\*.csproj.user;Properties\**\*;App_Data\Dependencies\*;App_Data\RecipeQueue\*;App_Data\Logs\*;App_Data\**\mappings.bin;App_Data\**\cache.dat;App_Data\**\hrestart.txt</ExcludeFilesFromDeployment>
|
||||
<ExcludeFilesFromDeployment>@(RootBinFiles->'Modules\**\bin\%(Filename)%(Extension)');@(RootBinFiles->'Themes\**\%(Filename)%(Extension)');@(RootBinFiles->'Core\**\bin\%(Filename)%(Extension)');**\*.Debug.config;**\*.Release.config;**\obj\**;**\bin\*.xml;**\bin\*.pdb;**\bin\*.dll.config;**\*.cs;**\*.csproj;Modules\**\Tests\**;Modules\**\Specs\**;Themes\bin\**;**\.hgignore;**\.hgtags;**\.hg\**;**\.gitignore;**\.git\**;**\*.csproj.user;Properties\**\*;App_Data\Dependencies\*;App_Data\RecipeQueue\*;App_Data\Logs\*;App_Data\**\mappings.bin;App_Data\**\cache.dat;App_Data\**\hrestart.txt</ExcludeFilesFromDeployment>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
<Target Name="ExcludeRootBinariesPackage" DependsOnTargets="ExcludeRootBinariesDeployment" BeforeTargets="ExcludeFilesFromPackage">
|
||||
|
BIN
src/Orchard.Web/Themes/TheAdmin/Styles/images/menu-closed.png
Normal file
BIN
src/Orchard.Web/Themes/TheAdmin/Styles/images/menu-closed.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 183 B |
BIN
src/Orchard.Web/Themes/TheAdmin/Styles/images/menu-open.png
Normal file
BIN
src/Orchard.Web/Themes/TheAdmin/Styles/images/menu-open.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 197 B |
@ -456,8 +456,7 @@ ul.menuItems {margin:6px 0 0 0;}
|
||||
position:relative;
|
||||
}
|
||||
.expando-glyph {
|
||||
background:#fcfcfc no-repeat center center;
|
||||
background-image:url(data:image/gif;base64,R0lGODlhCwALAKIFAPDz2/b70mhpREJEPjI0Lf///wAAAAAAACH/C1hNUCBEYXRhWE1QPD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W9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEAQAABQAsAAAAAAsACwAAAx1YutxeIbYIghBgWVwA4daQKZ4QjkspPsD6dG8sJwA7);
|
||||
background-image: url("images/menu-open.png");
|
||||
/*url("images/menuOpen.gif")*/
|
||||
bottom:0;
|
||||
cursor:pointer;
|
||||
@ -469,18 +468,12 @@ ul.menuItems {margin:6px 0 0 0;}
|
||||
width:17px;
|
||||
-webkit-transform:rotate(0deg);
|
||||
}
|
||||
.expando-glyph:hover {
|
||||
background-image:url(data:image/gif;base64,R0lGODlhCwALAJEDAB5dfcbVyMvbwf///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxucz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CcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEAQAAAwAsAAAAAAsACwAAAhqcj6kjnR0EAOFIOsKstxoNdAmIKZq3oMvKFgA7);
|
||||
/*url("images/menuOpenHover.gif");*/
|
||||
}
|
||||
|
||||
.expando-glyph-container.closed .expando-glyph {
|
||||
background-image:url(data:image/gif;base64,R0lGODlhCwALAKIFAPDz2/b70mhpREJEPjI0Lf///wAAAAAAACH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIgeG1wTU06T3JpZ2luYWxEb2N1bWVudElEPSJ4bXAuZGlkOjJDNDlGNjgyMjg5NERGMTE4RUZGQkY0Q0JCRDA3OTc2IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkY2OEJCRkEyOTQyODExREY5ODMwQkQwQjI2MEMzREUwIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkY2OEJCRkExOTQyODExREY5ODMwQkQwQjI2MEMzREUwIiB4bXA6Q3JlYXRvclRvb2w9IkFkb2JlIFBob3Rvc2hvcCBDUzUgV2luZG93cyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjJENDlGNjgyMjg5NERGMTE4RUZGQkY0Q0JCRDA3OTc2IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjJDNDlGNjgyMjg5NERGMTE4RUZGQkY0Q0JCRDA3OTc2Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEAQAABQAsAAAAAAsACwAAAx1YBaD+QbTn4pi0WEx3Vh4FCASnjGUWpar0acGXAAA7);
|
||||
background-image:url("images/menu-closed.png");
|
||||
/*url("images/menuClosed.gif");*/
|
||||
}
|
||||
.expando-glyph-container.closed .expando-glyph:hover {
|
||||
background-image:url(data:image/gif;base64,R0lGODlhCwALAJEDAB5dfcbVyMvbwf///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEu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srGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEAQAAAwAsAAAAAAsACwAAAhrcEqYrkKuagxFMOuSjmga7Kd/FgFgTMgJWAAA7);
|
||||
/*url("images/menuClosedHover.gif");*/
|
||||
}
|
||||
|
||||
.expando-glyph-container.closing .expando-glyph {
|
||||
-webkit-transition:all .2s ease-in-out;
|
||||
-moz-transition:all .2s ease-in-out;
|
||||
|
@ -102,8 +102,10 @@
|
||||
<Content Include="TheAdmin\Styles\images\icon-gallery.png" />
|
||||
<Content Include="TheAdmin\Styles\images\icon-settings.png" />
|
||||
<Content Include="TheAdmin\Styles\images\info.gif" />
|
||||
<Content Include="TheAdmin\Styles\images\menu-closed.png" />
|
||||
<Content Include="TheAdmin\Styles\images\menu-default.png" />
|
||||
<Content Include="TheAdmin\Styles\images\menu-glyph.png" />
|
||||
<Content Include="TheAdmin\Styles\images\menu-open.png" />
|
||||
<Content Include="TheAdmin\Styles\images\menuClosed.gif" />
|
||||
<Content Include="TheAdmin\Styles\images\menuClosedHover.gif" />
|
||||
<Content Include="TheAdmin\Styles\images\menuOpen.gif" />
|
||||
|
@ -170,10 +170,6 @@
|
||||
<HintPath>..\packages\YamlDotNet.3.8.0\lib\net35\YamlDotNet.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="YamlDotNet.Dynamic, Version=3.2.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\YamlDotNet.Dynamic.3.2.3\lib\net40\YamlDotNet.Dynamic.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ContentManagement\Extensions\DriverResultExtensions.cs" />
|
||||
@ -427,9 +423,7 @@
|
||||
<Compile Include="Services\ClientHostAddressAccessor.cs" />
|
||||
<Compile Include="Services\DefaultJsonConverter.cs" />
|
||||
<Compile Include="Services\IClientHostAddressAccessor.cs" />
|
||||
<Compile Include="Services\IYamlParser.cs" />
|
||||
<Compile Include="Services\IJsonConverter.cs" />
|
||||
<Compile Include="Services\YamlParser.cs" />
|
||||
<Compile Include="Settings\CurrentSiteWorkContext.cs" />
|
||||
<Compile Include="Settings\ResourceDebugMode.cs" />
|
||||
<Compile Include="Tasks\Locking\Services\DistributedLockSchemaBuilder.cs" />
|
||||
|
@ -93,6 +93,7 @@ namespace Orchard.Security.Providers {
|
||||
httpContext.Response.Cookies.Add(cookie);
|
||||
|
||||
_isAuthenticated = true;
|
||||
_isNonOrchardUser = false;
|
||||
_signedInUser = user;
|
||||
}
|
||||
|
||||
@ -117,6 +118,7 @@ namespace Orchard.Security.Providers {
|
||||
public void SetAuthenticatedUserForRequest(IUser user) {
|
||||
_signedInUser = user;
|
||||
_isAuthenticated = true;
|
||||
_isNonOrchardUser = false;
|
||||
}
|
||||
|
||||
public IUser GetAuthenticatedUser() {
|
||||
|
@ -1,21 +0,0 @@
|
||||
namespace Orchard.Services {
|
||||
/// <summary>
|
||||
/// Provides methods to deserialize objects from YAML documents.
|
||||
/// </summary>
|
||||
public interface IYamlParser : IDependency {
|
||||
/// <summary>
|
||||
/// Deserializes a YAML document to a dynamic object.
|
||||
/// </summary>
|
||||
/// <param name="yaml">The YAML document to deserialize.</param>
|
||||
/// <returns>The deserialized object.</returns>
|
||||
dynamic Deserialize(string yaml);
|
||||
|
||||
/// <summary>
|
||||
/// Deserializes a YAML document to a specific object.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of the object to deserialize.</typeparam>
|
||||
/// <param name="yaml">The YAML document to deserialize.</param>
|
||||
/// <returns>The deserialized object.</returns>
|
||||
T Deserialize<T>(string yaml);
|
||||
}
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
using System.IO;
|
||||
using YamlDotNet.Dynamic;
|
||||
using YamlDotNet.Serialization;
|
||||
using YamlDotNet.Serialization.NamingConventions;
|
||||
|
||||
namespace Orchard.Services {
|
||||
public class YamlParser : IYamlParser {
|
||||
public dynamic Deserialize(string yaml) {
|
||||
return new DynamicYaml(yaml);
|
||||
}
|
||||
|
||||
public T Deserialize<T>(string yaml) {
|
||||
var deserializer = new Deserializer(namingConvention: new PascalCaseNamingConvention(), ignoreUnmatched: true);
|
||||
using (var reader = new StringReader(yaml)) {
|
||||
return deserializer.Deserialize<T>(reader);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -89,7 +89,7 @@ namespace Orchard.Tasks.Locking.Services {
|
||||
DistributedLock dLock = null;
|
||||
|
||||
// If there's already a distributed lock object in our dictionary, that means
|
||||
// this acquisition is a reentrance. Use the existing lock object from the
|
||||
// this acquisition is a reentrance. Use the existing lock object from the
|
||||
// dictionary but increment its count.
|
||||
if (_locks.TryGetValue(monitorObj, out dLock)) {
|
||||
Logger.Debug("Current thread is re-entering lock '{0}'; incrementing count.", internalName);
|
||||
@ -141,9 +141,18 @@ namespace Orchard.Tasks.Locking.Services {
|
||||
|
||||
ExecuteOnSeparateTransaction(repository => {
|
||||
// Try to find a valid lock record in the database.
|
||||
var record = repository.Table.FirstOrDefault(x => x.Name == internalName && (x.ValidUntilUtc == null || x.ValidUntilUtc >= _clock.UtcNow));
|
||||
var records = repository.Table.Where(x => x.Name == internalName).ToList();
|
||||
var record = records.FirstOrDefault(x => x.ValidUntilUtc == null || x.ValidUntilUtc >= _clock.UtcNow);
|
||||
if (record == null) {
|
||||
// No record existed, so we're good to create a new one.
|
||||
|
||||
// No record matched the criteria, but at least one expired record with the specified name was found.
|
||||
// Delete the expired records before creating a new one. In theory no more than one record can exist
|
||||
// due to the unique key constraint on the 'Name' column, it won't hurt to work on a collection.
|
||||
foreach (var expiredRecord in records) {
|
||||
repository.Delete(expiredRecord);
|
||||
}
|
||||
|
||||
// No valid record existed, so we're good to create a new one.
|
||||
Logger.Debug("No valid record was found for lock '{0}'; creating a new record.", internalName);
|
||||
|
||||
repository.Create(new DistributedLockRecord {
|
||||
|
@ -18,5 +18,4 @@
|
||||
<package id="NHibernate" version="4.0.1.4000" targetFramework="net452" />
|
||||
<package id="Owin" version="1.0" targetFramework="net452" />
|
||||
<package id="YamlDotNet" version="3.8.0" targetFramework="net452" />
|
||||
<package id="YamlDotNet.Dynamic" version="3.2.3" targetFramework="net452" />
|
||||
</packages>
|
Loading…
Reference in New Issue
Block a user