mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-04-05 04:54:14 +08:00
Merge branch '1.10.x-to-dev' into dev
This commit is contained in:
commit
c35bdb2389
24
.github/workflows/compile.yml
vendored
24
.github/workflows/compile.yml
vendored
@ -27,11 +27,33 @@ jobs:
|
||||
uses: microsoft/setup-msbuild@v2
|
||||
|
||||
- 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
|
||||
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:
|
||||
name: Compile client-side assets
|
||||
defaults:
|
||||
|
@ -52,12 +52,6 @@ Website: http://dlr.codeplex.com
|
||||
Copyright: Copyright (c) Microsoft Corporation
|
||||
License: Apache Software Foundation License 2.0
|
||||
|
||||
DotNetZip
|
||||
-----
|
||||
Website: http://dotnetzip.codeplex.com/
|
||||
Copyright:
|
||||
License: MS-PL
|
||||
|
||||
Eric Meyer's Reset CSS
|
||||
-----
|
||||
Website: http://meyerweb.com/eric/tools/css/reset/
|
||||
|
26
README.md
26
README.md
@ -1,16 +1,14 @@
|
||||
# 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.
|
||||
|
||||
[](https://portal.azure.com/#create/OutercurveFoundation.OrchardCMS)
|
||||
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).
|
||||
|
||||
## 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.
|
||||
|
||||
@ -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*).
|
||||
|
||||
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.
|
||||
|
||||
* [Download the latest release](https://github.com/OrchardCMS/Orchard/releases)
|
||||
* [Feature roadmap](https://docs.orchardproject.net/en/latest/Documentation/Feature-roadmap/)
|
||||
* [Docs and designs/specs](https://docs.orchardproject.net)
|
||||
* [Feature roadmap](https://docs.orchardcore.net/projects/O1/en/latest/Documentation/Feature-roadmap/)
|
||||
* [Docs and designs/specs](https://docs.orchardcore.net/projects/O1/en/latest/)
|
||||
|
||||
## 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)
|
||||
* [Propose a feature idea](https://github.com/OrchardCMS/Orchard/issues/new)
|
||||
* [Ask and answer questions on Stack Overflow](https://stackoverflow.com/questions/tagged/orchardcms)
|
||||
* [Participate in our gitter.im chatroom](https://gitter.im/OrchardCMS/Orchard)
|
||||
* [Submit a pull request](https://docs.orchardproject.net/en/latest/Documentation/Contributing-patches/)
|
||||
* [Join us on Discord](https://orchardcore.net/discord)
|
||||
* [Submit a pull request](https://docs.orchardcore.net/projects/O1/en/latest/Documentation/Contributing-patches/)
|
||||
* [Translate Orchard](https://crowdin.com/project/orchard-cms)
|
||||
* [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.
|
||||
* [Contribute modules and themes to our gallery](https://gallery.orchardproject.net)
|
||||
|
@ -42,6 +42,14 @@
|
||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
|
||||
</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>
|
||||
</runtime>
|
||||
<specFlow>
|
||||
|
@ -1,8 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Linq;
|
||||
using Ionic.Zip;
|
||||
using NUnit.Framework;
|
||||
using Orchard.Environment.Configuration;
|
||||
using Orchard.FileSystems.Media;
|
||||
@ -53,10 +53,10 @@ namespace Orchard.Tests.Modules.Media.Services {
|
||||
[Test]
|
||||
public void GetMediaFoldersTest() {
|
||||
StorageProvider.ListFoldersPredicate = path => {
|
||||
return string.IsNullOrEmpty(path) ? new[] {new StubStorageFolder(FolderName1)}
|
||||
: string.Equals(path, FolderName1) ? new[] {new StubStorageFolder(FolderName2), new StubStorageFolder(FolderName3)}
|
||||
return string.IsNullOrEmpty(path) ? new[] { new StubStorageFolder(FolderName1) }
|
||||
: string.Equals(path, FolderName1) ? new[] { new StubStorageFolder(FolderName2), new StubStorageFolder(FolderName3) }
|
||||
: new StubStorageFolder[] { };
|
||||
};
|
||||
};
|
||||
|
||||
IEnumerable<MediaFolder> mediaFolders = MediaService.GetMediaFolders(null);
|
||||
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, 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.Count, Is.EqualTo(3));
|
||||
}
|
||||
|
||||
@ -160,29 +160,30 @@ namespace Orchard.Tests.Modules.Media.Services {
|
||||
}
|
||||
|
||||
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
|
||||
MemoryStream memoryStream = new MemoryStream();
|
||||
using (ZipFile zipOut = new ZipFile()) {
|
||||
|
||||
zipOut.AddEntry(TextFileName, new byte[] { 0x01 });
|
||||
zipOut.AddEntry(WebconfigFileName, new byte[] { 0x02 });
|
||||
zipOut.AddEntry(DllFileName, new byte[] { 0x03 });
|
||||
zipOut.AddEntry(ZipFileName, new byte[] { 0x04 });
|
||||
zipOut.AddEntry(NoExtensionFileName, new byte[] { 0x05 });
|
||||
zipOut.AddEntry(PaddedWebconfigFileName, new byte[] { 0x06 });
|
||||
zipOut.AddEntry(FinalDottedWebconfigFileName, new byte[] { 0x07 });
|
||||
zipOut.AddEntry(PaddedTextFileName, new byte[] { 0x08 });
|
||||
zipOut.AddEntry(FinalDottedTextFileName, new byte[] { 0x09 });
|
||||
|
||||
zipOut.Save(memoryStream);
|
||||
using (var archive = new ZipArchive(memoryStream, ZipArchiveMode.Create, leaveOpen: true)) {
|
||||
var content = new byte[] { 0x01 };
|
||||
foreach (var entry in entries) {
|
||||
var zipEntry = archive.CreateEntry(entry);
|
||||
using (var zipStream = zipEntry.Open()) {
|
||||
zipStream.Write(content, 0, 1);
|
||||
}
|
||||
++content[0];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return new MemoryStream(memoryStream.ToArray());
|
||||
}
|
||||
|
||||
private class MediaServiceAccessor : MediaService {
|
||||
public MediaServiceAccessor(IStorageProvider storageProvider, IOrchardServices orchardServices)
|
||||
: base (storageProvider, orchardServices) {}
|
||||
: base(storageProvider, orchardServices) { }
|
||||
|
||||
public void UnzipMediaFileArchiveAccessor(string targetFolder, Stream zipStream) {
|
||||
UnzipMediaFileArchive(targetFolder, zipStream);
|
||||
|
@ -67,9 +67,6 @@
|
||||
<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>
|
||||
</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">
|
||||
<HintPath>..\packages\FluentNHibernate.3.1.0\lib\net461\FluentNHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
@ -141,6 +138,7 @@
|
||||
<HintPath>..\..\lib\sqlce\System.Data.SqlServerCe.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.IO.Compression" />
|
||||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.Transactions" />
|
||||
<Reference Include="System.Web" />
|
||||
|
@ -3,7 +3,6 @@
|
||||
<package id="Antlr3.Runtime" version="3.5.1" targetFramework="net48" />
|
||||
<package id="Autofac" version="3.5.2" 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="Iesi.Collections" version="4.0.4" 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.Web.Infrastructure" version="1.0.0.0" 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="NUnit" version="2.5.10.11092" 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>
|
||||
</Reference>
|
||||
<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 Include="NHibernate, Version=5.5.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<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.Web.Infrastructure" version="1.0.0.0" 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="NUnit" version="2.5.10.11092" targetFramework="net48" />
|
||||
<package id="NUnitTestAdapter" version="2.3.0" targetFramework="net48" />
|
||||
|
@ -34,6 +34,14 @@
|
||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
|
||||
</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>
|
||||
</runtime>
|
||||
</configuration>
|
||||
|
@ -2,7 +2,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.Aspects;
|
||||
using Orchard.ContentManagement.Handlers;
|
||||
@ -16,6 +15,7 @@ using Orchard.Localization;
|
||||
using Orchard.Logging;
|
||||
using Orchard.Mvc.Extensions;
|
||||
using Orchard.Mvc.Html;
|
||||
using Orchard.Security;
|
||||
using Orchard.UI;
|
||||
using Orchard.UI.Navigation;
|
||||
using Orchard.UI.Notify;
|
||||
@ -25,50 +25,50 @@ using Orchard.Utility.Extensions;
|
||||
namespace Orchard.Core.Navigation.Controllers {
|
||||
[ValidateInput(false)]
|
||||
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 INavigationManager _navigationManager;
|
||||
private readonly IEnumerable<IContentHandler> _handlers;
|
||||
private readonly IMenuManager _menuManager;
|
||||
private readonly IContentManager _contentManager;
|
||||
private readonly ITransactionManager _transactionManager;
|
||||
|
||||
public AdminController(
|
||||
IOrchardServices orchardServices,
|
||||
IContentManager contentManager,
|
||||
ITransactionManager transactionManager,
|
||||
IMenuService menuService,
|
||||
IMenuManager menuManager,
|
||||
INavigationManager navigationManager,
|
||||
IEnumerable<IContentHandler> handlers) {
|
||||
_contentManager = contentManager;
|
||||
_transactionManager = transactionManager;
|
||||
_contentManager = orchardServices.ContentManager;
|
||||
_transactionManager = orchardServices.TransactionManager;
|
||||
_authorizer = orchardServices.Authorizer;
|
||||
_notifier = orchardServices.Notifier;
|
||||
_menuService = menuService;
|
||||
_menuManager = menuManager;
|
||||
_navigationManager = navigationManager;
|
||||
_handlers = handlers;
|
||||
|
||||
Services = orchardServices;
|
||||
T = NullLocalizer.Instance;
|
||||
Logger = NullLogger.Instance;
|
||||
}
|
||||
|
||||
public Localizer T { get; set; }
|
||||
public ILogger Logger { get; set; }
|
||||
public IOrchardServices Services { get; set; }
|
||||
|
||||
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);
|
||||
|
||||
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 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()) {
|
||||
return new HttpUnauthorizedResult();
|
||||
@ -87,7 +87,11 @@ namespace Orchard.Core.Navigation.Controllers {
|
||||
}
|
||||
|
||||
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();
|
||||
@ -100,7 +104,10 @@ namespace Orchard.Core.Navigation.Controllers {
|
||||
|
||||
[HttpPost, ActionName("Index")]
|
||||
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();
|
||||
|
||||
// See https://github.com/OrchardCMS/Orchard/issues/948
|
||||
@ -123,25 +130,15 @@ namespace Orchard.Core.Navigation.Controllers {
|
||||
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]
|
||||
public ActionResult Delete(int id) {
|
||||
|
||||
MenuPart menuPart = _menuService.Get(id);
|
||||
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();
|
||||
|
||||
if (menuPart != null) {
|
||||
@ -155,7 +152,8 @@ namespace Orchard.Core.Navigation.Controllers {
|
||||
|
||||
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 (!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;
|
||||
}
|
||||
else {
|
||||
@ -168,26 +166,18 @@ namespace Orchard.Core.Navigation.Controllers {
|
||||
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) {
|
||||
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();
|
||||
|
||||
// create a new temporary menu item
|
||||
var menuPart = Services.ContentManager.New<MenuPart>(id);
|
||||
var menuPart = _contentManager.New<MenuPart>(id);
|
||||
|
||||
if (menuPart == null)
|
||||
return HttpNotFound();
|
||||
|
||||
// load the menu
|
||||
var menu = Services.ContentManager.Get(menuId);
|
||||
var menu = _contentManager.Get(menuId);
|
||||
|
||||
if (menu == null)
|
||||
return HttpNotFound();
|
||||
@ -196,7 +186,7 @@ namespace Orchard.Core.Navigation.Controllers {
|
||||
// filter the content items for this specific menu
|
||||
menuPart.MenuPosition = Position.GetNext(_navigationManager.BuildMenu(menu));
|
||||
menuPart.Menu = menu;
|
||||
var model = Services.ContentManager.BuildEditor(menuPart);
|
||||
var model = _contentManager.BuildEditor(menuPart);
|
||||
|
||||
return View(model);
|
||||
}
|
||||
@ -206,32 +196,32 @@ namespace Orchard.Core.Navigation.Controllers {
|
||||
}
|
||||
|
||||
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"));
|
||||
}
|
||||
}
|
||||
|
||||
[HttpPost, ActionName("CreateMenuItem")]
|
||||
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();
|
||||
var menuPart = Services.ContentManager.New<MenuPart>(id);
|
||||
var menuPart = _contentManager.New<MenuPart>(id);
|
||||
if (menuPart == null)
|
||||
return HttpNotFound();
|
||||
// load the menu
|
||||
var menu = Services.ContentManager.Get(menuId);
|
||||
var menu = _contentManager.Get(menuId);
|
||||
if (menu == null)
|
||||
return HttpNotFound();
|
||||
|
||||
menuPart.Menu = menu;
|
||||
var model = Services.ContentManager.UpdateEditor(menuPart, this);
|
||||
var model = _contentManager.UpdateEditor(menuPart, this);
|
||||
menuPart.MenuPosition = Position.GetNext(_navigationManager.BuildMenu(menu));
|
||||
Services.ContentManager.Create(menuPart);
|
||||
_contentManager.Create(menuPart);
|
||||
if (!ModelState.IsValid) {
|
||||
Services.TransactionManager.Cancel();
|
||||
_transactionManager.Cancel();
|
||||
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"));
|
||||
}
|
||||
|
||||
@ -241,7 +231,7 @@ namespace Orchard.Core.Navigation.Controllers {
|
||||
if (contentItem == null)
|
||||
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();
|
||||
|
||||
var model = _contentManager.BuildEditor(contentItem);
|
||||
@ -252,20 +242,81 @@ namespace Orchard.Core.Navigation.Controllers {
|
||||
[Mvc.FormValueRequired("submit.Publish")]
|
||||
public ActionResult EditPOST(int id, string returnUrl) {
|
||||
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);
|
||||
});
|
||||
}
|
||||
|
||||
private ActionResult EditPOST(int id, string returnUrl, Action<ContentItem> conditionallyPublish) {
|
||||
var contentItem = _contentManager.Get(id, VersionOptions.DraftRequired);
|
||||
|
||||
if (contentItem == null)
|
||||
[HttpPost]
|
||||
// Copy of Contents/AdminController/Publish, but with different permission check and redirect.
|
||||
public ActionResult Publish(int id) {
|
||||
var menuPart = _contentManager.GetLatest<MenuPart>(id);
|
||||
if (menuPart == null)
|
||||
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();
|
||||
|
||||
_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;
|
||||
if (contentItem.Has<IAliasAspect>()
|
||||
&& !string.IsNullOrWhiteSpace(returnUrl)
|
||||
@ -290,11 +341,22 @@ namespace Orchard.Core.Navigation.Controllers {
|
||||
returnUrl = Url.ItemDisplayUrl(contentItem);
|
||||
}
|
||||
|
||||
Services.Notifier.Information(string.IsNullOrWhiteSpace(contentItem.TypeDefinition.DisplayName)
|
||||
? T("Your content has been saved.")
|
||||
: T("Your {0} has been saved.", contentItem.TypeDefinition.DisplayName));
|
||||
_notifier.Success(
|
||||
string.IsNullOrWhiteSpace(menuPart.MenuText)
|
||||
? 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) {
|
||||
return _contentManager
|
||||
.Query<MenuPart, MenuPartRecord>()
|
||||
.Where( x => x.MenuId == menuId)
|
||||
.Query<MenuPart, MenuPartRecord>(VersionOptions.Latest)
|
||||
.Where(x => x.MenuId == menuId)
|
||||
.List();
|
||||
}
|
||||
|
||||
public IContent GetMenu(string menuName) {
|
||||
if(string.IsNullOrWhiteSpace(menuName)) {
|
||||
if (string.IsNullOrWhiteSpace(menuName)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -37,7 +37,7 @@ namespace Orchard.Core.Navigation.Services {
|
||||
}
|
||||
|
||||
public IContent GetMenu(int menuId) {
|
||||
return _contentManager.Get(menuId, VersionOptions.Published);
|
||||
return _contentManager.Get(menuId, VersionOptions.Published);
|
||||
}
|
||||
|
||||
public MenuPart Get(int menuPartId) {
|
||||
@ -45,11 +45,11 @@ namespace Orchard.Core.Navigation.Services {
|
||||
}
|
||||
|
||||
public IContent Create(string name) {
|
||||
|
||||
if(string.IsNullOrWhiteSpace(name)) {
|
||||
|
||||
if (string.IsNullOrWhiteSpace(name)) {
|
||||
throw new ArgumentNullException(name);
|
||||
}
|
||||
|
||||
|
||||
var menu = _contentManager.Create("Menu");
|
||||
menu.As<TitlePart>().Title = name;
|
||||
|
||||
|
@ -1,4 +1,6 @@
|
||||
@model NavigationManagementViewModel
|
||||
|
||||
@using Orchard.ContentManagement;
|
||||
@using Orchard.Core.Navigation.ViewModels;
|
||||
@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-actions action-links">
|
||||
<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">
|
||||
@Html.ItemEditLink(T("Edit").Text, menuPartEntry.ContentItem, new { returnUrl = Request.RawUrl })
|
||||
</span>
|
||||
<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>
|
||||
</div>
|
||||
|
@ -55,7 +55,7 @@
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
</dependentAssembly>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
<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>
|
||||
</Reference>
|
||||
<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 Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
@ -250,4 +250,4 @@
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
||||
</Project>
|
@ -5,5 +5,5 @@
|
||||
<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.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
|
||||
</packages>
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||
</packages>
|
@ -65,7 +65,7 @@
|
||||
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||
</Reference>
|
||||
<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 Include="NHibernate, Version=5.5.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<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.CodeDom.Providers.DotNetCompilerPlatform" version="4.1.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="Remotion.Linq" 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>
|
||||
</Reference>
|
||||
<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 Include="NHibernate, Version=5.5.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<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.Web.Infrastructure" version="1.0.0.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="Orchard.WindowsAzure.Diagnostics" version="2.7.0.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>
|
||||
</Reference>
|
||||
<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 Include="NHibernate, Version=5.5.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<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.WindowsAzure.Caching" version="2.4.0.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="Orchard.WindowsAzure.ServiceRuntime" version="2.7.0.0" targetFramework="net48" />
|
||||
<package id="Remotion.Linq" version="2.2.0" targetFramework="net48" />
|
||||
|
@ -21,7 +21,7 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>..\..\..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSet>..\..\..\..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
@ -35,16 +35,22 @@
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<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>
|
||||
</Reference>
|
||||
<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>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\..\packages\NHibernate.5.3.10\lib\net461\NHibernate.dll</HintPath>
|
||||
<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>
|
||||
</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>
|
||||
</Reference>
|
||||
<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());
|
||||
File.WriteAllText(propertiesPath + "\\AssemblyInfo.cs", templateText);
|
||||
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);
|
||||
|
||||
@ -168,7 +170,7 @@ namespace Orchard.CodeGeneration.Commands {
|
||||
csprojText = csprojText.Replace("$$ProjectName$$", projectName);
|
||||
csprojText = csprojText.Replace("$$TestsProjectGuid$$", projectGuid);
|
||||
csprojText = csprojText.Replace("$$FileIncludes$$", itemGroup ?? "");
|
||||
csprojText = csprojText.Replace("$$OrchardReferences$$", GetOrchardReferences());
|
||||
csprojText = csprojText.Replace("$$OrchardReferences$$", GetOrchardReferences(modulesFolderRelativeDepth: 3));
|
||||
|
||||
File.WriteAllText(testsPath + projectName + ".csproj", csprojText);
|
||||
|
||||
@ -327,15 +329,17 @@ namespace Orchard.CodeGeneration.Commands {
|
||||
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() ?
|
||||
@"<ProjectReference Include=""..\..\..\Orchard\Orchard.Framework.csproj"">
|
||||
<Project>{2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6}</Project>
|
||||
$@"<ProjectReference Include=""{frameworkRelativeDepth}\Orchard\Orchard.Framework.csproj"">
|
||||
<Project>{{2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6}}</Project>
|
||||
<Name>Orchard.Framework</Name>
|
||||
<Private>$(MvcBuildViews)</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include=""..\..\Core\Orchard.Core.csproj"">
|
||||
<Project>{9916839C-39FC-4CEB-A5AF-89CA7E87119F}</Project>
|
||||
<ProjectReference Include=""{coreRelativeDepth}\Core\Orchard.Core.csproj"">
|
||||
<Project>{{9916839C-39FC-4CEB-A5AF-89CA7E87119F}}</Project>
|
||||
<Name>Orchard.Core</Name>
|
||||
<Private>$(MvcBuildViews)</Private>
|
||||
</ProjectReference>" :
|
||||
|
@ -88,6 +88,7 @@
|
||||
<Compile Include="Services\CodeGenerationCommandInterpreter.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="CodeGenerationTemplates\ModuleTestsPackagesConfig.txt" />
|
||||
<Content Include="CodeGenerationTemplates\ModuleStylesMinCss.txt" />
|
||||
<Content Include="CodeGenerationTemplates\ModuleStylesCss.txt" />
|
||||
<Content Include="CodeGenerationTemplates\ModuleStylesLess.txt" />
|
||||
@ -158,4 +159,4 @@
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
||||
</Project>
|
@ -70,7 +70,7 @@
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<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 Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
|
||||
<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.Security" version="4.2.2" 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" />
|
||||
</packages>
|
@ -66,7 +66,7 @@
|
||||
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||
</Reference>
|
||||
<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 Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
|
@ -8,5 +8,5 @@
|
||||
<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.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>
|
@ -69,7 +69,7 @@
|
||||
<HintPath>..\..\..\packages\MimeKit.3.1.1\lib\net48\MimeKit.dll</HintPath>
|
||||
</Reference>
|
||||
<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 Include="System" />
|
||||
<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.Web.Infrastructure" version="1.0.0.0" 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="System.Buffers" version="4.5.1" targetFramework="net48" />
|
||||
</packages>
|
@ -1,11 +1,10 @@
|
||||
using Orchard.ContentManagement;
|
||||
using System;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.Drivers;
|
||||
using Orchard.ContentManagement.Handlers;
|
||||
using Orchard.Fields.Fields;
|
||||
using Orchard.Fields.Settings;
|
||||
using Orchard.Localization;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Orchard.Fields.Drivers {
|
||||
public class LinkFieldDriver : ContentFieldDriver<LinkField> {
|
||||
@ -39,10 +38,10 @@ namespace Orchard.Fields.Drivers {
|
||||
() => {
|
||||
if (part.IsNew()) {
|
||||
var settings = field.PartFieldDefinition.Settings.GetModel<LinkFieldSettings>();
|
||||
if (String.IsNullOrEmpty(field.Value)) {
|
||||
if (string.IsNullOrEmpty(field.Value)) {
|
||||
field.Value = settings.DefaultValue;
|
||||
}
|
||||
if (String.IsNullOrEmpty(field.Text)) {
|
||||
if (string.IsNullOrEmpty(field.Text)) {
|
||||
field.Text = settings.TextDefaultValue;
|
||||
}
|
||||
}
|
||||
@ -54,13 +53,29 @@ namespace Orchard.Fields.Drivers {
|
||||
if (updater.TryUpdateModel(field, GetPrefix(field, part), null, null)) {
|
||||
var settings = field.PartFieldDefinition.Settings.GetModel<LinkFieldSettings>();
|
||||
|
||||
if (settings.Required && String.IsNullOrWhiteSpace(field.Value)) {
|
||||
updater.AddModelError(GetPrefix(field, part), T("Url is required for {0}.", T(field.DisplayName)));
|
||||
if (settings.Required && string.IsNullOrWhiteSpace(field.Value)) {
|
||||
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)) {
|
||||
updater.AddModelError(GetPrefix(field, part), T("{0} is an invalid url.", field.Value));
|
||||
else if (!string.IsNullOrWhiteSpace(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)));
|
||||
}
|
||||
}
|
||||
@ -89,7 +104,7 @@ namespace Orchard.Fields.Drivers {
|
||||
protected override void Describe(DescribeMembersContext context) {
|
||||
context
|
||||
.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 });
|
||||
}
|
||||
}
|
||||
|
@ -25,7 +25,7 @@
|
||||
</div>
|
||||
<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 }))
|
||||
<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>
|
||||
@if (settings.LinkTextMode == LinkTextMode.Optional || settings.LinkTextMode == LinkTextMode.Required) {
|
||||
<div class="editor-label">
|
||||
|
@ -55,7 +55,7 @@
|
||||
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||
</Reference>
|
||||
<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 Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
@ -173,4 +173,4 @@
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
||||
</Project>
|
@ -4,5 +4,5 @@
|
||||
<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.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
|
||||
</packages>
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||
</packages>
|
@ -93,7 +93,7 @@
|
||||
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||
</Reference>
|
||||
<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 Include="NHibernate, Version=5.5.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<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.Security" version="4.2.2" 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="Owin" version="1.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>
|
||||
</Reference>
|
||||
<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 Include="System" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
@ -196,4 +196,4 @@
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
||||
</Project>
|
@ -5,5 +5,5 @@
|
||||
<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.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
|
||||
</packages>
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||
</packages>
|
@ -59,7 +59,7 @@
|
||||
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||
</Reference>
|
||||
<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 Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
|
@ -7,6 +7,6 @@
|
||||
<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.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" />
|
||||
</packages>
|
@ -52,9 +52,6 @@
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<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">
|
||||
<HintPath>..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.4.1.0\lib\net472\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
|
||||
</Reference>
|
||||
@ -64,6 +61,7 @@
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.IO.Compression" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.ApplicationServices" />
|
||||
<Reference Include="System.Web.DynamicData" />
|
||||
@ -204,4 +202,4 @@
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
||||
</Project>
|
@ -1,9 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using Ionic.Zip;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.FileSystems.Media;
|
||||
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="extractZip">Boolean value indicating weather zip files should be extracted.</param>
|
||||
/// <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(fileName, "fileName");
|
||||
Argument.ThrowIfNull(bytes, "bytes");
|
||||
@ -274,16 +274,16 @@ namespace Orchard.Media.Services {
|
||||
|
||||
// must be in the whitelist
|
||||
MediaSettingsPart mediaSettings = currentSite.As<MediaSettingsPart>();
|
||||
|
||||
|
||||
if (mediaSettings == null) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
@ -305,28 +305,26 @@ namespace Orchard.Media.Services {
|
||||
Argument.ThrowIfNullOrEmpty(targetFolder, "targetFolder");
|
||||
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
|
||||
// of flattening it.
|
||||
// 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
|
||||
// before the directories that contain them, so we create directories as soon as first
|
||||
// file below their path is encountered.
|
||||
foreach (ZipEntry entry in fileInflater) {
|
||||
foreach (var entry in fileInflater.Entries) {
|
||||
if (entry == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!entry.IsDirectory && !string.IsNullOrEmpty(entry.FileName)) {
|
||||
|
||||
if (!string.IsNullOrEmpty(entry.Name)) {
|
||||
// skip disallowed files
|
||||
if (FileAllowed(entry.FileName, false)) {
|
||||
string fullFileName = _storageProvider.Combine(targetFolder, entry.FileName);
|
||||
if (FileAllowed(entry.Name, false)) {
|
||||
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
|
||||
if (!_storageProvider.TrySaveStream(fullFileName, stream)) {
|
||||
|
||||
// try to delete the file and save again
|
||||
try {
|
||||
_storageProvider.DeleteFile(fullFileName);
|
||||
|
@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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.Razor" version="3.2.7" targetFramework="net48" />
|
||||
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
|
||||
|
@ -70,7 +70,7 @@
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<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 Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
|
||||
<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.Security" version="4.2.2" 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="RestEase" version="1.4.9" targetFramework="net48" />
|
||||
</packages>
|
@ -59,7 +59,7 @@
|
||||
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||
</Reference>
|
||||
<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 Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
@ -477,4 +477,4 @@
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
||||
</Project>
|
@ -5,5 +5,5 @@
|
||||
<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.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
|
||||
</packages>
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||
</packages>
|
@ -149,7 +149,7 @@
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<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 Include="NHibernate, Version=5.5.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<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.Twitter" version="4.2.2" 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="Owin" version="1.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());
|
||||
|
||||
//Adds indexes for better performances in queries
|
||||
SchemaBuilder.AlterTable("StringFieldIndexRecord", table => table.CreateIndex("IX_PropertyName", new string[] { "PropertyName" }));
|
||||
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" }));
|
||||
AddPropertyNameAndFieldIndexPartRecordIdIndexes();
|
||||
|
||||
// Query
|
||||
|
||||
@ -318,7 +308,7 @@ namespace Orchard.Projections {
|
||||
Description = T("The text from the Body part").Text
|
||||
});
|
||||
|
||||
return 7;
|
||||
return 8;
|
||||
}
|
||||
|
||||
public int UpdateFrom1() {
|
||||
@ -375,22 +365,7 @@ namespace Orchard.Projections {
|
||||
.AddColumn<decimal>("LatestValue"));
|
||||
|
||||
//Adds indexes for better performances in queries
|
||||
SchemaBuilder.AlterTable("StringFieldIndexRecord", table => {
|
||||
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");
|
||||
});
|
||||
AddPropertyNameAndFieldIndexPartRecordIdIndexes();
|
||||
|
||||
SchemaBuilder.AlterTable("QueryPartRecord", table => table
|
||||
.AddColumn<string>("VersionScope", c => c.WithLength(15)));
|
||||
@ -434,6 +409,29 @@ namespace Orchard.Projections {
|
||||
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.
|
||||
private void MigratePropertyRecordToRewriteOutputCondition() {
|
||||
SchemaBuilder.AlterTable("PropertyRecord", table => table
|
||||
@ -446,5 +444,24 @@ namespace Orchard.Projections {
|
||||
if (property.RewriteOutput) property.RewriteOutputCondition = "true";
|
||||
#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 Include="Microsoft.CSharp" />
|
||||
<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 Include="NHibernate, Version=5.5.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\NHibernate.5.5.2\lib\net48\NHibernate.dll</HintPath>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<packages>
|
||||
<package id="Antlr3.Runtime" version="3.5.1" 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="Remotion.Linq" 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" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
</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>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
<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>
|
||||
</Reference>
|
||||
<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 Include="System" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
|
@ -5,5 +5,5 @@
|
||||
<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.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
|
||||
</packages>
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||
</packages>
|
@ -66,7 +66,7 @@
|
||||
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||
</Reference>
|
||||
<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 Include="NHibernate, Version=5.5.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<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.CodeDom.Providers.DotNetCompilerPlatform" version="4.1.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="Remotion.Linq" 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>
|
||||
</Reference>
|
||||
<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 Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
@ -292,4 +292,4 @@
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
||||
</Project>
|
@ -5,5 +5,5 @@
|
||||
<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.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
|
||||
</packages>
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
|
||||
</packages>
|
@ -65,7 +65,7 @@
|
||||
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||
</Reference>
|
||||
<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 Include="NHibernate, Version=5.5.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<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.CodeDom.Providers.DotNetCompilerPlatform" version="4.1.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="Remotion.Linq" 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">
|
||||
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||
</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">
|
||||
<HintPath>..\packages\MySql.Data.6.7.9\lib\net45\MySql.Data.dll</HintPath>
|
||||
</Reference>
|
||||
<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 Include="Npgsql, Version=2.2.3.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Npgsql.2.2.3\lib\net45\Npgsql.dll</HintPath>
|
||||
<Reference Include="Npgsql, Version=4.0.17.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Npgsql.4.0.17\lib\net451\Npgsql.dll</HintPath>
|
||||
</Reference>
|
||||
<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>
|
||||
@ -98,6 +95,9 @@
|
||||
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
|
||||
</Reference>
|
||||
<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.ComponentModel.DataAnnotations">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
@ -107,7 +107,23 @@
|
||||
<HintPath>..\..\lib\sqlce\System.Data.SqlServerCe.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</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.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.DynamicData" />
|
||||
<Reference Include="System.Web.Entity" />
|
||||
|
@ -265,6 +265,14 @@
|
||||
<assemblyIdentity name="Microsoft.IdentityModel.Protocols" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.7.0.0" newVersion="5.7.0.0" />
|
||||
</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>
|
||||
</runtime>
|
||||
<!-- 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.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||
<package id="MySql.Data" version="6.7.9" targetFramework="net48" />
|
||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
|
||||
<package id="Npgsql" version="2.2.3" targetFramework="net48" />
|
||||
<package id="Newtonsoft.Json" version="13.0.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="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>
|
@ -87,7 +87,7 @@
|
||||
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||
</Reference>
|
||||
<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 Include="NHibernate, Version=5.5.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<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.Owin" version="4.2.2" 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="Owin" version="1.0" targetFramework="net48" />
|
||||
<package id="Remotion.Linq" version="2.2.0" targetFramework="net48" />
|
||||
|
Loading…
Reference in New Issue
Block a user