mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-04-05 21:01:35 +08:00
Merge branch '1.10.x-to-dev' into dev
This commit is contained in:
commit
c35bdb2389
.github/workflows
CREDITS.txtREADME.mdsrc
Orchard.Specs
Orchard.Tests.Modules
Orchard.Tests
Orchard.Web.Tests
Orchard.Web
Core
Modules
Orchard.AntiSpam
Orchard.AuditTrail
Orchard.Azure.MediaServices
Orchard.Azure
Orchard.CodeGeneration
Orchard.ContentPreview
Orchard.DynamicForms
Orchard.Email
Orchard.Fields
Orchard.Forms
Orchard.Glimpse
Orchard.JobsQueue
Orchard.Layouts
Orchard.Media
Orchard.MediaLibrary.WebSearch
Orchard.MediaLibrary
Orchard.OpenId
Orchard.Projections
Orchard.Redis
Orchard.Resources
Orchard.Roles
Orchard.Taxonomies
Orchard.Workflows
Upgrade
Orchard
24
.github/workflows/compile.yml
vendored
24
.github/workflows/compile.yml
vendored
@ -27,11 +27,33 @@ jobs:
|
|||||||
uses: microsoft/setup-msbuild@v2
|
uses: microsoft/setup-msbuild@v2
|
||||||
|
|
||||||
- name: Compile
|
- name: Compile
|
||||||
run: msbuild Orchard.proj /m /v:minimal /t:Compile /p:MvcBuildViews=true /p:TreatWarningsAsErrors=true -WarnAsError
|
run: msbuild Orchard.proj /m /v:minimal /t:Compile /p:TreatWarningsAsErrors=true -WarnAsError /p:MvcBuildViews=true
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: msbuild Orchard.proj /m /v:minimal /t:Test
|
run: msbuild Orchard.proj /m /v:minimal /t:Test
|
||||||
|
|
||||||
|
- name: Run Orchard setup
|
||||||
|
run: |
|
||||||
|
$commandFile = 'src/Orchard.Web/bin/setup-commands.txt'
|
||||||
|
New-Item -Path $commandFile -ItemType File -Force
|
||||||
|
Set-Content -Path $commandFile -Value 'setup /SiteName:Orchard /AdminUsername:admin /AdminPassword:Password1! /DatabaseProvider:SqlCe /Recipe:Default'
|
||||||
|
& 'src/Orchard.Web/bin/Orchard.exe' @$commandFile
|
||||||
|
|
||||||
|
- name: Run code generation
|
||||||
|
run: |
|
||||||
|
$commandFile = 'src/Orchard.Web/bin/codegen-commands.txt'
|
||||||
|
New-Item -Path $commandFile -ItemType File -Force
|
||||||
|
Set-Content -Path $commandFile -Value @'
|
||||||
|
feature enable Orchard.CodeGeneration
|
||||||
|
codegen module Orchard.CodeGeneration.TestModule
|
||||||
|
codegen theme Orchard.CodeGeneration.TestTheme /CreateProject:true
|
||||||
|
codegen moduletests Orchard.CodeGeneration.TestModule
|
||||||
|
'@
|
||||||
|
& 'src/Orchard.Web/bin/Orchard.exe' @$commandFile
|
||||||
|
|
||||||
|
- name: Compile with generated projects
|
||||||
|
run: msbuild Orchard.proj /m /v:minimal /t:Compile /p:TreatWarningsAsErrors=true -WarnAsError /NoWarn:CS2008
|
||||||
|
|
||||||
compile-node:
|
compile-node:
|
||||||
name: Compile client-side assets
|
name: Compile client-side assets
|
||||||
defaults:
|
defaults:
|
||||||
|
@ -52,12 +52,6 @@ Website: http://dlr.codeplex.com
|
|||||||
Copyright: Copyright (c) Microsoft Corporation
|
Copyright: Copyright (c) Microsoft Corporation
|
||||||
License: Apache Software Foundation License 2.0
|
License: Apache Software Foundation License 2.0
|
||||||
|
|
||||||
DotNetZip
|
|
||||||
-----
|
|
||||||
Website: http://dotnetzip.codeplex.com/
|
|
||||||
Copyright:
|
|
||||||
License: MS-PL
|
|
||||||
|
|
||||||
Eric Meyer's Reset CSS
|
Eric Meyer's Reset CSS
|
||||||
-----
|
-----
|
||||||
Website: http://meyerweb.com/eric/tools/css/reset/
|
Website: http://meyerweb.com/eric/tools/css/reset/
|
||||||
|
26
README.md
26
README.md
@ -1,16 +1,14 @@
|
|||||||
# Orchard
|
# Orchard
|
||||||
|
|
||||||
Orchard is a free, open source, community-focused Content Management System built on the ASP.NET MVC platform.
|
Orchard is a free, open source, community-focused Content Management System built on the ASP.NET MVC platform. You are looking at Orchard 1, the older, .NET Framework-based version that has been in development since 2009.
|
||||||
|
|
||||||
[](https://gitter.im/OrchardCMS/Orchard?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
If you're starting a new project (or maintaining a project built on Orchard 1), you should check out [Orchard Core](https://github.com/OrchardCMS/OrchardCore), the new generation of Orchard built on ASP.NET Core. You can also try it for free on [DotNest.com](https://dotnest.com)!
|
||||||
|
|
||||||
You can try it for free on [DotNest.com](https://dotnest.com) or on Microsoft Azure by clicking on this button.
|
Join the community discussion on [Discord](https://orchardcore.net/discord), where we also have a [channel dedicated to Orchard 1](https://discord.com/channels/551136772243980291/551137194689953848).
|
||||||
|
|
||||||
[](https://portal.azure.com/#create/OutercurveFoundation.OrchardCMS)
|
|
||||||
|
|
||||||
## About The Orchard Project
|
## About The Orchard Project
|
||||||
|
|
||||||
#### Please visit our website at https://orchardproject.net for the most current information about this project.
|
#### Please visit our website at https://orchardcore.net for the most current information about this project.
|
||||||
|
|
||||||
Orchard is a free, open source, community-focused **Content Management System** built on the ASP.NET MVC platform.
|
Orchard is a free, open source, community-focused **Content Management System** built on the ASP.NET MVC platform.
|
||||||
|
|
||||||
@ -24,12 +22,12 @@ Our mission is to empower our users and foster a dedicated and diverse community
|
|||||||
|
|
||||||
Orchard is currently in version **[1.10.3](https://github.com/OrchardCMS/Orchard/releases/tag/1.10.3)**: It contains bugfixes and the more impactful changes and new features added in the latest major version (*1.10*).
|
Orchard is currently in version **[1.10.3](https://github.com/OrchardCMS/Orchard/releases/tag/1.10.3)**: It contains bugfixes and the more impactful changes and new features added in the latest major version (*1.10*).
|
||||||
|
|
||||||
We invite participation by the developer community in shaping the project’s direction, so that we can publicly validate our designs and development approach.
|
We invite participation by the developer community in shaping the project's direction, so that we can publicly validate our designs and development approach.
|
||||||
All our releases are available on our [Releases](https://github.com/OrchardCMS/Orchard/releases) page, and we encourage interested developers to check out the source code on the Orchard GitHub site and get involved with the project.
|
All our releases are available on our [Releases](https://github.com/OrchardCMS/Orchard/releases) page, and we encourage interested developers to check out the source code on the Orchard GitHub site and get involved with the project.
|
||||||
|
|
||||||
* [Download the latest release](https://github.com/OrchardCMS/Orchard/releases)
|
* [Download the latest release](https://github.com/OrchardCMS/Orchard/releases)
|
||||||
* [Feature roadmap](https://docs.orchardproject.net/en/latest/Documentation/Feature-roadmap/)
|
* [Feature roadmap](https://docs.orchardcore.net/projects/O1/en/latest/Documentation/Feature-roadmap/)
|
||||||
* [Docs and designs/specs](https://docs.orchardproject.net)
|
* [Docs and designs/specs](https://docs.orchardcore.net/projects/O1/en/latest/)
|
||||||
|
|
||||||
## How To Get Involved
|
## How To Get Involved
|
||||||
|
|
||||||
@ -42,11 +40,7 @@ There are many ways you can contribute to Orchard:
|
|||||||
* [Find and file a bug](https://github.com/OrchardCMS/Orchard/issues)
|
* [Find and file a bug](https://github.com/OrchardCMS/Orchard/issues)
|
||||||
* [Propose a feature idea](https://github.com/OrchardCMS/Orchard/issues/new)
|
* [Propose a feature idea](https://github.com/OrchardCMS/Orchard/issues/new)
|
||||||
* [Ask and answer questions on Stack Overflow](https://stackoverflow.com/questions/tagged/orchardcms)
|
* [Ask and answer questions on Stack Overflow](https://stackoverflow.com/questions/tagged/orchardcms)
|
||||||
* [Participate in our gitter.im chatroom](https://gitter.im/OrchardCMS/Orchard)
|
* [Join us on Discord](https://orchardcore.net/discord)
|
||||||
* [Submit a pull request](https://docs.orchardproject.net/en/latest/Documentation/Contributing-patches/)
|
* [Submit a pull request](https://docs.orchardcore.net/projects/O1/en/latest/Documentation/Contributing-patches/)
|
||||||
* [Translate Orchard](https://crowdin.com/project/orchard-cms)
|
* [Translate Orchard](https://crowdin.com/project/orchard-cms)
|
||||||
* [Contribute modules and themes to our gallery](https://gallery.orchardproject.net/)
|
* [Contribute modules and themes to our gallery](https://gallery.orchardproject.net)
|
||||||
|
|
||||||
## The Future Of Orchard CMS: Orchard Core
|
|
||||||
|
|
||||||
As the underlying frameworks (.NET, ASP.NET and ASP.NET MVC) are constantly evolving, Orchard of course keeps track of the changes and improvements of these: Orchard Core is the next generation of Orchard releases that is based on [ASP.NET Core](https://www.asp.net/core). Just like the current Orchard project, it's fully [open-source and is publicly available on GitHub](https://github.com/OrchardCMS/OrchardCore). Orchard Core (as a framework) is being built from scratch: it's still in development and does not share any of its code base (at least directly) with the current versions (1.x) of Orchard.
|
|
||||||
|
@ -42,6 +42,14 @@
|
|||||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
|
<bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-4.1.3.0" newVersion="4.1.3.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
|
||||||
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
<specFlow>
|
<specFlow>
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.IO.Compression;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Ionic.Zip;
|
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using Orchard.Environment.Configuration;
|
using Orchard.Environment.Configuration;
|
||||||
using Orchard.FileSystems.Media;
|
using Orchard.FileSystems.Media;
|
||||||
@ -53,10 +53,10 @@ namespace Orchard.Tests.Modules.Media.Services {
|
|||||||
[Test]
|
[Test]
|
||||||
public void GetMediaFoldersTest() {
|
public void GetMediaFoldersTest() {
|
||||||
StorageProvider.ListFoldersPredicate = path => {
|
StorageProvider.ListFoldersPredicate = path => {
|
||||||
return string.IsNullOrEmpty(path) ? new[] {new StubStorageFolder(FolderName1)}
|
return string.IsNullOrEmpty(path) ? new[] { new StubStorageFolder(FolderName1) }
|
||||||
: string.Equals(path, FolderName1) ? new[] {new StubStorageFolder(FolderName2), new StubStorageFolder(FolderName3)}
|
: string.Equals(path, FolderName1) ? new[] { new StubStorageFolder(FolderName2), new StubStorageFolder(FolderName3) }
|
||||||
: new StubStorageFolder[] { };
|
: new StubStorageFolder[] { };
|
||||||
};
|
};
|
||||||
|
|
||||||
IEnumerable<MediaFolder> mediaFolders = MediaService.GetMediaFolders(null);
|
IEnumerable<MediaFolder> mediaFolders = MediaService.GetMediaFolders(null);
|
||||||
Assert.That(mediaFolders.Count(), Is.EqualTo(1), "Root path only has 1 sub directory");
|
Assert.That(mediaFolders.Count(), Is.EqualTo(1), "Root path only has 1 sub directory");
|
||||||
@ -94,7 +94,7 @@ namespace Orchard.Tests.Modules.Media.Services {
|
|||||||
Assert.That(StorageProvider.SavedStreams.Contains(StorageProvider.Combine(FolderName1, FinalDottedWebconfigFileName)), Is.False, "no extension files are never allowed");
|
Assert.That(StorageProvider.SavedStreams.Contains(StorageProvider.Combine(FolderName1, FinalDottedWebconfigFileName)), Is.False, "no extension files are never allowed");
|
||||||
Assert.That(StorageProvider.SavedStreams.Contains(StorageProvider.Combine(FolderName1, PaddedWebconfigFileName)), Is.False, "no extension files are never allowed");
|
Assert.That(StorageProvider.SavedStreams.Contains(StorageProvider.Combine(FolderName1, PaddedWebconfigFileName)), Is.False, "no extension files are never allowed");
|
||||||
Assert.That(StorageProvider.SavedStreams.Contains(StorageProvider.Combine(FolderName1, FinalDottedTextFileName)), Is.False, "no extension files are never allowed");
|
Assert.That(StorageProvider.SavedStreams.Contains(StorageProvider.Combine(FolderName1, FinalDottedTextFileName)), Is.False, "no extension files are never allowed");
|
||||||
|
|
||||||
Assert.That(StorageProvider.SavedStreams.Count, Is.EqualTo(3));
|
Assert.That(StorageProvider.SavedStreams.Count, Is.EqualTo(3));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -160,29 +160,30 @@ namespace Orchard.Tests.Modules.Media.Services {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private MemoryStream CreateZipMemoryStream() {
|
private MemoryStream CreateZipMemoryStream() {
|
||||||
|
var entries = new List<string> {
|
||||||
|
TextFileName, WebconfigFileName, DllFileName, ZipFileName, NoExtensionFileName, PaddedWebconfigFileName,
|
||||||
|
FinalDottedWebconfigFileName, PaddedTextFileName, FinalDottedTextFileName
|
||||||
|
};
|
||||||
|
|
||||||
// Setup memory stream with zip archive for more complex scenarios
|
// Setup memory stream with zip archive for more complex scenarios
|
||||||
MemoryStream memoryStream = new MemoryStream();
|
MemoryStream memoryStream = new MemoryStream();
|
||||||
using (ZipFile zipOut = new ZipFile()) {
|
using (var archive = new ZipArchive(memoryStream, ZipArchiveMode.Create, leaveOpen: true)) {
|
||||||
|
var content = new byte[] { 0x01 };
|
||||||
zipOut.AddEntry(TextFileName, new byte[] { 0x01 });
|
foreach (var entry in entries) {
|
||||||
zipOut.AddEntry(WebconfigFileName, new byte[] { 0x02 });
|
var zipEntry = archive.CreateEntry(entry);
|
||||||
zipOut.AddEntry(DllFileName, new byte[] { 0x03 });
|
using (var zipStream = zipEntry.Open()) {
|
||||||
zipOut.AddEntry(ZipFileName, new byte[] { 0x04 });
|
zipStream.Write(content, 0, 1);
|
||||||
zipOut.AddEntry(NoExtensionFileName, new byte[] { 0x05 });
|
}
|
||||||
zipOut.AddEntry(PaddedWebconfigFileName, new byte[] { 0x06 });
|
++content[0];
|
||||||
zipOut.AddEntry(FinalDottedWebconfigFileName, new byte[] { 0x07 });
|
}
|
||||||
zipOut.AddEntry(PaddedTextFileName, new byte[] { 0x08 });
|
|
||||||
zipOut.AddEntry(FinalDottedTextFileName, new byte[] { 0x09 });
|
|
||||||
|
|
||||||
zipOut.Save(memoryStream);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return new MemoryStream(memoryStream.ToArray());
|
return new MemoryStream(memoryStream.ToArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
private class MediaServiceAccessor : MediaService {
|
private class MediaServiceAccessor : MediaService {
|
||||||
public MediaServiceAccessor(IStorageProvider storageProvider, IOrchardServices orchardServices)
|
public MediaServiceAccessor(IStorageProvider storageProvider, IOrchardServices orchardServices)
|
||||||
: base (storageProvider, orchardServices) {}
|
: base(storageProvider, orchardServices) { }
|
||||||
|
|
||||||
public void UnzipMediaFileArchiveAccessor(string targetFolder, Stream zipStream) {
|
public void UnzipMediaFileArchiveAccessor(string targetFolder, Stream zipStream) {
|
||||||
UnzipMediaFileArchive(targetFolder, zipStream);
|
UnzipMediaFileArchive(targetFolder, zipStream);
|
||||||
|
@ -67,9 +67,6 @@
|
|||||||
<Reference Include="Castle.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
|
<Reference Include="Castle.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Castle.Core.3.3.1\lib\net45\Castle.Core.dll</HintPath>
|
<HintPath>..\packages\Castle.Core.3.3.1\lib\net45\Castle.Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="DotNetZip, Version=1.12.0.0, Culture=neutral, PublicKeyToken=6583c7c814667745, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\DotNetZip.1.12.0\lib\net20\DotNetZip.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="FluentNHibernate, Version=3.1.0.0, Culture=neutral, PublicKeyToken=8aa435e3cb308880, processorArchitecture=MSIL">
|
<Reference Include="FluentNHibernate, Version=3.1.0.0, Culture=neutral, PublicKeyToken=8aa435e3cb308880, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\FluentNHibernate.3.1.0\lib\net461\FluentNHibernate.dll</HintPath>
|
<HintPath>..\packages\FluentNHibernate.3.1.0\lib\net461\FluentNHibernate.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
@ -141,6 +138,7 @@
|
|||||||
<HintPath>..\..\lib\sqlce\System.Data.SqlServerCe.dll</HintPath>
|
<HintPath>..\..\lib\sqlce\System.Data.SqlServerCe.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="System.IO.Compression" />
|
||||||
<Reference Include="System.ServiceModel" />
|
<Reference Include="System.ServiceModel" />
|
||||||
<Reference Include="System.Transactions" />
|
<Reference Include="System.Transactions" />
|
||||||
<Reference Include="System.Web" />
|
<Reference Include="System.Web" />
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
<package id="Antlr3.Runtime" version="3.5.1" targetFramework="net48" />
|
<package id="Antlr3.Runtime" version="3.5.1" targetFramework="net48" />
|
||||||
<package id="Autofac" version="3.5.2" targetFramework="net48" />
|
<package id="Autofac" version="3.5.2" targetFramework="net48" />
|
||||||
<package id="Castle.Core" version="3.3.1" targetFramework="net48" />
|
<package id="Castle.Core" version="3.3.1" targetFramework="net48" />
|
||||||
<package id="DotNetZip" version="1.12.0" targetFramework="net48" />
|
|
||||||
<package id="FluentNHibernate" version="3.1.0" targetFramework="net48" />
|
<package id="FluentNHibernate" version="3.1.0" targetFramework="net48" />
|
||||||
<package id="Iesi.Collections" version="4.0.4" targetFramework="net48" />
|
<package id="Iesi.Collections" version="4.0.4" targetFramework="net48" />
|
||||||
<package id="IronRuby" version="1.1.3" targetFramework="net48" />
|
<package id="IronRuby" version="1.1.3" targetFramework="net48" />
|
||||||
@ -13,7 +12,7 @@
|
|||||||
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
|
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
|
||||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||||
<package id="Moq" version="4.2.1510.2205" targetFramework="net48" />
|
<package id="Moq" version="4.2.1510.2205" targetFramework="net48" />
|
||||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
|
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||||
<package id="NHibernate" version="5.5.2" targetFramework="net48" />
|
<package id="NHibernate" version="5.5.2" targetFramework="net48" />
|
||||||
<package id="NUnit" version="2.5.10.11092" targetFramework="net48" />
|
<package id="NUnit" version="2.5.10.11092" targetFramework="net48" />
|
||||||
<package id="Orchard.FluentPath" version="1.0.0.1" targetFramework="net48" />
|
<package id="Orchard.FluentPath" version="1.0.0.1" targetFramework="net48" />
|
||||||
|
@ -108,7 +108,7 @@
|
|||||||
<HintPath>..\packages\Moq.4.2.1510.2205\lib\net40\Moq.dll</HintPath>
|
<HintPath>..\packages\Moq.4.2.1510.2205\lib\net40\Moq.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="NHibernate, Version=5.5.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
<Reference Include="NHibernate, Version=5.5.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\NHibernate.5.5.2\lib\net48\NHibernate.dll</HintPath>
|
<HintPath>..\packages\NHibernate.5.5.2\lib\net48\NHibernate.dll</HintPath>
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
|
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
|
||||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||||
<package id="Moq" version="4.2.1510.2205" targetFramework="net48" />
|
<package id="Moq" version="4.2.1510.2205" targetFramework="net48" />
|
||||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
|
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||||
<package id="NHibernate" version="5.5.2" targetFramework="net48" />
|
<package id="NHibernate" version="5.5.2" targetFramework="net48" />
|
||||||
<package id="NUnit" version="2.5.10.11092" targetFramework="net48" />
|
<package id="NUnit" version="2.5.10.11092" targetFramework="net48" />
|
||||||
<package id="NUnitTestAdapter" version="2.3.0" targetFramework="net48" />
|
<package id="NUnitTestAdapter" version="2.3.0" targetFramework="net48" />
|
||||||
|
@ -34,6 +34,14 @@
|
|||||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
|
<bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-4.1.3.0" newVersion="4.1.3.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
|
||||||
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
using System.Web.Routing;
|
|
||||||
using Orchard.ContentManagement;
|
using Orchard.ContentManagement;
|
||||||
using Orchard.ContentManagement.Aspects;
|
using Orchard.ContentManagement.Aspects;
|
||||||
using Orchard.ContentManagement.Handlers;
|
using Orchard.ContentManagement.Handlers;
|
||||||
@ -16,6 +15,7 @@ using Orchard.Localization;
|
|||||||
using Orchard.Logging;
|
using Orchard.Logging;
|
||||||
using Orchard.Mvc.Extensions;
|
using Orchard.Mvc.Extensions;
|
||||||
using Orchard.Mvc.Html;
|
using Orchard.Mvc.Html;
|
||||||
|
using Orchard.Security;
|
||||||
using Orchard.UI;
|
using Orchard.UI;
|
||||||
using Orchard.UI.Navigation;
|
using Orchard.UI.Navigation;
|
||||||
using Orchard.UI.Notify;
|
using Orchard.UI.Notify;
|
||||||
@ -25,50 +25,50 @@ using Orchard.Utility.Extensions;
|
|||||||
namespace Orchard.Core.Navigation.Controllers {
|
namespace Orchard.Core.Navigation.Controllers {
|
||||||
[ValidateInput(false)]
|
[ValidateInput(false)]
|
||||||
public class AdminController : Controller, IUpdateModel {
|
public class AdminController : Controller, IUpdateModel {
|
||||||
|
private readonly IContentManager _contentManager;
|
||||||
|
private readonly ITransactionManager _transactionManager;
|
||||||
|
private readonly IAuthorizer _authorizer;
|
||||||
|
private readonly INotifier _notifier;
|
||||||
private readonly IMenuService _menuService;
|
private readonly IMenuService _menuService;
|
||||||
private readonly INavigationManager _navigationManager;
|
private readonly INavigationManager _navigationManager;
|
||||||
private readonly IEnumerable<IContentHandler> _handlers;
|
private readonly IEnumerable<IContentHandler> _handlers;
|
||||||
private readonly IMenuManager _menuManager;
|
private readonly IMenuManager _menuManager;
|
||||||
private readonly IContentManager _contentManager;
|
|
||||||
private readonly ITransactionManager _transactionManager;
|
|
||||||
|
|
||||||
public AdminController(
|
public AdminController(
|
||||||
IOrchardServices orchardServices,
|
IOrchardServices orchardServices,
|
||||||
IContentManager contentManager,
|
|
||||||
ITransactionManager transactionManager,
|
|
||||||
IMenuService menuService,
|
IMenuService menuService,
|
||||||
IMenuManager menuManager,
|
IMenuManager menuManager,
|
||||||
INavigationManager navigationManager,
|
INavigationManager navigationManager,
|
||||||
IEnumerable<IContentHandler> handlers) {
|
IEnumerable<IContentHandler> handlers) {
|
||||||
_contentManager = contentManager;
|
_contentManager = orchardServices.ContentManager;
|
||||||
_transactionManager = transactionManager;
|
_transactionManager = orchardServices.TransactionManager;
|
||||||
|
_authorizer = orchardServices.Authorizer;
|
||||||
|
_notifier = orchardServices.Notifier;
|
||||||
_menuService = menuService;
|
_menuService = menuService;
|
||||||
_menuManager = menuManager;
|
_menuManager = menuManager;
|
||||||
_navigationManager = navigationManager;
|
_navigationManager = navigationManager;
|
||||||
_handlers = handlers;
|
_handlers = handlers;
|
||||||
|
|
||||||
Services = orchardServices;
|
|
||||||
T = NullLocalizer.Instance;
|
T = NullLocalizer.Instance;
|
||||||
Logger = NullLogger.Instance;
|
Logger = NullLogger.Instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Localizer T { get; set; }
|
public Localizer T { get; set; }
|
||||||
public ILogger Logger { get; set; }
|
public ILogger Logger { get; set; }
|
||||||
public IOrchardServices Services { get; set; }
|
|
||||||
|
|
||||||
public ActionResult Index(NavigationManagementViewModel model, int? menuId) {
|
public ActionResult Index(NavigationManagementViewModel model, int? menuId) {
|
||||||
var menus = Services.ContentManager.Query("Menu").List().ToList()
|
var menus = _contentManager.Query("Menu").List().ToList()
|
||||||
.OrderBy(x => x.ContentManager.GetItemMetadata(x).DisplayText);
|
.OrderBy(x => x.ContentManager.GetItemMetadata(x).DisplayText);
|
||||||
|
|
||||||
if (!menus.Any()) {
|
if (!menus.Any()) {
|
||||||
if (!Services.Authorizer.Authorize(Permissions.ManageMenus, T("Not allowed to manage menus"))) {
|
if (!_authorizer.Authorize(Permissions.ManageMenus, T("Not allowed to manage menus"))) {
|
||||||
return new HttpUnauthorizedResult();
|
return new HttpUnauthorizedResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
return RedirectToAction("Create", "Admin", new { area = "Contents", id = "Menu", returnUrl = Request.RawUrl });
|
return RedirectToAction("Create", "Admin", new { area = "Contents", id = "Menu", returnUrl = Request.RawUrl });
|
||||||
}
|
}
|
||||||
|
|
||||||
var allowedMenus = menus.Where(menu => Services.Authorizer.Authorize(Permissions.ManageMenus, menu)).ToList();
|
var allowedMenus = menus.Where(menu => _authorizer.Authorize(Permissions.ManageMenus, menu)).ToList();
|
||||||
|
|
||||||
if (!allowedMenus.Any()) {
|
if (!allowedMenus.Any()) {
|
||||||
return new HttpUnauthorizedResult();
|
return new HttpUnauthorizedResult();
|
||||||
@ -87,7 +87,11 @@ namespace Orchard.Core.Navigation.Controllers {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (model.MenuItemEntries == null || !model.MenuItemEntries.Any()) {
|
if (model.MenuItemEntries == null || !model.MenuItemEntries.Any()) {
|
||||||
model.MenuItemEntries = _menuService.GetMenuParts(currentMenu.Id).Select(CreateMenuItemEntries).OrderBy(menuPartEntry => menuPartEntry.Position, new FlatPositionComparer()).ToList();
|
model.MenuItemEntries = _menuService
|
||||||
|
.GetMenuParts(currentMenu.Id)
|
||||||
|
.Select(CreateMenuItemEntries)
|
||||||
|
.OrderBy(menuPartEntry => menuPartEntry.Position, new FlatPositionComparer())
|
||||||
|
.ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
model.MenuItemDescriptors = _menuManager.GetMenuItemTypes();
|
model.MenuItemDescriptors = _menuManager.GetMenuItemTypes();
|
||||||
@ -100,7 +104,10 @@ namespace Orchard.Core.Navigation.Controllers {
|
|||||||
|
|
||||||
[HttpPost, ActionName("Index")]
|
[HttpPost, ActionName("Index")]
|
||||||
public ActionResult IndexPOST(IList<MenuItemEntry> menuItemEntries, int? menuId) {
|
public ActionResult IndexPOST(IList<MenuItemEntry> menuItemEntries, int? menuId) {
|
||||||
if (!Services.Authorizer.Authorize(Permissions.ManageMenus, (menuId.HasValue) ? _menuService.GetMenu(menuId.Value) : null, T("Couldn't manage the main menu")))
|
if (!_authorizer.Authorize(
|
||||||
|
Permissions.ManageMenus,
|
||||||
|
menuId.HasValue ? _menuService.GetMenu(menuId.Value) : null,
|
||||||
|
T("Couldn't manage the menu")))
|
||||||
return new HttpUnauthorizedResult();
|
return new HttpUnauthorizedResult();
|
||||||
|
|
||||||
// See https://github.com/OrchardCMS/Orchard/issues/948
|
// See https://github.com/OrchardCMS/Orchard/issues/948
|
||||||
@ -123,25 +130,15 @@ namespace Orchard.Core.Navigation.Controllers {
|
|||||||
return RedirectToAction("Index", new { menuId });
|
return RedirectToAction("Index", new { menuId });
|
||||||
}
|
}
|
||||||
|
|
||||||
private MenuItemEntry CreateMenuItemEntries(MenuPart menuPart) {
|
|
||||||
return new MenuItemEntry {
|
|
||||||
MenuItemId = menuPart.Id,
|
|
||||||
IsMenuItem = menuPart.Is<MenuItemPart>(),
|
|
||||||
Text = menuPart.MenuText,
|
|
||||||
Position = menuPart.MenuPosition,
|
|
||||||
Url = menuPart.Is<MenuItemPart>()
|
|
||||||
? menuPart.As<MenuItemPart>().Url
|
|
||||||
: _navigationManager.GetUrl(null, Services.ContentManager.GetItemMetadata(menuPart).DisplayRouteValues),
|
|
||||||
ContentItem = menuPart.ContentItem,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public ActionResult Delete(int id) {
|
public ActionResult Delete(int id) {
|
||||||
|
|
||||||
MenuPart menuPart = _menuService.Get(id);
|
MenuPart menuPart = _menuService.Get(id);
|
||||||
int? menuId = null;
|
int? menuId = null;
|
||||||
if (!Services.Authorizer.Authorize(Permissions.ManageMenus, (menuPart != null) ? _menuService.GetMenu(menuPart.Menu.Id) : null, T("Couldn't manage the main menu")))
|
if (!_authorizer.Authorize(
|
||||||
|
Permissions.ManageMenus,
|
||||||
|
menuPart == null ? null : _menuService.GetMenu(menuPart.Menu.Id),
|
||||||
|
T("Couldn't manage the menu")))
|
||||||
return new HttpUnauthorizedResult();
|
return new HttpUnauthorizedResult();
|
||||||
|
|
||||||
if (menuPart != null) {
|
if (menuPart != null) {
|
||||||
@ -155,7 +152,8 @@ namespace Orchard.Core.Navigation.Controllers {
|
|||||||
|
|
||||||
foreach (var menuItem in menuItems.Concat(new[] { menuPart })) {
|
foreach (var menuItem in menuItems.Concat(new[] { menuPart })) {
|
||||||
// if the menu item is a concrete content item, don't delete it, just unreference the menu
|
// if the menu item is a concrete content item, don't delete it, just unreference the menu
|
||||||
if (!menuPart.ContentItem.TypeDefinition.Settings.ContainsKey("Stereotype") || menuPart.ContentItem.TypeDefinition.Settings["Stereotype"] != "MenuItem") {
|
if (!menuPart.ContentItem.TypeDefinition.Settings.ContainsKey("Stereotype")
|
||||||
|
|| menuPart.ContentItem.TypeDefinition.Settings["Stereotype"] != "MenuItem") {
|
||||||
menuPart.Menu = null;
|
menuPart.Menu = null;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -168,26 +166,18 @@ namespace Orchard.Core.Navigation.Controllers {
|
|||||||
return RedirectToAction("Index", new { menuId });
|
return RedirectToAction("Index", new { menuId });
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IUpdateModel.TryUpdateModel<TModel>(TModel model, string prefix, string[] includeProperties, string[] excludeProperties) {
|
|
||||||
return TryUpdateModel(model, prefix, includeProperties, excludeProperties);
|
|
||||||
}
|
|
||||||
|
|
||||||
void IUpdateModel.AddModelError(string key, LocalizedString errorMessage) {
|
|
||||||
ModelState.AddModelError(key, errorMessage.ToString());
|
|
||||||
}
|
|
||||||
|
|
||||||
public ActionResult CreateMenuItem(string id, int menuId, string returnUrl) {
|
public ActionResult CreateMenuItem(string id, int menuId, string returnUrl) {
|
||||||
if (!Services.Authorizer.Authorize(Permissions.ManageMenus, _menuService.GetMenu(menuId), T("Couldn't manage the main menu")))
|
if (!_authorizer.Authorize(Permissions.ManageMenus, _menuService.GetMenu(menuId), T("Couldn't manage the menu")))
|
||||||
return new HttpUnauthorizedResult();
|
return new HttpUnauthorizedResult();
|
||||||
|
|
||||||
// create a new temporary menu item
|
// create a new temporary menu item
|
||||||
var menuPart = Services.ContentManager.New<MenuPart>(id);
|
var menuPart = _contentManager.New<MenuPart>(id);
|
||||||
|
|
||||||
if (menuPart == null)
|
if (menuPart == null)
|
||||||
return HttpNotFound();
|
return HttpNotFound();
|
||||||
|
|
||||||
// load the menu
|
// load the menu
|
||||||
var menu = Services.ContentManager.Get(menuId);
|
var menu = _contentManager.Get(menuId);
|
||||||
|
|
||||||
if (menu == null)
|
if (menu == null)
|
||||||
return HttpNotFound();
|
return HttpNotFound();
|
||||||
@ -196,7 +186,7 @@ namespace Orchard.Core.Navigation.Controllers {
|
|||||||
// filter the content items for this specific menu
|
// filter the content items for this specific menu
|
||||||
menuPart.MenuPosition = Position.GetNext(_navigationManager.BuildMenu(menu));
|
menuPart.MenuPosition = Position.GetNext(_navigationManager.BuildMenu(menu));
|
||||||
menuPart.Menu = menu;
|
menuPart.Menu = menu;
|
||||||
var model = Services.ContentManager.BuildEditor(menuPart);
|
var model = _contentManager.BuildEditor(menuPart);
|
||||||
|
|
||||||
return View(model);
|
return View(model);
|
||||||
}
|
}
|
||||||
@ -206,32 +196,32 @@ namespace Orchard.Core.Navigation.Controllers {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Logger.Error(T("Creating menu item failed: {0}", exception.Message).Text);
|
Logger.Error(T("Creating menu item failed: {0}", exception.Message).Text);
|
||||||
Services.Notifier.Error(T("Creating menu item failed: {0}", exception.Message));
|
_notifier.Error(T("Creating menu item failed: {0}", exception.Message));
|
||||||
return this.RedirectLocal(returnUrl, () => RedirectToAction("Index"));
|
return this.RedirectLocal(returnUrl, () => RedirectToAction("Index"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost, ActionName("CreateMenuItem")]
|
[HttpPost, ActionName("CreateMenuItem")]
|
||||||
public ActionResult CreateMenuItemPost(string id, int menuId, string returnUrl) {
|
public ActionResult CreateMenuItemPost(string id, int menuId, string returnUrl) {
|
||||||
if (!Services.Authorizer.Authorize(Permissions.ManageMenus, _menuService.GetMenu(menuId), T("Couldn't manage the main menu")))
|
if (!_authorizer.Authorize(Permissions.ManageMenus, _menuService.GetMenu(menuId), T("Couldn't manage the menu")))
|
||||||
return new HttpUnauthorizedResult();
|
return new HttpUnauthorizedResult();
|
||||||
var menuPart = Services.ContentManager.New<MenuPart>(id);
|
var menuPart = _contentManager.New<MenuPart>(id);
|
||||||
if (menuPart == null)
|
if (menuPart == null)
|
||||||
return HttpNotFound();
|
return HttpNotFound();
|
||||||
// load the menu
|
// load the menu
|
||||||
var menu = Services.ContentManager.Get(menuId);
|
var menu = _contentManager.Get(menuId);
|
||||||
if (menu == null)
|
if (menu == null)
|
||||||
return HttpNotFound();
|
return HttpNotFound();
|
||||||
|
|
||||||
menuPart.Menu = menu;
|
menuPart.Menu = menu;
|
||||||
var model = Services.ContentManager.UpdateEditor(menuPart, this);
|
var model = _contentManager.UpdateEditor(menuPart, this);
|
||||||
menuPart.MenuPosition = Position.GetNext(_navigationManager.BuildMenu(menu));
|
menuPart.MenuPosition = Position.GetNext(_navigationManager.BuildMenu(menu));
|
||||||
Services.ContentManager.Create(menuPart);
|
_contentManager.Create(menuPart);
|
||||||
if (!ModelState.IsValid) {
|
if (!ModelState.IsValid) {
|
||||||
Services.TransactionManager.Cancel();
|
_transactionManager.Cancel();
|
||||||
return View(model);
|
return View(model);
|
||||||
}
|
}
|
||||||
Services.Notifier.Success(T("Your {0} has been added.", menuPart.TypeDefinition.DisplayName));
|
_notifier.Success(T("Your {0} has been added.", menuPart.TypeDefinition.DisplayName));
|
||||||
return this.RedirectLocal(returnUrl, () => RedirectToAction("Index"));
|
return this.RedirectLocal(returnUrl, () => RedirectToAction("Index"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -241,7 +231,7 @@ namespace Orchard.Core.Navigation.Controllers {
|
|||||||
if (contentItem == null)
|
if (contentItem == null)
|
||||||
return HttpNotFound();
|
return HttpNotFound();
|
||||||
|
|
||||||
if (!Services.Authorizer.Authorize(Permissions.ManageMenus, contentItem.Content.MenuPart.Menu, T("Couldn't manage the main menu")))
|
if (!_authorizer.Authorize(Permissions.ManageMenus, contentItem.Content.MenuPart.Menu, T("Couldn't manage the menu")))
|
||||||
return new HttpUnauthorizedResult();
|
return new HttpUnauthorizedResult();
|
||||||
|
|
||||||
var model = _contentManager.BuildEditor(contentItem);
|
var model = _contentManager.BuildEditor(contentItem);
|
||||||
@ -252,20 +242,81 @@ namespace Orchard.Core.Navigation.Controllers {
|
|||||||
[Mvc.FormValueRequired("submit.Publish")]
|
[Mvc.FormValueRequired("submit.Publish")]
|
||||||
public ActionResult EditPOST(int id, string returnUrl) {
|
public ActionResult EditPOST(int id, string returnUrl) {
|
||||||
return EditPOST(id, returnUrl, contentItem => {
|
return EditPOST(id, returnUrl, contentItem => {
|
||||||
if (!contentItem.Has<IPublishingControlAspect>() && !contentItem.TypeDefinition.Settings.GetModel<ContentTypeSettings>().Draftable)
|
if (!contentItem.Has<IPublishingControlAspect>()
|
||||||
|
&& !contentItem.TypeDefinition.Settings.GetModel<ContentTypeSettings>().Draftable
|
||||||
|
&& contentItem.IsPublished())
|
||||||
_contentManager.Publish(contentItem);
|
_contentManager.Publish(contentItem);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private ActionResult EditPOST(int id, string returnUrl, Action<ContentItem> conditionallyPublish) {
|
[HttpPost]
|
||||||
var contentItem = _contentManager.Get(id, VersionOptions.DraftRequired);
|
// Copy of Contents/AdminController/Publish, but with different permission check and redirect.
|
||||||
|
public ActionResult Publish(int id) {
|
||||||
if (contentItem == null)
|
var menuPart = _contentManager.GetLatest<MenuPart>(id);
|
||||||
|
if (menuPart == null)
|
||||||
return HttpNotFound();
|
return HttpNotFound();
|
||||||
|
|
||||||
if (!Services.Authorizer.Authorize(Permissions.ManageMenus, contentItem.Content.MenuPart.Menu, T("Couldn't manage the main menu")))
|
if (!_authorizer.Authorize(Permissions.ManageMenus, menuPart.Menu, T("Couldn't manage the menu")))
|
||||||
return new HttpUnauthorizedResult();
|
return new HttpUnauthorizedResult();
|
||||||
|
|
||||||
|
_contentManager.Publish(menuPart.ContentItem);
|
||||||
|
|
||||||
|
_notifier.Success(
|
||||||
|
string.IsNullOrWhiteSpace(menuPart.MenuText)
|
||||||
|
? string.IsNullOrWhiteSpace(menuPart.TypeDefinition.DisplayName)
|
||||||
|
? T("Your content has been published.")
|
||||||
|
: T("Your {0} has been published.", menuPart.TypeDefinition.DisplayName)
|
||||||
|
: T("'{0}' has been published.", menuPart.MenuText));
|
||||||
|
|
||||||
|
return RedirectToAction("Index", new { menuId = menuPart.Menu.Id });
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
// Copy of Contents/AdminController/Unpublish, but with different permission check and redirect.
|
||||||
|
public ActionResult Unpublish(int id) {
|
||||||
|
var menuPart = _contentManager.GetLatest<MenuPart>(id);
|
||||||
|
if (menuPart == null)
|
||||||
|
return HttpNotFound();
|
||||||
|
|
||||||
|
if (!_authorizer.Authorize(Permissions.ManageMenus, menuPart.Menu, T("Couldn't manage the menu")))
|
||||||
|
return new HttpUnauthorizedResult();
|
||||||
|
|
||||||
|
_contentManager.Unpublish(menuPart.ContentItem);
|
||||||
|
|
||||||
|
_notifier.Success(
|
||||||
|
string.IsNullOrWhiteSpace(menuPart.MenuText)
|
||||||
|
? string.IsNullOrWhiteSpace(menuPart.TypeDefinition.DisplayName)
|
||||||
|
? T("Your content has been unpublished.")
|
||||||
|
: T("Your {0} has been unpublished.", menuPart.TypeDefinition.DisplayName)
|
||||||
|
: T("'{0}' has been unpublished.", menuPart.MenuText));
|
||||||
|
|
||||||
|
return RedirectToAction("Index", new { menuId = menuPart.Menu.Id });
|
||||||
|
}
|
||||||
|
|
||||||
|
private MenuItemEntry CreateMenuItemEntries(MenuPart menuPart) {
|
||||||
|
return new MenuItemEntry {
|
||||||
|
MenuItemId = menuPart.Id,
|
||||||
|
IsMenuItem = menuPart.Is<MenuItemPart>(),
|
||||||
|
Text = menuPart.MenuText,
|
||||||
|
Position = menuPart.MenuPosition,
|
||||||
|
Url = menuPart.Is<MenuItemPart>()
|
||||||
|
? menuPart.As<MenuItemPart>().Url
|
||||||
|
: _navigationManager.GetUrl(null, _contentManager.GetItemMetadata(menuPart).DisplayRouteValues),
|
||||||
|
ContentItem = menuPart.ContentItem,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
private ActionResult EditPOST(int id, string returnUrl, Action<ContentItem> conditionallyPublish) {
|
||||||
|
var menuPart = _contentManager.GetDraftRequired<MenuPart>(id);
|
||||||
|
|
||||||
|
if (menuPart == null)
|
||||||
|
return HttpNotFound();
|
||||||
|
|
||||||
|
if (!_authorizer.Authorize(Permissions.ManageMenus, menuPart.Menu, T("Couldn't manage the menu")))
|
||||||
|
return new HttpUnauthorizedResult();
|
||||||
|
|
||||||
|
var contentItem = menuPart.ContentItem;
|
||||||
|
|
||||||
string previousRoute = null;
|
string previousRoute = null;
|
||||||
if (contentItem.Has<IAliasAspect>()
|
if (contentItem.Has<IAliasAspect>()
|
||||||
&& !string.IsNullOrWhiteSpace(returnUrl)
|
&& !string.IsNullOrWhiteSpace(returnUrl)
|
||||||
@ -290,11 +341,22 @@ namespace Orchard.Core.Navigation.Controllers {
|
|||||||
returnUrl = Url.ItemDisplayUrl(contentItem);
|
returnUrl = Url.ItemDisplayUrl(contentItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
Services.Notifier.Information(string.IsNullOrWhiteSpace(contentItem.TypeDefinition.DisplayName)
|
_notifier.Success(
|
||||||
? T("Your content has been saved.")
|
string.IsNullOrWhiteSpace(menuPart.MenuText)
|
||||||
: T("Your {0} has been saved.", contentItem.TypeDefinition.DisplayName));
|
? string.IsNullOrWhiteSpace(contentItem.TypeDefinition.DisplayName)
|
||||||
|
? T("Your content has been saved.")
|
||||||
|
: T("Your {0} has been saved.", contentItem.TypeDefinition.DisplayName)
|
||||||
|
: T("'{0}' has been saved.", menuPart.MenuText));
|
||||||
|
|
||||||
return this.RedirectLocal(returnUrl, () => RedirectToAction("Edit", new RouteValueDictionary { { "Id", contentItem.Id } }));
|
return RedirectToAction("Index", new { menuId = menuPart.Menu.Id });
|
||||||
|
}
|
||||||
|
|
||||||
|
bool IUpdateModel.TryUpdateModel<TModel>(TModel model, string prefix, string[] includeProperties, string[] excludeProperties) {
|
||||||
|
return TryUpdateModel(model, prefix, includeProperties, excludeProperties);
|
||||||
|
}
|
||||||
|
|
||||||
|
void IUpdateModel.AddModelError(string key, LocalizedString errorMessage) {
|
||||||
|
ModelState.AddModelError(key, errorMessage.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,13 +19,13 @@ namespace Orchard.Core.Navigation.Services {
|
|||||||
|
|
||||||
public IEnumerable<MenuPart> GetMenuParts(int menuId) {
|
public IEnumerable<MenuPart> GetMenuParts(int menuId) {
|
||||||
return _contentManager
|
return _contentManager
|
||||||
.Query<MenuPart, MenuPartRecord>()
|
.Query<MenuPart, MenuPartRecord>(VersionOptions.Latest)
|
||||||
.Where( x => x.MenuId == menuId)
|
.Where(x => x.MenuId == menuId)
|
||||||
.List();
|
.List();
|
||||||
}
|
}
|
||||||
|
|
||||||
public IContent GetMenu(string menuName) {
|
public IContent GetMenu(string menuName) {
|
||||||
if(string.IsNullOrWhiteSpace(menuName)) {
|
if (string.IsNullOrWhiteSpace(menuName)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ namespace Orchard.Core.Navigation.Services {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public IContent GetMenu(int menuId) {
|
public IContent GetMenu(int menuId) {
|
||||||
return _contentManager.Get(menuId, VersionOptions.Published);
|
return _contentManager.Get(menuId, VersionOptions.Published);
|
||||||
}
|
}
|
||||||
|
|
||||||
public MenuPart Get(int menuPartId) {
|
public MenuPart Get(int menuPartId) {
|
||||||
@ -45,11 +45,11 @@ namespace Orchard.Core.Navigation.Services {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public IContent Create(string name) {
|
public IContent Create(string name) {
|
||||||
|
|
||||||
if(string.IsNullOrWhiteSpace(name)) {
|
if (string.IsNullOrWhiteSpace(name)) {
|
||||||
throw new ArgumentNullException(name);
|
throw new ArgumentNullException(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
var menu = _contentManager.Create("Menu");
|
var menu = _contentManager.Create("Menu");
|
||||||
menu.As<TitlePart>().Title = name;
|
menu.As<TitlePart>().Title = name;
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
@model NavigationManagementViewModel
|
@model NavigationManagementViewModel
|
||||||
|
|
||||||
|
@using Orchard.ContentManagement;
|
||||||
@using Orchard.Core.Navigation.ViewModels;
|
@using Orchard.Core.Navigation.ViewModels;
|
||||||
@using Orchard.Utility.Extensions;
|
@using Orchard.Utility.Extensions;
|
||||||
|
|
||||||
@ -116,11 +118,24 @@ for (int i = index; i < Model.MenuItemEntries.Count; i++) {
|
|||||||
<span class="navigation-position"><input type="text" class="text" name="@Html.NameOf(m => m.MenuItemEntries[i].Position)" value="@menuPartEntry.Position" /></span>
|
<span class="navigation-position"><input type="text" class="text" name="@Html.NameOf(m => m.MenuItemEntries[i].Position)" value="@menuPartEntry.Position" /></span>
|
||||||
<span class="navigation-actions action-links">
|
<span class="navigation-actions action-links">
|
||||||
<input type="hidden" name="@Html.NameOf(m => m.MenuItemEntries[i].MenuItemId)" value="@menuPartEntry.MenuItemId" />
|
<input type="hidden" name="@Html.NameOf(m => m.MenuItemEntries[i].MenuItemId)" value="@menuPartEntry.MenuItemId" />
|
||||||
|
<span class="action-link">
|
||||||
|
@{
|
||||||
|
var menuItemHasPublished = menuPartEntry.ContentItem.HasPublished();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Html.Link(
|
||||||
|
menuItemHasPublished ? T("Unpublish").Text : T("Publish").Text,
|
||||||
|
Url.Action(
|
||||||
|
menuItemHasPublished ? "Unpublish": "Publish",
|
||||||
|
"Admin",
|
||||||
|
new { area = "Navigation", id = menuPartEntry.ContentItem.Id }),
|
||||||
|
new { itemprop = "UnsafeUrl" })
|
||||||
|
</span>
|
||||||
<span class="action-link">
|
<span class="action-link">
|
||||||
@Html.ItemEditLink(T("Edit").Text, menuPartEntry.ContentItem, new { returnUrl = Request.RawUrl })
|
@Html.ItemEditLink(T("Edit").Text, menuPartEntry.ContentItem, new { returnUrl = Request.RawUrl })
|
||||||
</span>
|
</span>
|
||||||
<span class="action-link">
|
<span class="action-link">
|
||||||
@Html.Link(T("Delete").Text, Url.ItemRemoveUrl(menuPartEntry.ContentItem,null), new { itemprop = "RemoveUrl UnsafeUrl" })
|
@Html.Link(T("Delete").Text, Url.ItemRemoveUrl(menuPartEntry.ContentItem, null), new { itemprop = "RemoveUrl UnsafeUrl" })
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||||
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
|
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
@ -250,4 +250,4 @@
|
|||||||
</FlavorProperties>
|
</FlavorProperties>
|
||||||
</VisualStudio>
|
</VisualStudio>
|
||||||
</ProjectExtensions>
|
</ProjectExtensions>
|
||||||
</Project>
|
</Project>
|
@ -5,5 +5,5 @@
|
|||||||
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
|
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
|
||||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="4.1.0" targetFramework="net48" />
|
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="4.1.0" targetFramework="net48" />
|
||||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
|
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||||
</packages>
|
</packages>
|
@ -65,7 +65,7 @@
|
|||||||
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="NHibernate, Version=5.5.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
<Reference Include="NHibernate, Version=5.5.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\..\packages\NHibernate.5.5.2\lib\net48\NHibernate.dll</HintPath>
|
<HintPath>..\..\..\packages\NHibernate.5.5.2\lib\net48\NHibernate.dll</HintPath>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
|
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
|
||||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="4.1.0" targetFramework="net48" />
|
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="4.1.0" targetFramework="net48" />
|
||||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
|
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||||
<package id="NHibernate" version="5.5.2" targetFramework="net48" />
|
<package id="NHibernate" version="5.5.2" targetFramework="net48" />
|
||||||
<package id="Remotion.Linq" version="2.2.0" targetFramework="net48" />
|
<package id="Remotion.Linq" version="2.2.0" targetFramework="net48" />
|
||||||
<package id="Remotion.Linq.EagerFetching" version="2.2.0" targetFramework="net48" />
|
<package id="Remotion.Linq.EagerFetching" version="2.2.0" targetFramework="net48" />
|
||||||
|
@ -113,7 +113,7 @@
|
|||||||
<HintPath>..\..\..\packages\WindowsAzure.Storage.5.0.2\lib\net40\Microsoft.WindowsAzure.Storage.dll</HintPath>
|
<HintPath>..\..\..\packages\WindowsAzure.Storage.5.0.2\lib\net40\Microsoft.WindowsAzure.Storage.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="NHibernate, Version=5.5.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
<Reference Include="NHibernate, Version=5.5.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\..\packages\NHibernate.5.5.2\lib\net48\NHibernate.dll</HintPath>
|
<HintPath>..\..\..\packages\NHibernate.5.5.2\lib\net48\NHibernate.dll</HintPath>
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
<package id="Microsoft.IdentityModel.Tokens" version="5.7.0" targetFramework="net48" />
|
<package id="Microsoft.IdentityModel.Tokens" version="5.7.0" targetFramework="net48" />
|
||||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||||
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="3.1.0" targetFramework="net48" />
|
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="3.1.0" targetFramework="net48" />
|
||||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
|
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||||
<package id="NHibernate" version="5.5.2" targetFramework="net48" />
|
<package id="NHibernate" version="5.5.2" targetFramework="net48" />
|
||||||
<package id="Orchard.WindowsAzure.Diagnostics" version="2.7.0.0" targetFramework="net48" />
|
<package id="Orchard.WindowsAzure.Diagnostics" version="2.7.0.0" targetFramework="net48" />
|
||||||
<package id="Remotion.Linq" version="2.2.0" targetFramework="net48" />
|
<package id="Remotion.Linq" version="2.2.0" targetFramework="net48" />
|
||||||
|
@ -105,7 +105,7 @@
|
|||||||
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Caching.2.4.0.0\lib\net40-full\Microsoft.WindowsFabric.Data.Common.dll</HintPath>
|
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Caching.2.4.0.0\lib\net40-full\Microsoft.WindowsFabric.Data.Common.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="NHibernate, Version=5.5.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
<Reference Include="NHibernate, Version=5.5.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\..\packages\NHibernate.5.5.2\lib\net48\NHibernate.dll</HintPath>
|
<HintPath>..\..\..\packages\NHibernate.5.5.2\lib\net48\NHibernate.dll</HintPath>
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||||
<package id="Microsoft.WindowsAzure.Caching" version="2.4.0.0" targetFramework="net48" />
|
<package id="Microsoft.WindowsAzure.Caching" version="2.4.0.0" targetFramework="net48" />
|
||||||
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="3.1.0" targetFramework="net48" />
|
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="3.1.0" targetFramework="net48" />
|
||||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
|
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||||
<package id="NHibernate" version="5.5.2" targetFramework="net48" />
|
<package id="NHibernate" version="5.5.2" targetFramework="net48" />
|
||||||
<package id="Orchard.WindowsAzure.ServiceRuntime" version="2.7.0.0" targetFramework="net48" />
|
<package id="Orchard.WindowsAzure.ServiceRuntime" version="2.7.0.0" targetFramework="net48" />
|
||||||
<package id="Remotion.Linq" version="2.2.0" targetFramework="net48" />
|
<package id="Remotion.Linq" version="2.2.0" targetFramework="net48" />
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<CodeAnalysisRuleSet>..\..\..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>..\..\..\..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
@ -35,16 +35,22 @@
|
|||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Autofac">
|
<Reference Include="Autofac, Version=3.5.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\..\..\packages\Autofac.3.5.2\lib\net40\Autofac.dll</HintPath>
|
<HintPath>..\..\..\..\packages\Autofac.3.5.2\lib\net40\Autofac.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Moq, Version=4.2.1510.2205, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
<Reference Include="Moq, Version=4.2.1510.2205, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\..\..\packages\Moq.4.2.1510.2205\lib\net40\Moq.dll</HintPath>
|
<HintPath>..\..\..\..\packages\Moq.4.2.1510.2205\lib\net40\Moq.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
<Reference Include="NHibernate, Version=5.5.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\..\..\packages\NHibernate.5.3.10\lib\net461\NHibernate.dll</HintPath>
|
<HintPath>..\..\..\packages\NHibernate.5.5.2\lib\net48\NHibernate.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="nunit.framework">
|
<Reference Include="Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\..\packages\Remotion.Linq.2.2.0\lib\net45\Remotion.Linq.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Remotion.Linq.EagerFetching, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\..\packages\Remotion.Linq.EagerFetching.2.2.0\lib\net45\Remotion.Linq.EagerFetching.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="nunit.framework, Version=2.5.10.11092, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\..\..\packages\NUnit.2.5.10.11092\lib\nunit.framework.dll</HintPath>
|
<HintPath>..\..\..\..\packages\NUnit.2.5.10.11092\lib\nunit.framework.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
|
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<packages>
|
||||||
|
<package id="Autofac" version="3.5.2" targetFramework="net48" />
|
||||||
|
<package id="Moq" version="4.2.1510.2205" targetFramework="net48" />
|
||||||
|
<package id="NHibernate" version="5.5.2" targetFramework="net48" />
|
||||||
|
<package id="Remotion.Linq" version="2.2.0" targetFramework="net48" />
|
||||||
|
<package id="Remotion.Linq.EagerFetching" version="2.2.0" targetFramework="net48" />
|
||||||
|
<package id="NUnit" version="2.5.10.11092" targetFramework="net48" />
|
||||||
|
</packages>
|
@ -161,6 +161,8 @@ namespace Orchard.CodeGeneration.Commands {
|
|||||||
templateText = templateText.Replace("$$ModuleTypeLibGuid$$", Guid.NewGuid().ToString());
|
templateText = templateText.Replace("$$ModuleTypeLibGuid$$", Guid.NewGuid().ToString());
|
||||||
File.WriteAllText(propertiesPath + "\\AssemblyInfo.cs", templateText);
|
File.WriteAllText(propertiesPath + "\\AssemblyInfo.cs", templateText);
|
||||||
content.Add(propertiesPath + "\\AssemblyInfo.cs");
|
content.Add(propertiesPath + "\\AssemblyInfo.cs");
|
||||||
|
File.WriteAllText(testsPath + "packages.config", File.ReadAllText(_codeGenTemplatePath + "ModuleTestsPackagesConfig.txt"));
|
||||||
|
content.Add(testsPath + "packages.config");
|
||||||
|
|
||||||
var itemGroup = CreateProjectItemGroup(testsPath, content, folders);
|
var itemGroup = CreateProjectItemGroup(testsPath, content, folders);
|
||||||
|
|
||||||
@ -168,7 +170,7 @@ namespace Orchard.CodeGeneration.Commands {
|
|||||||
csprojText = csprojText.Replace("$$ProjectName$$", projectName);
|
csprojText = csprojText.Replace("$$ProjectName$$", projectName);
|
||||||
csprojText = csprojText.Replace("$$TestsProjectGuid$$", projectGuid);
|
csprojText = csprojText.Replace("$$TestsProjectGuid$$", projectGuid);
|
||||||
csprojText = csprojText.Replace("$$FileIncludes$$", itemGroup ?? "");
|
csprojText = csprojText.Replace("$$FileIncludes$$", itemGroup ?? "");
|
||||||
csprojText = csprojText.Replace("$$OrchardReferences$$", GetOrchardReferences());
|
csprojText = csprojText.Replace("$$OrchardReferences$$", GetOrchardReferences(modulesFolderRelativeDepth: 3));
|
||||||
|
|
||||||
File.WriteAllText(testsPath + projectName + ".csproj", csprojText);
|
File.WriteAllText(testsPath + projectName + ".csproj", csprojText);
|
||||||
|
|
||||||
@ -327,15 +329,17 @@ namespace Orchard.CodeGeneration.Commands {
|
|||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string GetOrchardReferences() {
|
private static string GetOrchardReferences(int modulesFolderRelativeDepth = 2) {
|
||||||
|
var frameworkRelativeDepth = string.Join("\\", Enumerable.Repeat("..", modulesFolderRelativeDepth + 1));
|
||||||
|
var coreRelativeDepth = string.Join("\\", Enumerable.Repeat("..", modulesFolderRelativeDepth));
|
||||||
return IsSourceEnlistment() ?
|
return IsSourceEnlistment() ?
|
||||||
@"<ProjectReference Include=""..\..\..\Orchard\Orchard.Framework.csproj"">
|
$@"<ProjectReference Include=""{frameworkRelativeDepth}\Orchard\Orchard.Framework.csproj"">
|
||||||
<Project>{2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6}</Project>
|
<Project>{{2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6}}</Project>
|
||||||
<Name>Orchard.Framework</Name>
|
<Name>Orchard.Framework</Name>
|
||||||
<Private>$(MvcBuildViews)</Private>
|
<Private>$(MvcBuildViews)</Private>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include=""..\..\Core\Orchard.Core.csproj"">
|
<ProjectReference Include=""{coreRelativeDepth}\Core\Orchard.Core.csproj"">
|
||||||
<Project>{9916839C-39FC-4CEB-A5AF-89CA7E87119F}</Project>
|
<Project>{{9916839C-39FC-4CEB-A5AF-89CA7E87119F}}</Project>
|
||||||
<Name>Orchard.Core</Name>
|
<Name>Orchard.Core</Name>
|
||||||
<Private>$(MvcBuildViews)</Private>
|
<Private>$(MvcBuildViews)</Private>
|
||||||
</ProjectReference>" :
|
</ProjectReference>" :
|
||||||
|
@ -88,6 +88,7 @@
|
|||||||
<Compile Include="Services\CodeGenerationCommandInterpreter.cs" />
|
<Compile Include="Services\CodeGenerationCommandInterpreter.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Content Include="CodeGenerationTemplates\ModuleTestsPackagesConfig.txt" />
|
||||||
<Content Include="CodeGenerationTemplates\ModuleStylesMinCss.txt" />
|
<Content Include="CodeGenerationTemplates\ModuleStylesMinCss.txt" />
|
||||||
<Content Include="CodeGenerationTemplates\ModuleStylesCss.txt" />
|
<Content Include="CodeGenerationTemplates\ModuleStylesCss.txt" />
|
||||||
<Content Include="CodeGenerationTemplates\ModuleStylesLess.txt" />
|
<Content Include="CodeGenerationTemplates\ModuleStylesLess.txt" />
|
||||||
@ -158,4 +159,4 @@
|
|||||||
</FlavorProperties>
|
</FlavorProperties>
|
||||||
</VisualStudio>
|
</VisualStudio>
|
||||||
</ProjectExtensions>
|
</ProjectExtensions>
|
||||||
</Project>
|
</Project>
|
@ -70,7 +70,7 @@
|
|||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
|
<Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
|
<HintPath>..\..\..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
|
||||||
|
@ -9,6 +9,6 @@
|
|||||||
<package id="Microsoft.Owin.Host.SystemWeb" version="4.2.2" targetFramework="net48" />
|
<package id="Microsoft.Owin.Host.SystemWeb" version="4.2.2" targetFramework="net48" />
|
||||||
<package id="Microsoft.Owin.Security" version="4.2.2" targetFramework="net48" />
|
<package id="Microsoft.Owin.Security" version="4.2.2" targetFramework="net48" />
|
||||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
|
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||||
<package id="Owin" version="1.0" targetFramework="net48" />
|
<package id="Owin" version="1.0" targetFramework="net48" />
|
||||||
</packages>
|
</packages>
|
@ -66,7 +66,7 @@
|
|||||||
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
|
@ -8,5 +8,5 @@
|
|||||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="4.1.0" targetFramework="net48" />
|
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="4.1.0" targetFramework="net48" />
|
||||||
<package id="Microsoft.TypeScript.MSBuild" version="3.7.4" targetFramework="net48" developmentDependency="true" />
|
<package id="Microsoft.TypeScript.MSBuild" version="3.7.4" targetFramework="net48" developmentDependency="true" />
|
||||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
|
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||||
</packages>
|
</packages>
|
@ -69,7 +69,7 @@
|
|||||||
<HintPath>..\..\..\packages\MimeKit.3.1.1\lib\net48\MimeKit.dll</HintPath>
|
<HintPath>..\..\..\packages\MimeKit.3.1.1\lib\net48\MimeKit.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="4.1.0" targetFramework="net48" />
|
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="4.1.0" targetFramework="net48" />
|
||||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||||
<package id="MimeKit" version="3.1.1" targetFramework="net48" />
|
<package id="MimeKit" version="3.1.1" targetFramework="net48" />
|
||||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
|
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||||
<package id="Portable.BouncyCastle" version="1.9.0" targetFramework="net48" />
|
<package id="Portable.BouncyCastle" version="1.9.0" targetFramework="net48" />
|
||||||
<package id="System.Buffers" version="4.5.1" targetFramework="net48" />
|
<package id="System.Buffers" version="4.5.1" targetFramework="net48" />
|
||||||
</packages>
|
</packages>
|
@ -1,11 +1,10 @@
|
|||||||
using Orchard.ContentManagement;
|
using System;
|
||||||
|
using Orchard.ContentManagement;
|
||||||
using Orchard.ContentManagement.Drivers;
|
using Orchard.ContentManagement.Drivers;
|
||||||
using Orchard.ContentManagement.Handlers;
|
using Orchard.ContentManagement.Handlers;
|
||||||
using Orchard.Fields.Fields;
|
using Orchard.Fields.Fields;
|
||||||
using Orchard.Fields.Settings;
|
using Orchard.Fields.Settings;
|
||||||
using Orchard.Localization;
|
using Orchard.Localization;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace Orchard.Fields.Drivers {
|
namespace Orchard.Fields.Drivers {
|
||||||
public class LinkFieldDriver : ContentFieldDriver<LinkField> {
|
public class LinkFieldDriver : ContentFieldDriver<LinkField> {
|
||||||
@ -39,10 +38,10 @@ namespace Orchard.Fields.Drivers {
|
|||||||
() => {
|
() => {
|
||||||
if (part.IsNew()) {
|
if (part.IsNew()) {
|
||||||
var settings = field.PartFieldDefinition.Settings.GetModel<LinkFieldSettings>();
|
var settings = field.PartFieldDefinition.Settings.GetModel<LinkFieldSettings>();
|
||||||
if (String.IsNullOrEmpty(field.Value)) {
|
if (string.IsNullOrEmpty(field.Value)) {
|
||||||
field.Value = settings.DefaultValue;
|
field.Value = settings.DefaultValue;
|
||||||
}
|
}
|
||||||
if (String.IsNullOrEmpty(field.Text)) {
|
if (string.IsNullOrEmpty(field.Text)) {
|
||||||
field.Text = settings.TextDefaultValue;
|
field.Text = settings.TextDefaultValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -54,13 +53,29 @@ namespace Orchard.Fields.Drivers {
|
|||||||
if (updater.TryUpdateModel(field, GetPrefix(field, part), null, null)) {
|
if (updater.TryUpdateModel(field, GetPrefix(field, part), null, null)) {
|
||||||
var settings = field.PartFieldDefinition.Settings.GetModel<LinkFieldSettings>();
|
var settings = field.PartFieldDefinition.Settings.GetModel<LinkFieldSettings>();
|
||||||
|
|
||||||
if (settings.Required && String.IsNullOrWhiteSpace(field.Value)) {
|
if (settings.Required && string.IsNullOrWhiteSpace(field.Value)) {
|
||||||
updater.AddModelError(GetPrefix(field, part), T("Url is required for {0}.", T(field.DisplayName)));
|
updater.AddModelError(GetPrefix(field, part), T("URL is required for {0}.", T(field.DisplayName)));
|
||||||
}
|
}
|
||||||
else if (!String.IsNullOrWhiteSpace(field.Value) && !Uri.IsWellFormedUriString(field.Value, UriKind.RelativeOrAbsolute)) {
|
else if (!string.IsNullOrWhiteSpace(field.Value)) {
|
||||||
updater.AddModelError(GetPrefix(field, part), T("{0} is an invalid url.", field.Value));
|
// If the URL contains a fragment identifier (#), find its index to validate the URL and fragment separately.
|
||||||
|
var fragmentIndex = field.Value.IndexOf('#');
|
||||||
|
|
||||||
|
// The URL is the part of the value before the fragment identifier (#).
|
||||||
|
var url = fragmentIndex >= 0 ? field.Value.Substring(0, fragmentIndex) : field.Value;
|
||||||
|
// If the provided value contains a URL (not just a fragment), check if it's a valid URI.
|
||||||
|
if (!string.IsNullOrEmpty(url) && !Uri.IsWellFormedUriString(url, UriKind.RelativeOrAbsolute)) {
|
||||||
|
updater.AddModelError(GetPrefix(field, part), T("'{0}' is an invalid URL.", url));
|
||||||
|
}
|
||||||
|
|
||||||
|
// The fragment is the part of the value after the fragment identifier (#).
|
||||||
|
var fragment = fragmentIndex >= 0 ? field.Value.Substring(fragmentIndex + 1) : null;
|
||||||
|
// If the provided value contains a fragment, check if it contains spaces.
|
||||||
|
if (!string.IsNullOrEmpty(fragment) && fragment.IndexOf(' ') >= 0) {
|
||||||
|
updater.AddModelError(GetPrefix(field, part), T("'{0}' is an invalid URL fragment.", fragment));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (settings.LinkTextMode == LinkTextMode.Required && String.IsNullOrWhiteSpace(field.Text)) {
|
|
||||||
|
if (settings.LinkTextMode == LinkTextMode.Required && string.IsNullOrWhiteSpace(field.Text)) {
|
||||||
updater.AddModelError(GetPrefix(field, part), T("Text is required for {0}.", T(field.DisplayName)));
|
updater.AddModelError(GetPrefix(field, part), T("Text is required for {0}.", T(field.DisplayName)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -89,7 +104,7 @@ namespace Orchard.Fields.Drivers {
|
|||||||
protected override void Describe(DescribeMembersContext context) {
|
protected override void Describe(DescribeMembersContext context) {
|
||||||
context
|
context
|
||||||
.Member("Text", typeof(string), T("Text"), T("The text of the link."))
|
.Member("Text", typeof(string), T("Text"), T("The text of the link."))
|
||||||
.Member(null, typeof(string), T("Url"), T("The url of the link."))
|
.Member(null, typeof(string), T("Url"), T("The URL of the link."))
|
||||||
.Enumerate<LinkField>(() => field => new[] { field.Value });
|
.Enumerate<LinkField>(() => field => new[] { field.Value });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="editor-field">
|
<div class="editor-field">
|
||||||
@(settings.Required ? Html.TextBoxFor(m => m.Value, new { @class = "text large", placeholder = settings.UrlPlaceholder, required = "required" }) : Html.TextBoxFor(m => m.Value, new { @class = "text large", placeholder = settings.UrlPlaceholder }))
|
@(settings.Required ? Html.TextBoxFor(m => m.Value, new { @class = "text large", placeholder = settings.UrlPlaceholder, required = "required" }) : Html.TextBoxFor(m => m.Value, new { @class = "text large", placeholder = settings.UrlPlaceholder }))
|
||||||
<span class="hint">@T("A valid url, i.e. http://orchardproject.net, /content/file.pdf, ...")</span>
|
<span class="hint">@T("A valid url, i.e. http://orchardproject.net, /content/file.pdf, #some_id, ...")</span>
|
||||||
</div>
|
</div>
|
||||||
@if (settings.LinkTextMode == LinkTextMode.Optional || settings.LinkTextMode == LinkTextMode.Required) {
|
@if (settings.LinkTextMode == LinkTextMode.Optional || settings.LinkTextMode == LinkTextMode.Required) {
|
||||||
<div class="editor-label">
|
<div class="editor-label">
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
@ -173,4 +173,4 @@
|
|||||||
</FlavorProperties>
|
</FlavorProperties>
|
||||||
</VisualStudio>
|
</VisualStudio>
|
||||||
</ProjectExtensions>
|
</ProjectExtensions>
|
||||||
</Project>
|
</Project>
|
@ -4,5 +4,5 @@
|
|||||||
<package id="Microsoft.AspNet.Razor" version="3.2.7" targetFramework="net48" />
|
<package id="Microsoft.AspNet.Razor" version="3.2.7" targetFramework="net48" />
|
||||||
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
|
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
|
||||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
|
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||||
</packages>
|
</packages>
|
@ -93,7 +93,7 @@
|
|||||||
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="NHibernate, Version=5.5.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
<Reference Include="NHibernate, Version=5.5.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\..\packages\NHibernate.5.5.2\lib\net48\NHibernate.dll</HintPath>
|
<HintPath>..\..\..\packages\NHibernate.5.5.2\lib\net48\NHibernate.dll</HintPath>
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
<package id="Microsoft.Owin.Host.SystemWeb" version="4.2.2" targetFramework="net48" />
|
<package id="Microsoft.Owin.Host.SystemWeb" version="4.2.2" targetFramework="net48" />
|
||||||
<package id="Microsoft.Owin.Security" version="4.2.2" targetFramework="net48" />
|
<package id="Microsoft.Owin.Security" version="4.2.2" targetFramework="net48" />
|
||||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
|
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||||
<package id="NHibernate" version="5.5.2" targetFramework="net48" />
|
<package id="NHibernate" version="5.5.2" targetFramework="net48" />
|
||||||
<package id="Owin" version="1.0" targetFramework="net48" />
|
<package id="Owin" version="1.0" targetFramework="net48" />
|
||||||
<package id="Remotion.Linq" version="2.2.0" targetFramework="net48" />
|
<package id="Remotion.Linq" version="2.2.0" targetFramework="net48" />
|
||||||
|
@ -61,7 +61,7 @@
|
|||||||
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||||
@ -196,4 +196,4 @@
|
|||||||
</FlavorProperties>
|
</FlavorProperties>
|
||||||
</VisualStudio>
|
</VisualStudio>
|
||||||
</ProjectExtensions>
|
</ProjectExtensions>
|
||||||
</Project>
|
</Project>
|
@ -5,5 +5,5 @@
|
|||||||
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
|
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
|
||||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="4.1.0" targetFramework="net48" />
|
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="4.1.0" targetFramework="net48" />
|
||||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
|
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||||
</packages>
|
</packages>
|
@ -59,7 +59,7 @@
|
|||||||
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
|
@ -7,6 +7,6 @@
|
|||||||
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
|
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
|
||||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="4.1.0" targetFramework="net48" />
|
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="4.1.0" targetFramework="net48" />
|
||||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
|
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||||
<package id="YamlDotNet" version="11.1.1" targetFramework="net48" />
|
<package id="YamlDotNet" version="11.1.1" targetFramework="net48" />
|
||||||
</packages>
|
</packages>
|
@ -52,9 +52,6 @@
|
|||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="DotNetZip, Version=1.12.0.0, Culture=neutral, PublicKeyToken=6583c7c814667745, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\..\packages\DotNetZip.1.12.0\lib\net20\DotNetZip.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.4.1.0\lib\net472\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
|
<HintPath>..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.4.1.0\lib\net472\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
@ -64,6 +61,7 @@
|
|||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="System.IO.Compression" />
|
||||||
<Reference Include="System.Web" />
|
<Reference Include="System.Web" />
|
||||||
<Reference Include="System.Web.ApplicationServices" />
|
<Reference Include="System.Web.ApplicationServices" />
|
||||||
<Reference Include="System.Web.DynamicData" />
|
<Reference Include="System.Web.DynamicData" />
|
||||||
@ -204,4 +202,4 @@
|
|||||||
</FlavorProperties>
|
</FlavorProperties>
|
||||||
</VisualStudio>
|
</VisualStudio>
|
||||||
</ProjectExtensions>
|
</ProjectExtensions>
|
||||||
</Project>
|
</Project>
|
@ -1,9 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.IO.Compression;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using Ionic.Zip;
|
|
||||||
using Orchard.ContentManagement;
|
using Orchard.ContentManagement;
|
||||||
using Orchard.FileSystems.Media;
|
using Orchard.FileSystems.Media;
|
||||||
using Orchard.Localization;
|
using Orchard.Localization;
|
||||||
@ -194,7 +194,7 @@ namespace Orchard.Media.Services {
|
|||||||
/// <param name="bytes">The array of bytes with the file's contents.</param>
|
/// <param name="bytes">The array of bytes with the file's contents.</param>
|
||||||
/// <param name="extractZip">Boolean value indicating weather zip files should be extracted.</param>
|
/// <param name="extractZip">Boolean value indicating weather zip files should be extracted.</param>
|
||||||
/// <returns>The path to the uploaded file.</returns>
|
/// <returns>The path to the uploaded file.</returns>
|
||||||
public string UploadMediaFile(string folderPath, string fileName, byte [] bytes, bool extractZip) {
|
public string UploadMediaFile(string folderPath, string fileName, byte[] bytes, bool extractZip) {
|
||||||
Argument.ThrowIfNullOrEmpty(folderPath, "folderPath");
|
Argument.ThrowIfNullOrEmpty(folderPath, "folderPath");
|
||||||
Argument.ThrowIfNullOrEmpty(fileName, "fileName");
|
Argument.ThrowIfNullOrEmpty(fileName, "fileName");
|
||||||
Argument.ThrowIfNull(bytes, "bytes");
|
Argument.ThrowIfNull(bytes, "bytes");
|
||||||
@ -274,16 +274,16 @@ namespace Orchard.Media.Services {
|
|||||||
|
|
||||||
// must be in the whitelist
|
// must be in the whitelist
|
||||||
MediaSettingsPart mediaSettings = currentSite.As<MediaSettingsPart>();
|
MediaSettingsPart mediaSettings = currentSite.As<MediaSettingsPart>();
|
||||||
|
|
||||||
if (mediaSettings == null) {
|
if (mediaSettings == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(String.IsNullOrWhiteSpace(mediaSettings.UploadAllowedFileTypeWhitelist)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!mediaSettings.UploadAllowedFileTypeWhitelist.ToUpperInvariant().Split(' ').Contains(extension.ToUpperInvariant())) {
|
if (String.IsNullOrWhiteSpace(mediaSettings.UploadAllowedFileTypeWhitelist)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!mediaSettings.UploadAllowedFileTypeWhitelist.ToUpperInvariant().Split(' ').Contains(extension.ToUpperInvariant())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -305,28 +305,26 @@ namespace Orchard.Media.Services {
|
|||||||
Argument.ThrowIfNullOrEmpty(targetFolder, "targetFolder");
|
Argument.ThrowIfNullOrEmpty(targetFolder, "targetFolder");
|
||||||
Argument.ThrowIfNull(zipStream, "zipStream");
|
Argument.ThrowIfNull(zipStream, "zipStream");
|
||||||
|
|
||||||
using (var fileInflater = ZipFile.Read(zipStream)) {
|
using (var fileInflater = new ZipArchive(zipStream)) {
|
||||||
// We want to preserve whatever directory structure the zip file contained instead
|
// We want to preserve whatever directory structure the zip file contained instead
|
||||||
// of flattening it.
|
// of flattening it.
|
||||||
// The API below doesn't necessarily return the entries in the zip file in any order.
|
// The API below doesn't necessarily return the entries in the zip file in any order.
|
||||||
// That means the files in subdirectories can be returned as entries from the stream
|
// That means the files in subdirectories can be returned as entries from the stream
|
||||||
// before the directories that contain them, so we create directories as soon as first
|
// before the directories that contain them, so we create directories as soon as first
|
||||||
// file below their path is encountered.
|
// file below their path is encountered.
|
||||||
foreach (ZipEntry entry in fileInflater) {
|
foreach (var entry in fileInflater.Entries) {
|
||||||
if (entry == null) {
|
if (entry == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!entry.IsDirectory && !string.IsNullOrEmpty(entry.FileName)) {
|
if (!string.IsNullOrEmpty(entry.Name)) {
|
||||||
|
|
||||||
// skip disallowed files
|
// skip disallowed files
|
||||||
if (FileAllowed(entry.FileName, false)) {
|
if (FileAllowed(entry.Name, false)) {
|
||||||
string fullFileName = _storageProvider.Combine(targetFolder, entry.FileName);
|
string fullFileName = _storageProvider.Combine(targetFolder, entry.FullName);
|
||||||
|
|
||||||
using (var stream = entry.OpenReader()) {
|
using (var stream = entry.Open()) {
|
||||||
// the call will return false if the file already exists
|
// the call will return false if the file already exists
|
||||||
if (!_storageProvider.TrySaveStream(fullFileName, stream)) {
|
if (!_storageProvider.TrySaveStream(fullFileName, stream)) {
|
||||||
|
|
||||||
// try to delete the file and save again
|
// try to delete the file and save again
|
||||||
try {
|
try {
|
||||||
_storageProvider.DeleteFile(fullFileName);
|
_storageProvider.DeleteFile(fullFileName);
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="DotNetZip" version="1.12.0" targetFramework="net48" />
|
|
||||||
<package id="Microsoft.AspNet.Mvc" version="5.2.7" targetFramework="net48" />
|
<package id="Microsoft.AspNet.Mvc" version="5.2.7" targetFramework="net48" />
|
||||||
<package id="Microsoft.AspNet.Razor" version="3.2.7" targetFramework="net48" />
|
<package id="Microsoft.AspNet.Razor" version="3.2.7" targetFramework="net48" />
|
||||||
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
|
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
|
||||||
|
@ -70,7 +70,7 @@
|
|||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
|
<Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
|
<HintPath>..\..\..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
<package id="Microsoft.Owin.Host.SystemWeb" version="4.2.2" targetFramework="net48" />
|
<package id="Microsoft.Owin.Host.SystemWeb" version="4.2.2" targetFramework="net48" />
|
||||||
<package id="Microsoft.Owin.Security" version="4.2.2" targetFramework="net48" />
|
<package id="Microsoft.Owin.Security" version="4.2.2" targetFramework="net48" />
|
||||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
|
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||||
<package id="Owin" version="1.0" targetFramework="net48" />
|
<package id="Owin" version="1.0" targetFramework="net48" />
|
||||||
<package id="RestEase" version="1.4.9" targetFramework="net48" />
|
<package id="RestEase" version="1.4.9" targetFramework="net48" />
|
||||||
</packages>
|
</packages>
|
@ -59,7 +59,7 @@
|
|||||||
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
@ -477,4 +477,4 @@
|
|||||||
</FlavorProperties>
|
</FlavorProperties>
|
||||||
</VisualStudio>
|
</VisualStudio>
|
||||||
</ProjectExtensions>
|
</ProjectExtensions>
|
||||||
</Project>
|
</Project>
|
@ -5,5 +5,5 @@
|
|||||||
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
|
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
|
||||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="4.1.0" targetFramework="net48" />
|
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="4.1.0" targetFramework="net48" />
|
||||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
|
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||||
</packages>
|
</packages>
|
@ -149,7 +149,7 @@
|
|||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="NHibernate, Version=5.5.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
<Reference Include="NHibernate, Version=5.5.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\..\packages\NHibernate.5.5.2\lib\net48\NHibernate.dll</HintPath>
|
<HintPath>..\..\..\packages\NHibernate.5.5.2\lib\net48\NHibernate.dll</HintPath>
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
<package id="Microsoft.Owin.Security.OpenIdConnect" version="4.2.2" targetFramework="net48" />
|
<package id="Microsoft.Owin.Security.OpenIdConnect" version="4.2.2" targetFramework="net48" />
|
||||||
<package id="Microsoft.Owin.Security.Twitter" version="4.2.2" targetFramework="net48" />
|
<package id="Microsoft.Owin.Security.Twitter" version="4.2.2" targetFramework="net48" />
|
||||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
|
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||||
<package id="NHibernate" version="5.5.2" targetFramework="net48" />
|
<package id="NHibernate" version="5.5.2" targetFramework="net48" />
|
||||||
<package id="Owin" version="1.0" targetFramework="net48" />
|
<package id="Owin" version="1.0" targetFramework="net48" />
|
||||||
<package id="Remotion.Linq" version="2.2.0" targetFramework="net48" />
|
<package id="Remotion.Linq" version="2.2.0" targetFramework="net48" />
|
||||||
|
@ -102,17 +102,7 @@ namespace Orchard.Projections {
|
|||||||
SchemaBuilder.CreateTable("FieldIndexPartRecord", table => table.ContentPartRecord());
|
SchemaBuilder.CreateTable("FieldIndexPartRecord", table => table.ContentPartRecord());
|
||||||
|
|
||||||
//Adds indexes for better performances in queries
|
//Adds indexes for better performances in queries
|
||||||
SchemaBuilder.AlterTable("StringFieldIndexRecord", table => table.CreateIndex("IX_PropertyName", new string[] { "PropertyName" }));
|
AddPropertyNameAndFieldIndexPartRecordIdIndexes();
|
||||||
SchemaBuilder.AlterTable("StringFieldIndexRecord", table => table.CreateIndex("IX_FieldIndexPartRecord_Id", new string[] { "FieldIndexPartRecord_Id" }));
|
|
||||||
|
|
||||||
SchemaBuilder.AlterTable("IntegerFieldIndexRecord", table => table.CreateIndex("IX_PropertyName", new string[] { "PropertyName" }));
|
|
||||||
SchemaBuilder.AlterTable("IntegerFieldIndexRecord", table => table.CreateIndex("IX_FieldIndexPartRecord_Id", new string[] { "FieldIndexPartRecord_Id" }));
|
|
||||||
|
|
||||||
SchemaBuilder.AlterTable("DoubleFieldIndexRecord", table => table.CreateIndex("IX_PropertyName", new string[] { "PropertyName" }));
|
|
||||||
SchemaBuilder.AlterTable("DoubleFieldIndexRecord", table => table.CreateIndex("IX_FieldIndexPartRecord_Id", new string[] { "FieldIndexPartRecord_Id" }));
|
|
||||||
|
|
||||||
SchemaBuilder.AlterTable("DecimalFieldIndexRecord", table => table.CreateIndex("IX_PropertyName", new string[] { "PropertyName" }));
|
|
||||||
SchemaBuilder.AlterTable("DecimalFieldIndexRecord", table => table.CreateIndex("IX_FieldIndexPartRecord_Id", new string[] { "FieldIndexPartRecord_Id" }));
|
|
||||||
|
|
||||||
// Query
|
// Query
|
||||||
|
|
||||||
@ -318,7 +308,7 @@ namespace Orchard.Projections {
|
|||||||
Description = T("The text from the Body part").Text
|
Description = T("The text from the Body part").Text
|
||||||
});
|
});
|
||||||
|
|
||||||
return 7;
|
return 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int UpdateFrom1() {
|
public int UpdateFrom1() {
|
||||||
@ -375,22 +365,7 @@ namespace Orchard.Projections {
|
|||||||
.AddColumn<decimal>("LatestValue"));
|
.AddColumn<decimal>("LatestValue"));
|
||||||
|
|
||||||
//Adds indexes for better performances in queries
|
//Adds indexes for better performances in queries
|
||||||
SchemaBuilder.AlterTable("StringFieldIndexRecord", table => {
|
AddPropertyNameAndFieldIndexPartRecordIdIndexes();
|
||||||
table.CreateIndex("IDX_Orchard_Projections_PropertyName", "PropertyName");
|
|
||||||
table.CreateIndex("IDX_Orchard_Projections_StringFieldIndexRecord", "FieldIndexPartRecord_Id");
|
|
||||||
});
|
|
||||||
SchemaBuilder.AlterTable("IntegerFieldIndexRecord", table => {
|
|
||||||
table.CreateIndex("IDX_Orchard_Projections_PropertyName", "PropertyName");
|
|
||||||
table.CreateIndex("IDX_Orchard_Projections_IntegerFieldIndexRecord", "FieldIndexPartRecord_Id");
|
|
||||||
});
|
|
||||||
SchemaBuilder.AlterTable("DoubleFieldIndexRecord", table => {
|
|
||||||
table.CreateIndex("IDX_Orchard_Projections_PropertyName", "PropertyName");
|
|
||||||
table.CreateIndex("IDX_Orchard_Projections_DoubleFieldIndexRecord", "FieldIndexPartRecord_Id");
|
|
||||||
});
|
|
||||||
SchemaBuilder.AlterTable("DecimalFieldIndexRecord", table => {
|
|
||||||
table.CreateIndex("IDX_Orchard_Projections_PropertyName", "PropertyName");
|
|
||||||
table.CreateIndex("IDX_Orchard_Projections_DecimalFieldIndexRecords", "FieldIndexPartRecord_Id");
|
|
||||||
});
|
|
||||||
|
|
||||||
SchemaBuilder.AlterTable("QueryPartRecord", table => table
|
SchemaBuilder.AlterTable("QueryPartRecord", table => table
|
||||||
.AddColumn<string>("VersionScope", c => c.WithLength(15)));
|
.AddColumn<string>("VersionScope", c => c.WithLength(15)));
|
||||||
@ -434,6 +409,29 @@ namespace Orchard.Projections {
|
|||||||
return 7;
|
return 7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int UpdateFrom7() {
|
||||||
|
SchemaBuilder.AlterTable("StringFieldIndexRecord", table => {
|
||||||
|
table.DropIndex("IX_PropertyName");
|
||||||
|
table.DropIndex("IX_FieldIndexPartRecord_Id");
|
||||||
|
});
|
||||||
|
SchemaBuilder.AlterTable("IntegerFieldIndexRecord", table => {
|
||||||
|
table.DropIndex("IX_PropertyName");
|
||||||
|
table.DropIndex("IX_FieldIndexPartRecord_Id");
|
||||||
|
});
|
||||||
|
SchemaBuilder.AlterTable("DoubleFieldIndexRecord", table => {
|
||||||
|
table.DropIndex("IX_PropertyName");
|
||||||
|
table.DropIndex("IX_FieldIndexPartRecord_Id");
|
||||||
|
});
|
||||||
|
SchemaBuilder.AlterTable("DecimalFieldIndexRecord", table => {
|
||||||
|
table.DropIndex("IX_PropertyName");
|
||||||
|
table.DropIndex("IX_FieldIndexPartRecord_Id");
|
||||||
|
});
|
||||||
|
|
||||||
|
AddPropertyNameAndFieldIndexPartRecordIdIndexes();
|
||||||
|
|
||||||
|
return 8;
|
||||||
|
}
|
||||||
|
|
||||||
// This change was originally in UpdateFrom5 on dev, but didn't exist on 1.10.x.
|
// This change was originally in UpdateFrom5 on dev, but didn't exist on 1.10.x.
|
||||||
private void MigratePropertyRecordToRewriteOutputCondition() {
|
private void MigratePropertyRecordToRewriteOutputCondition() {
|
||||||
SchemaBuilder.AlterTable("PropertyRecord", table => table
|
SchemaBuilder.AlterTable("PropertyRecord", table => table
|
||||||
@ -446,5 +444,24 @@ namespace Orchard.Projections {
|
|||||||
if (property.RewriteOutput) property.RewriteOutputCondition = "true";
|
if (property.RewriteOutput) property.RewriteOutputCondition = "true";
|
||||||
#pragma warning restore CS0618 // Type or member is obsolete
|
#pragma warning restore CS0618 // Type or member is obsolete
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void AddPropertyNameAndFieldIndexPartRecordIdIndexes() {
|
||||||
|
SchemaBuilder.AlterTable("StringFieldIndexRecord", table => {
|
||||||
|
table.CreateIndex("IDX_StringFieldIndexRecord_PropertyName", "PropertyName");
|
||||||
|
table.CreateIndex("IDX_StringFieldIndexRecord_FieldIndexPartRecord_Id", "FieldIndexPartRecord_Id");
|
||||||
|
});
|
||||||
|
SchemaBuilder.AlterTable("IntegerFieldIndexRecord", table => {
|
||||||
|
table.CreateIndex("IDX_IntegerFieldIndexRecord_PropertyName", "PropertyName");
|
||||||
|
table.CreateIndex("IDX_IntegerFieldIndexRecord_FieldIndexPartRecord_Id", "FieldIndexPartRecord_Id");
|
||||||
|
});
|
||||||
|
SchemaBuilder.AlterTable("DoubleFieldIndexRecord", table => {
|
||||||
|
table.CreateIndex("IDX_DoubleFieldIndexRecord_PropertyName", "PropertyName");
|
||||||
|
table.CreateIndex("IDX_DoubleFieldIndexRecord_FieldIndexPartRecord_Id", "FieldIndexPartRecord_Id");
|
||||||
|
});
|
||||||
|
SchemaBuilder.AlterTable("DecimalFieldIndexRecord", table => {
|
||||||
|
table.CreateIndex("IDX_DecimalFieldIndexRecord_PropertyName", "PropertyName");
|
||||||
|
table.CreateIndex("IDX_DecimalFieldIndexRecord_FieldIndexPartRecord_Id", "FieldIndexPartRecord_Id");
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,7 @@
|
|||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="NHibernate, Version=5.5.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
<Reference Include="NHibernate, Version=5.5.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\..\packages\NHibernate.5.5.2\lib\net48\NHibernate.dll</HintPath>
|
<HintPath>..\..\..\packages\NHibernate.5.5.2\lib\net48\NHibernate.dll</HintPath>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<packages>
|
<packages>
|
||||||
<package id="Antlr3.Runtime" version="3.5.1" targetFramework="net48" />
|
<package id="Antlr3.Runtime" version="3.5.1" targetFramework="net48" />
|
||||||
<package id="Iesi.Collections" version="4.0.4" targetFramework="net48" />
|
<package id="Iesi.Collections" version="4.0.4" targetFramework="net48" />
|
||||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
|
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||||
<package id="NHibernate" version="5.5.2" targetFramework="net48" />
|
<package id="NHibernate" version="5.5.2" targetFramework="net48" />
|
||||||
<package id="Remotion.Linq" version="2.2.0" targetFramework="net48" />
|
<package id="Remotion.Linq" version="2.2.0" targetFramework="net48" />
|
||||||
<package id="Remotion.Linq.EagerFetching" version="2.2.0" targetFramework="net48" />
|
<package id="Remotion.Linq.EagerFetching" version="2.2.0" targetFramework="net48" />
|
||||||
|
@ -57,10 +57,6 @@
|
|||||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||||
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
|
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||||
|
@ -5,5 +5,5 @@
|
|||||||
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
|
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
|
||||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="4.1.0" targetFramework="net48" />
|
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="4.1.0" targetFramework="net48" />
|
||||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
|
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||||
</packages>
|
</packages>
|
@ -66,7 +66,7 @@
|
|||||||
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="NHibernate, Version=5.5.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
<Reference Include="NHibernate, Version=5.5.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\..\packages\NHibernate.5.5.2\lib\net48\NHibernate.dll</HintPath>
|
<HintPath>..\..\..\packages\NHibernate.5.5.2\lib\net48\NHibernate.dll</HintPath>
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
|
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
|
||||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="4.1.0" targetFramework="net48" />
|
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="4.1.0" targetFramework="net48" />
|
||||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
|
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||||
<package id="NHibernate" version="5.5.2" targetFramework="net48" />
|
<package id="NHibernate" version="5.5.2" targetFramework="net48" />
|
||||||
<package id="Remotion.Linq" version="2.2.0" targetFramework="net48" />
|
<package id="Remotion.Linq" version="2.2.0" targetFramework="net48" />
|
||||||
<package id="Remotion.Linq.EagerFetching" version="2.2.0" targetFramework="net48" />
|
<package id="Remotion.Linq.EagerFetching" version="2.2.0" targetFramework="net48" />
|
||||||
|
@ -59,7 +59,7 @@
|
|||||||
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
@ -292,4 +292,4 @@
|
|||||||
</FlavorProperties>
|
</FlavorProperties>
|
||||||
</VisualStudio>
|
</VisualStudio>
|
||||||
</ProjectExtensions>
|
</ProjectExtensions>
|
||||||
</Project>
|
</Project>
|
@ -5,5 +5,5 @@
|
|||||||
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
|
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
|
||||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="4.1.0" targetFramework="net48" />
|
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="4.1.0" targetFramework="net48" />
|
||||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
|
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||||
</packages>
|
</packages>
|
@ -65,7 +65,7 @@
|
|||||||
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="NHibernate, Version=5.5.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
<Reference Include="NHibernate, Version=5.5.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\..\packages\NHibernate.5.5.2\lib\net48\NHibernate.dll</HintPath>
|
<HintPath>..\..\..\packages\NHibernate.5.5.2\lib\net48\NHibernate.dll</HintPath>
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
|
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
|
||||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="4.1.0" targetFramework="net48" />
|
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="4.1.0" targetFramework="net48" />
|
||||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
|
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||||
<package id="NHibernate" version="5.5.2" targetFramework="net48" />
|
<package id="NHibernate" version="5.5.2" targetFramework="net48" />
|
||||||
<package id="Remotion.Linq" version="2.2.0" targetFramework="net48" />
|
<package id="Remotion.Linq" version="2.2.0" targetFramework="net48" />
|
||||||
<package id="Remotion.Linq.EagerFetching" version="2.2.0" targetFramework="net48" />
|
<package id="Remotion.Linq.EagerFetching" version="2.2.0" targetFramework="net48" />
|
||||||
|
@ -79,17 +79,14 @@
|
|||||||
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\Npgsql.2.2.3\lib\net45\Mono.Security.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="MySql.Data, Version=6.7.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
<Reference Include="MySql.Data, Version=6.7.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\MySql.Data.6.7.9\lib\net45\MySql.Data.dll</HintPath>
|
<HintPath>..\packages\MySql.Data.6.7.9\lib\net45\MySql.Data.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Npgsql, Version=2.2.3.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7, processorArchitecture=MSIL">
|
<Reference Include="Npgsql, Version=4.0.17.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Npgsql.2.2.3\lib\net45\Npgsql.dll</HintPath>
|
<HintPath>..\packages\Npgsql.4.0.17\lib\net451\Npgsql.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="NuGet.Core, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="NuGet.Core, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Orchard.NuGet.Core.1.1.0.0\lib\NuGet.Core.dll</HintPath>
|
<HintPath>..\packages\Orchard.NuGet.Core.1.1.0.0\lib\NuGet.Core.dll</HintPath>
|
||||||
@ -98,6 +95,9 @@
|
|||||||
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
|
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
<Reference Include="System.ComponentModel.DataAnnotations">
|
<Reference Include="System.ComponentModel.DataAnnotations">
|
||||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||||
@ -107,7 +107,23 @@
|
|||||||
<HintPath>..\..\lib\sqlce\System.Data.SqlServerCe.dll</HintPath>
|
<HintPath>..\..\lib\sqlce\System.Data.SqlServerCe.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Numerics" />
|
||||||
|
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System.ServiceModel" />
|
<Reference Include="System.ServiceModel" />
|
||||||
|
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.2\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System.Web.ApplicationServices" />
|
<Reference Include="System.Web.ApplicationServices" />
|
||||||
<Reference Include="System.Web.DynamicData" />
|
<Reference Include="System.Web.DynamicData" />
|
||||||
<Reference Include="System.Web.Entity" />
|
<Reference Include="System.Web.Entity" />
|
||||||
|
@ -265,6 +265,14 @@
|
|||||||
<assemblyIdentity name="Microsoft.IdentityModel.Protocols" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
<assemblyIdentity name="Microsoft.IdentityModel.Protocols" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-5.7.0.0" newVersion="5.7.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-5.7.0.0" newVersion="5.7.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-4.1.3.0" newVersion="4.1.3.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
|
||||||
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
<!-- Registering Roslyn as a compiler for Dynamic Compilation. -->
|
<!-- Registering Roslyn as a compiler for Dynamic Compilation. -->
|
||||||
|
@ -13,8 +13,14 @@
|
|||||||
<package id="Microsoft.Owin.Host.SystemWeb" version="4.2.2" targetFramework="net48" />
|
<package id="Microsoft.Owin.Host.SystemWeb" version="4.2.2" targetFramework="net48" />
|
||||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||||
<package id="MySql.Data" version="6.7.9" targetFramework="net48" />
|
<package id="MySql.Data" version="6.7.9" targetFramework="net48" />
|
||||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
|
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||||
<package id="Npgsql" version="2.2.3" targetFramework="net48" />
|
<package id="Npgsql" version="4.0.17" targetFramework="net48" />
|
||||||
<package id="Orchard.NuGet.Core" version="1.1.0.0" targetFramework="net48" />
|
<package id="Orchard.NuGet.Core" version="1.1.0.0" targetFramework="net48" />
|
||||||
<package id="Owin" version="1.0" targetFramework="net48" />
|
<package id="Owin" version="1.0" targetFramework="net48" />
|
||||||
|
<package id="System.Buffers" version="4.5.1" targetFramework="net48" />
|
||||||
|
<package id="System.Memory" version="4.5.4" targetFramework="net48" />
|
||||||
|
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net48" />
|
||||||
|
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.3" targetFramework="net48" />
|
||||||
|
<package id="System.Threading.Tasks.Extensions" version="4.5.2" targetFramework="net48" />
|
||||||
|
<package id="System.ValueTuple" version="4.5.0" targetFramework="net48" />
|
||||||
</packages>
|
</packages>
|
@ -87,7 +87,7 @@
|
|||||||
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="NHibernate, Version=5.5.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
<Reference Include="NHibernate, Version=5.5.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\NHibernate.5.5.2\lib\net48\NHibernate.dll</HintPath>
|
<HintPath>..\packages\NHibernate.5.5.2\lib\net48\NHibernate.dll</HintPath>
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
|
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
|
||||||
<package id="Microsoft.Owin" version="4.2.2" targetFramework="net48" />
|
<package id="Microsoft.Owin" version="4.2.2" targetFramework="net48" />
|
||||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
|
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||||
<package id="NHibernate" version="5.5.2" targetFramework="net48" />
|
<package id="NHibernate" version="5.5.2" targetFramework="net48" />
|
||||||
<package id="Owin" version="1.0" targetFramework="net48" />
|
<package id="Owin" version="1.0" targetFramework="net48" />
|
||||||
<package id="Remotion.Linq" version="2.2.0" targetFramework="net48" />
|
<package id="Remotion.Linq" version="2.2.0" targetFramework="net48" />
|
||||||
|
Loading…
Reference in New Issue
Block a user