Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge 1.10.x into dev #8821

Merged
merged 10 commits into from
Dec 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion .github/workflows/compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 0 additions & 6 deletions CREDITS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
26 changes: 10 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.

[![Join the chat at https://gitter.im/OrchardCMS/Orchard](https://badges.gitter.im/Join%20Chat.svg)](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.

[![Deploy to Azure](https://azuredeploy.net/deploybutton.png)](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.

Expand All @@ -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 projects 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

Expand All @@ -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)
8 changes: 8 additions & 0 deletions src/Orchard.Specs/App.Config
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
41 changes: 21 additions & 20 deletions src/Orchard.Tests.Modules/Media/Services/MediaServiceTests.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -53,10 +53,10 @@ public void GetPublicUrlTests() {
[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");
Expand Down Expand Up @@ -94,7 +94,7 @@ public void UnzipMediaFileArchiveAdministratorTest() {
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));
}

Expand Down Expand Up @@ -160,29 +160,30 @@ public void WebConfigIsBlackListed() {
}

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);
Expand Down
4 changes: 1 addition & 3 deletions src/Orchard.Tests.Modules/Orchard.Tests.Modules.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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" />
Expand Down
3 changes: 1 addition & 2 deletions src/Orchard.Tests.Modules/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Expand All @@ -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" />
Expand Down
2 changes: 1 addition & 1 deletion src/Orchard.Tests/Orchard.Framework.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion src/Orchard.Tests/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Expand Down
8 changes: 8 additions & 0 deletions src/Orchard.Web.Tests/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Loading