mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Compare commits
70 Commits
issue/8686
...
issue/8773
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
70e13666f7 | ||
|
|
7b07ab9b3b | ||
|
|
04e9c73391 | ||
|
|
530d2a9221 | ||
|
|
8b9b5fb2ee | ||
|
|
8086c01fb8 | ||
|
|
e243e8e547 | ||
|
|
441c6da145 | ||
|
|
7f2e467ab8 | ||
|
|
f30a472cb3 | ||
|
|
3ce50256f9 | ||
|
|
39ea4c7f79 | ||
|
|
832a0c8515 | ||
|
|
fb1aa73475 | ||
|
|
151bb12ce6 | ||
|
|
5aaf46bcde | ||
|
|
9b57673e9a | ||
|
|
005338403d | ||
|
|
1900b35cd5 | ||
|
|
4a05e77775 | ||
|
|
2d7ce45d1e | ||
|
|
5f34102f70 | ||
|
|
068b616b8a | ||
|
|
d2f4d7ec53 | ||
|
|
eaa432260e | ||
|
|
2fd4d28c8b | ||
|
|
a803d7bc2d | ||
|
|
8449eade95 | ||
|
|
44dcc86386 | ||
|
|
b5ad09e6db | ||
|
|
5e928e7980 | ||
|
|
041a3613bc | ||
|
|
2d0630da69 | ||
|
|
8dec61baab | ||
|
|
d80513aba0 | ||
|
|
391c032bf3 | ||
|
|
c420676ba0 | ||
|
|
13bbb43e35 | ||
|
|
7226b06142 | ||
|
|
bfe5671e9d | ||
|
|
f667d00843 | ||
|
|
358744e8c0 | ||
|
|
f2f3a25afa | ||
|
|
049cc6a371 | ||
|
|
c8c5196b18 | ||
|
|
0fb45b445a | ||
|
|
0e1129ec74 | ||
|
|
52b40538ce | ||
|
|
ccdeeab4d6 | ||
|
|
bfe1e6aa01 | ||
|
|
54ab14b356 | ||
|
|
50d416c9f2 | ||
|
|
35f1c8d570 | ||
|
|
c7d10fd0be | ||
|
|
90dc993e83 | ||
|
|
44bfa390bc | ||
|
|
eb09ab7f95 | ||
|
|
d46f26d4c7 | ||
|
|
90b104ed74 | ||
|
|
97648ed5a2 | ||
|
|
d943fbd83e | ||
|
|
e013e00dd4 | ||
|
|
9644ceda1f | ||
|
|
4e73190ae5 | ||
|
|
03884cbd64 | ||
|
|
a4be7c68cb | ||
|
|
ba0daf3cb0 | ||
|
|
b854839a28 | ||
|
|
d8bb23a4c4 | ||
|
|
274b4416ec |
52
.github/workflows/compile.yml
vendored
52
.github/workflows/compile.yml
vendored
@@ -1,4 +1,5 @@
|
||||
name: Compile
|
||||
# Compiles the solution and runs unit tests.
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
@@ -9,22 +10,61 @@ on:
|
||||
- 1.10.x
|
||||
|
||||
jobs:
|
||||
compile:
|
||||
name: Compile
|
||||
compile-dotnet:
|
||||
name: Compile .NET solution
|
||||
defaults:
|
||||
run:
|
||||
shell: pwsh
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v3.1.0
|
||||
uses: actions/checkout@v4.1.1
|
||||
|
||||
- name: Restore NuGet packages
|
||||
run: nuget restore src/Orchard.sln
|
||||
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@v1.3.1
|
||||
uses: microsoft/setup-msbuild@v2
|
||||
|
||||
- name: Compile
|
||||
run: msbuild Orchard.proj /m /t:Compile /p:MvcBuildViews=true /p:TreatWarningsAsErrors=true -WarnAsError
|
||||
run: msbuild Orchard.proj /m /v:minimal /t:Compile /p:MvcBuildViews=true /p:TreatWarningsAsErrors=true -WarnAsError
|
||||
|
||||
- name: Test
|
||||
run: msbuild Orchard.proj /m /v:minimal /t:Test
|
||||
|
||||
compile-node:
|
||||
name: Compile client-side assets
|
||||
defaults:
|
||||
run:
|
||||
shell: pwsh
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v4.1.1
|
||||
|
||||
- name: Setup NodeJS
|
||||
uses: actions/setup-node@v4.0.2
|
||||
with:
|
||||
node-version: '7'
|
||||
|
||||
- name: Setup NPM packages
|
||||
working-directory: ./src
|
||||
run: |
|
||||
npm install --loglevel warn
|
||||
|
||||
# Install gulp globally to be able to run the rebuild task, using the same version as in the project.
|
||||
$gulpVersion = (Get-Content Package.json -Raw | ConvertFrom-Json).devDependencies.gulp
|
||||
Start-Process npm -NoNewWindow -Wait -ArgumentList "install gulp@$gulpVersion -g --loglevel warn"
|
||||
|
||||
- name: Rebuild client-side assets
|
||||
working-directory: ./src
|
||||
run: |
|
||||
gulp rebuild
|
||||
|
||||
git add . # To make line ending changes "disappear".
|
||||
$gitStatus = (git status --porcelain)
|
||||
if ($gitStatus)
|
||||
{
|
||||
throw ("Client-side assets are not up-to-date. Please run 'gulp rebuild' and commit the changes.`n" +
|
||||
[System.String]::Join([System.Environment]::NewLine, $gitStatus))
|
||||
}
|
||||
|
||||
39
.github/workflows/specflow.yml
vendored
Normal file
39
.github/workflows/specflow.yml
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
name: SpecFlow tests
|
||||
# Compiles the solution and runs unit tests, as well the SpecFlow tests on the main development branches.
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 0 * * *' # Every day at midnight.
|
||||
|
||||
jobs:
|
||||
compile:
|
||||
name: SpecFlow tests
|
||||
defaults:
|
||||
run:
|
||||
shell: pwsh
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
matrix:
|
||||
branch: [dev, 1.10.x]
|
||||
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
with:
|
||||
ref: ${{ matrix.branch }}
|
||||
|
||||
- name: Restore NuGet packages
|
||||
run: nuget restore src/Orchard.sln
|
||||
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2.0.0
|
||||
|
||||
- name: Compile
|
||||
run: msbuild Orchard.proj /m /v:minimal /t:Compile /p:MvcBuildViews=true /p:TreatWarningsAsErrors=true -WarnAsError
|
||||
|
||||
- name: Test
|
||||
run: msbuild Orchard.proj /m /v:minimal /t:Test
|
||||
|
||||
- name: Spec
|
||||
run: msbuild Orchard.proj /m /v:minimal /t:Spec
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -1,5 +1,7 @@
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
**/.vs/**
|
||||
src/Rebracer.xml
|
||||
|
||||
# User-specific files
|
||||
*.suo
|
||||
@@ -190,5 +192,3 @@ src/Orchard.Azure/Orchard.Azure.CloudService/Staging/
|
||||
|
||||
#enable all /lib artifacts
|
||||
!lib/**/*.*
|
||||
**/.vs/*
|
||||
src/Rebracer.xml
|
||||
|
||||
@@ -3,36 +3,18 @@
|
||||
REM Necessary for the InstallDir variable to work inside the MsBuild-finding loop below.
|
||||
SETLOCAL ENABLEDELAYEDEXPANSION
|
||||
|
||||
for /f "usebackq tokens=1* delims=: " %%i in (`lib\vswhere\vswhere -latest -version "[15.0,17.0)" -requires Microsoft.Component.MSBuild`) do (
|
||||
for /f "usebackq tokens=1* delims=: " %%i in (`lib\vswhere\vswhere -latest -version "[16.0,18.0)" -requires Microsoft.Component.MSBuild`) do (
|
||||
if /i "%%i"=="installationPath" (
|
||||
set InstallDir=%%j
|
||||
echo !InstallDir!
|
||||
if exist "!InstallDir!\MSBuild\15.0\Bin\MSBuild.exe" (
|
||||
echo "Using MSBuild from Visual Studio 2017"
|
||||
set msbuild="!InstallDir!\MSBuild\15.0\Bin\MSBuild.exe"
|
||||
goto build
|
||||
)
|
||||
if exist "!InstallDir!\MSBuild\Current\Bin\MSBuild.exe" (
|
||||
echo "Using MSBuild from Visual Studio 2019"
|
||||
echo "Using MSBuild from !InstallDir!"
|
||||
set msbuild="!InstallDir!\MSBuild\Current\Bin\MSBuild.exe"
|
||||
goto build
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
FOR %%b in (
|
||||
"%VS140COMNTOOLS%\vsvars32.bat"
|
||||
"%VS120COMNTOOLS%\vsvars32.bat"
|
||||
"%VS110COMNTOOLS%\vsvars32.bat"
|
||||
) do (
|
||||
if exist %%b (
|
||||
echo "Using MSBuild from %%b"
|
||||
call %%b
|
||||
set msbuild="msbuild"
|
||||
goto build
|
||||
)
|
||||
)
|
||||
|
||||
echo "Unable to detect suitable environment. Build may not succeed."
|
||||
|
||||
:build
|
||||
|
||||
28
Orchard.proj
28
Orchard.proj
@@ -113,30 +113,26 @@
|
||||
</Target>
|
||||
|
||||
<Target Name="Compile">
|
||||
<CallTarget Targets="DevCompile"/>
|
||||
<!-- Compile to "OutputFolder" -->
|
||||
<MSBuild
|
||||
Projects="$(Solution)"
|
||||
Targets="Build"
|
||||
Properties="Configuration=$(Configuration);OutputPath=$(CompileFolder);MvcBuildViews=false" />
|
||||
Properties="Configuration=$(Configuration);OutputPath=$(CompileFolder)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="DevCompile">
|
||||
<!-- To make sure that Roslyn tools are available, since it's included with Orchard.Web, which is not referenced by
|
||||
other projects, so it will be built towards the end. -->
|
||||
<MSBuild
|
||||
Projects="$(OrchardWebFolder)\Orchard.Web.csproj"
|
||||
Targets="CopyRoslynCompilerFilesToOutputDirectory" />
|
||||
<!-- Compile to "regular" output folder for devs using VS locally -->
|
||||
<MSBuild
|
||||
Projects="$(Solution)"
|
||||
Targets="Build"
|
||||
Properties="Configuration=$(Configuration);MvcBuildViews=$(MvcBuildViews)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="BuildViews">
|
||||
<!-- To make sure that Roslyn tools are available, even if the Compile task was not called before this. -->
|
||||
<MSBuild
|
||||
Projects="$(OrchardWebFolder)\Orchard.Web.csproj"
|
||||
Targets="CopyRoslynFilesToOutputFolder"
|
||||
Properties="Configuration=$(Configuration)" />
|
||||
<!-- The actual compilation with views also compiled. -->
|
||||
<MSBuild
|
||||
Projects="$(Solution)"
|
||||
Targets="Build"
|
||||
Properties="Configuration=$(Configuration);MvcBuildViews=true" />
|
||||
</Target>
|
||||
|
||||
<Target Name="CompileMsBuildTasks">
|
||||
<MSBuild
|
||||
@@ -195,7 +191,6 @@
|
||||
<Stage-Media Include="$(SrcFolder)\Orchard.Web\Media\OrchardLogo.png" />
|
||||
<Stage-PoFiles Include="$(SrcFolder)\Orchard.Web\**\*.po" />
|
||||
<Stage-Core Include="$(WebSitesFolder)\Orchard.Core\**\*" Exclude="$(WebSitesFolder)\Orchard.Core\**\bin\**\*" />
|
||||
<Stage-Roslyn Include="$(SrcFolder)\Orchard.Web\bin\roslyn\*" />
|
||||
|
||||
<!-- Get list of module names from the module definition files within ModulesSrcFolder -->
|
||||
<Stage-Modules-Definitions Include="$(ModulesSrcFolder)\**\Module.txt" />
|
||||
@@ -237,7 +232,7 @@
|
||||
|
||||
<!-- Copying module binaries is somewhat tricky: From a module "bin" directory, we
|
||||
only want to include the files that are _not_ already present in
|
||||
the "Orchard.Web\Bin" folder (except for "Orchard.Web\bin\roslyn"). -->
|
||||
the "Orchard.Web\Bin" folder. -->
|
||||
<FilterModuleBinaries
|
||||
ModulesBinaries="@(Stage-Modules-Binaries)"
|
||||
OrchardWebBinaries="@(Stage-Orchard-Web-Bins)">
|
||||
@@ -267,7 +262,6 @@
|
||||
<Copy SourceFiles="@(Stage-Themes-Custom)" DestinationFiles="@(Stage-Themes-Custom->'$(StageFolder)\Themes\%(ThemeName)\%(RecursiveDir)%(Filename)%(Extension)')"/>
|
||||
<Copy SourceFiles="@(Stage-Themes-Binaries-Unique)" DestinationFiles="@(Stage-Themes-Binaries-Unique->'$(StageFolder)\Themes\%(ThemeName)\%(RecursiveDir)%(Filename)%(Extension)')"/>
|
||||
<Copy SourceFiles="@(Stage-Themes-Sources)" DestinationFolder="$(StageFolder)\Themes\%(RecursiveDir)"/>
|
||||
<Copy SourceFiles="@(Stage-Roslyn)" DestinationFolder="$(StageFolder)\bin\roslyn"/>
|
||||
|
||||
<MakeDir Directories="$(StageFolder)\App_Data"/>
|
||||
<WriteLinesToFile File="$(StageFolder)\App_Data\_marker.txt" Lines="some_text" Overwrite="true"/>
|
||||
|
||||
Binary file not shown.
@@ -222,7 +222,7 @@ function buildJsPipeline(assetGroup, doConcat, doRebuild) {
|
||||
// Source maps are useless if neither concatenating nor transpiling.
|
||||
if ((!doConcat || assetGroup.inputPaths.length < 2) && !assetGroup.inputPaths.some(function (inputPath) { return path.extname(inputPath).toLowerCase() === ".ts"; }))
|
||||
generateSourceMaps = false;
|
||||
var typeScriptOptions = { allowJs: true, noImplicitAny: true, noEmitOnError: true };
|
||||
var typeScriptOptions = { allowJs: true, noImplicitAny: true, noEmitOnError: true, module: 'amd' };
|
||||
if (assetGroup.typeScriptOptions)
|
||||
typeScriptOptions = Object.assign(typeScriptOptions, assetGroup.typeScriptOptions); // Merge override options from asset group if any.
|
||||
if (doConcat)
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<RootNamespace>Orchard.Azure.Tests</RootNamespace>
|
||||
<AssemblyName>Orchard.Azure.Tests</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
@@ -41,7 +42,6 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
@@ -52,7 +52,6 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<RootNamespace>Orchard.Core.Tests</RootNamespace>
|
||||
<AssemblyName>Orchard.Core.Tests</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
@@ -41,7 +42,6 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
@@ -53,7 +53,6 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<RootNamespace>Orchard.Profile</RootNamespace>
|
||||
<AssemblyName>Orchard.Profile</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
@@ -41,7 +42,6 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<CodeAnalysisRuleSet>..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
@@ -53,7 +53,6 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -4,10 +4,9 @@
|
||||
<add key="webpages:Enabled" value="false" />
|
||||
<add key="aspnet:RoslynCompilerLocation" value="..\bin\roslyn" />
|
||||
</appSettings>
|
||||
<!-- Registering Roslyn as a compiler for Razor IntelliSense. -->
|
||||
<system.codedom>
|
||||
<compilers>
|
||||
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:latest" />
|
||||
<compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" compilerOptions="/langversion:7.3 /nowarn:1659;1699;1701;612;618" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
</compilers>
|
||||
</system.codedom>
|
||||
<system.web>
|
||||
|
||||
@@ -4,10 +4,9 @@
|
||||
<add key="webpages:Enabled" value="false" />
|
||||
<add key="aspnet:RoslynCompilerLocation" value="..\bin\roslyn" />
|
||||
</appSettings>
|
||||
<!-- Registering Roslyn as a compiler for Razor IntelliSense. -->
|
||||
<system.codedom>
|
||||
<compilers>
|
||||
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:latest" />
|
||||
<compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" compilerOptions="/langversion:7.3 /nowarn:1659;1699;1701;612;618" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
</compilers>
|
||||
</system.codedom>
|
||||
<system.web>
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<!-- Registering Roslyn as a compiler for Dynamic Compilation. -->
|
||||
<system.codedom>
|
||||
<compilers>
|
||||
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:latest" />
|
||||
<compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" compilerOptions="/langversion:7.3 /nowarn:1659;1699;1701;612;618" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
</compilers>
|
||||
</system.codedom>
|
||||
<system.web>
|
||||
@@ -164,7 +164,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="NHibernate" publicKeyToken="aa95f207798dfdb4" culture="neutral" />
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<RootNamespace>Orchard.Specs</RootNamespace>
|
||||
<AssemblyName>Orchard.Specs</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
@@ -41,7 +42,6 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
@@ -53,7 +53,6 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
@@ -200,6 +199,11 @@
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<Compile Include="Settings.feature.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Settings.feature</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Text.feature.cs">
|
||||
<DependentUpon>Text.feature</DependentUpon>
|
||||
<AutoGen>True</AutoGen>
|
||||
@@ -372,6 +376,10 @@
|
||||
<DependentUpon>HostComponents.config</DependentUpon>
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
<None Include="Settings.feature">
|
||||
<Generator>SpecFlowSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.feature.cs</LastGenOutput>
|
||||
</None>
|
||||
<None Include="Text.feature">
|
||||
<Generator>SpecFlowSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Text.feature.cs</LastGenOutput>
|
||||
|
||||
14
src/Orchard.Specs/Settings.feature
Normal file
14
src/Orchard.Specs/Settings.feature
Normal file
@@ -0,0 +1,14 @@
|
||||
Feature: Settings
|
||||
|
||||
In order to manage my site
|
||||
As a privileged user
|
||||
I want to be able to see and change site settings
|
||||
|
||||
Scenario: Adding a new site culture and selecting it as the default works
|
||||
|
||||
Given I have installed Orchard
|
||||
When I go to "Admin/Settings/Index"
|
||||
Then I should not see "hu-HU"
|
||||
When I have "hu-HU" as the default culture
|
||||
And I go to "Admin/Settings/Index"
|
||||
Then I should see "<option selected="selected">hu-HU</option>"
|
||||
93
src/Orchard.Specs/Settings.feature.cs
generated
Normal file
93
src/Orchard.Specs/Settings.feature.cs
generated
Normal file
@@ -0,0 +1,93 @@
|
||||
// ------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by SpecFlow (http://www.specflow.org/).
|
||||
// SpecFlow Version:1.9.0.77
|
||||
// SpecFlow Generator Version:1.9.0.0
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
// ------------------------------------------------------------------------------
|
||||
#region Designer generated code
|
||||
#pragma warning disable
|
||||
namespace Orchard.Specs
|
||||
{
|
||||
using TechTalk.SpecFlow;
|
||||
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")]
|
||||
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[NUnit.Framework.TestFixtureAttribute()]
|
||||
[NUnit.Framework.DescriptionAttribute("Settings")]
|
||||
public partial class SettingsFeature
|
||||
{
|
||||
|
||||
private static TechTalk.SpecFlow.ITestRunner testRunner;
|
||||
|
||||
#line 1 "Settings.feature"
|
||||
#line hidden
|
||||
|
||||
[NUnit.Framework.TestFixtureSetUpAttribute()]
|
||||
public virtual void FeatureSetup()
|
||||
{
|
||||
testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner();
|
||||
TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Settings", "\r\nIn order to manage my site\r\nAs a privileged user\r\nI want to be able to see and " +
|
||||
"change site settings", ProgrammingLanguage.CSharp, ((string[])(null)));
|
||||
testRunner.OnFeatureStart(featureInfo);
|
||||
}
|
||||
|
||||
[NUnit.Framework.TestFixtureTearDownAttribute()]
|
||||
public virtual void FeatureTearDown()
|
||||
{
|
||||
testRunner.OnFeatureEnd();
|
||||
testRunner = null;
|
||||
}
|
||||
|
||||
[NUnit.Framework.SetUpAttribute()]
|
||||
public virtual void TestInitialize()
|
||||
{
|
||||
}
|
||||
|
||||
[NUnit.Framework.TearDownAttribute()]
|
||||
public virtual void ScenarioTearDown()
|
||||
{
|
||||
testRunner.OnScenarioEnd();
|
||||
}
|
||||
|
||||
public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo)
|
||||
{
|
||||
testRunner.OnScenarioStart(scenarioInfo);
|
||||
}
|
||||
|
||||
public virtual void ScenarioCleanup()
|
||||
{
|
||||
testRunner.CollectScenarioErrors();
|
||||
}
|
||||
|
||||
[NUnit.Framework.TestAttribute()]
|
||||
[NUnit.Framework.DescriptionAttribute("Adding a new site culture and selecting it as the default works")]
|
||||
public virtual void AddingANewSiteCultureAndSelectingItAsTheDefaultWorks()
|
||||
{
|
||||
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Adding a new site culture and selecting it as the default works", ((string[])(null)));
|
||||
#line 7
|
||||
this.ScenarioSetup(scenarioInfo);
|
||||
#line 9
|
||||
testRunner.Given("I have installed Orchard", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
|
||||
#line 10
|
||||
testRunner.When("I go to \"Admin/Settings/Index\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line 11
|
||||
testRunner.Then("I should not see \"hu-HU\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 12
|
||||
testRunner.When("I have \"hu-HU\" as the default culture", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line 13
|
||||
testRunner.And("I go to \"Admin/Settings/Index\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 14
|
||||
testRunner.Then("I should see \"<option selected=\"selected\">hu-HU</option>\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line hidden
|
||||
this.ScenarioCleanup();
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore
|
||||
#endregion
|
||||
@@ -1,15 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
using Autofac;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
using Orchard.ContentManagement.Records;
|
||||
using Orchard.DisplayManagement;
|
||||
using Orchard.Email.Services;
|
||||
using Orchard.Messaging.Events;
|
||||
using Orchard.Messaging.Services;
|
||||
using Orchard.Tests.Messaging;
|
||||
using Orchard.Tests.Modules.Stubs;
|
||||
using Orchard.Tests.Utility;
|
||||
|
||||
namespace Orchard.Tests.Modules.Email {
|
||||
[TestFixture]
|
||||
@@ -30,10 +24,10 @@ namespace Orchard.Tests.Modules.Email {
|
||||
var container = builder.Build();
|
||||
_messageService = container.Resolve<IMessageService>();
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void CanSendEmailUsingAddresses() {
|
||||
_messageService.Send("Email", new Dictionary<string, object>() { {"", null} });
|
||||
_messageService.Send("Email", new Dictionary<string, object>() { { "", null } });
|
||||
Assert.That(_smtpChannel.Processed, Is.Not.Null);
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<RootNamespace>Orchard.Tests.Modules</RootNamespace>
|
||||
<AssemblyName>Orchard.Tests.Modules</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
@@ -41,7 +42,6 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
@@ -53,7 +53,6 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
@@ -77,8 +76,8 @@
|
||||
<Reference Include="FluentPath, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Orchard.FluentPath.1.0.0.1\lib\FluentPath.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ICSharpCode.SharpZipLib, Version=1.3.3.11, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SharpZipLib.1.3.3\lib\net45\ICSharpCode.SharpZipLib.dll</HintPath>
|
||||
<Reference Include="Iesi.Collections, Version=4.0.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Iesi.Collections.4.0.4\lib\net461\Iesi.Collections.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="IronRuby, Version=1.1.3.0, Culture=neutral, PublicKeyToken=7f709c5b713576e1, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\IronRuby.1.1.3\lib\IronRuby.dll</HintPath>
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
<RootNamespace>Hello.World</RootNamespace>
|
||||
<AssemblyName>Hello.World</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<MvcBuildViews>false</MvcBuildViews>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
|
||||
@@ -19,6 +19,7 @@ using Orchard.Environment.Extensions.Models;
|
||||
using Orchard.Environment.Features;
|
||||
using Orchard.Environment.State;
|
||||
using Orchard.Events;
|
||||
using Orchard.Locking;
|
||||
using Orchard.Packaging.GalleryServer;
|
||||
using Orchard.Packaging.Models;
|
||||
using Orchard.Packaging.Services;
|
||||
@@ -57,6 +58,7 @@ namespace Orchard.Tests.Modules.Recipes.RecipeHandlers {
|
||||
builder.RegisterType<RecipeExecutionLogger>().AsSelf();
|
||||
builder.RegisterType<ExtensionManager>().As<IExtensionManager>();
|
||||
builder.RegisterType<FeatureManager>().As<IFeatureManager>();
|
||||
builder.RegisterType<LockingProvider>().As<ILockingProvider>();
|
||||
builder.RegisterType<StubCacheManager>().As<ICacheManager>();
|
||||
builder.RegisterType<StubParallelCacheContext>().As<IParallelCacheContext>();
|
||||
builder.RegisterType<StubAsyncTokenProvider>().As<IAsyncTokenProvider>();
|
||||
@@ -65,6 +67,7 @@ namespace Orchard.Tests.Modules.Recipes.RecipeHandlers {
|
||||
builder.RegisterInstance(_packagesInRepository).As<IPackagingSourceManager>();
|
||||
builder.RegisterInstance(_packageManager).As<IPackageManager>();
|
||||
builder.RegisterType<ShellStateManager>().As<IShellStateManager>().SingleInstance();
|
||||
builder.RegisterType<Signals>().As<ISignals>().SingleInstance();
|
||||
builder.RegisterType<StubEventBus>().As<IEventBus>().SingleInstance();
|
||||
builder.RegisterType<ModuleStep>();
|
||||
builder.RegisterSource(new EventsRegistrationSource());
|
||||
|
||||
@@ -19,6 +19,7 @@ using Orchard.Environment.Features;
|
||||
using Orchard.Environment.State;
|
||||
using Orchard.Events;
|
||||
using Orchard.FileSystems.VirtualPath;
|
||||
using Orchard.Locking;
|
||||
using Orchard.Packaging.GalleryServer;
|
||||
using Orchard.Packaging.Services;
|
||||
using Orchard.Recipes.Models;
|
||||
@@ -60,6 +61,7 @@ namespace Orchard.Tests.Modules.Recipes.RecipeHandlers {
|
||||
builder.RegisterType<RecipeExecutionLogger>().AsSelf();
|
||||
builder.RegisterType<ExtensionManager>().As<IExtensionManager>();
|
||||
builder.RegisterType<FeatureManager>().As<IFeatureManager>();
|
||||
builder.RegisterType<LockingProvider>().As<ILockingProvider>();
|
||||
builder.RegisterType<StubCacheManager>().As<ICacheManager>();
|
||||
builder.RegisterType<StubParallelCacheContext>().As<IParallelCacheContext>();
|
||||
builder.RegisterType<StubAsyncTokenProvider>().As<IAsyncTokenProvider>();
|
||||
@@ -71,6 +73,7 @@ namespace Orchard.Tests.Modules.Recipes.RecipeHandlers {
|
||||
builder.RegisterInstance(testVirtualPathProvider).As<IVirtualPathProvider>();
|
||||
builder.RegisterType<StubEventBus>().As<IEventBus>().SingleInstance();
|
||||
builder.RegisterType<ThemeService>().As<IThemeService>();
|
||||
builder.RegisterType<Signals>().As<ISignals>().SingleInstance();
|
||||
builder.RegisterType<StubOrchardServices>().As<IOrchardServices>();
|
||||
builder.RegisterType<StubSiteThemeService>().As<ISiteThemeService>();
|
||||
builder.RegisterType<ThemeStep>();
|
||||
|
||||
@@ -14,6 +14,7 @@ using Orchard.Environment.Descriptor.Models;
|
||||
using Orchard.Events;
|
||||
using Orchard.Caching;
|
||||
using Orchard.Core.Settings.State.Records;
|
||||
using Orchard.Locking;
|
||||
|
||||
namespace Orchard.Tests.Modules.Settings.Blueprint {
|
||||
[TestFixture]
|
||||
@@ -24,6 +25,8 @@ namespace Orchard.Tests.Modules.Settings.Blueprint {
|
||||
builder.RegisterType<DefaultCacheManager>().As<ICacheManager>();
|
||||
builder.RegisterType<DefaultCacheHolder>().As<ICacheHolder>().SingleInstance();
|
||||
builder.RegisterType<DefaultCacheContextAccessor>().As<ICacheContextAccessor>();
|
||||
builder.RegisterType<LockingProvider>().As<ILockingProvider>();
|
||||
builder.RegisterType<Signals>().As<ISignals>().SingleInstance();
|
||||
builder.RegisterType<ShellDescriptorManager>().As<IShellDescriptorManager>().SingleInstance();
|
||||
builder.RegisterType<ShellStateManager>().As<IShellStateManager>().SingleInstance();
|
||||
builder.RegisterType<StubEventBus>().As<IEventBus>().SingleInstance();
|
||||
|
||||
@@ -71,6 +71,8 @@ namespace Orchard.Tests.Modules.Users.Controllers {
|
||||
builder.RegisterType<UserPartHandler>().As<IContentHandler>();
|
||||
builder.RegisterType<OrchardServices>().As<IOrchardServices>();
|
||||
builder.RegisterType<AccountValidationService>().As<IAccountValidationService>();
|
||||
builder.RegisterType<PasswordService>().As<IPasswordService>();
|
||||
builder.RegisterType<PasswordHistoryService>().As<IPasswordHistoryService>();
|
||||
|
||||
builder.RegisterInstance(new Work<IEnumerable<IShapeTableEventHandler>>(resolve => _container.Resolve<IEnumerable<IShapeTableEventHandler>>())).AsSelf();
|
||||
builder.RegisterType<DefaultShapeTableManager>().As<IShapeTableManager>();
|
||||
|
||||
@@ -68,6 +68,7 @@ namespace Orchard.Tests.Modules.Users.Services
|
||||
//builder.RegisterModule(new ImplicitCollectionSupportModule());
|
||||
builder.RegisterType<MembershipValidationService>().As<IMembershipValidationService>();
|
||||
builder.RegisterType<MembershipService>().As<IMembershipService>();
|
||||
builder.RegisterType<PasswordService>().As<IPasswordService>();
|
||||
builder.RegisterType<DefaultContentQuery>().As<IContentQuery>();
|
||||
builder.RegisterType<DefaultContentManager>().As<IContentManager>();
|
||||
builder.RegisterType<StubCacheManager>().As<ICacheManager>();
|
||||
@@ -77,7 +78,6 @@ namespace Orchard.Tests.Modules.Users.Services
|
||||
builder.RegisterType<DefaultContentManagerSession>().As<IContentManagerSession>();
|
||||
builder.RegisterInstance(new ShellSettings { Name = ShellSettings.DefaultName, DataProvider = "SqlCe" });
|
||||
builder.RegisterType<UserPartHandler>().As<IContentHandler>();
|
||||
//builder.RegisterType<StubWorkContextAccessor>().As<IWorkContextAccessor>();
|
||||
builder.RegisterType<OrchardServices>().As<IOrchardServices>();
|
||||
builder.RegisterAutoMocking(MockBehavior.Loose);
|
||||
builder.RegisterGeneric(typeof(Repository<>)).As(typeof(IRepository<>));
|
||||
@@ -135,11 +135,12 @@ namespace Orchard.Tests.Modules.Users.Services
|
||||
|
||||
[Test]
|
||||
public void SaltAndPasswordShouldBeDifferentEvenWithSameSourcePassword() {
|
||||
var user1 = _membershipService.CreateUser(new CreateUserParams("a", "b", "c", null, null, true, false));
|
||||
var password = "Password1!";
|
||||
var user1 = _membershipService.CreateUser(new CreateUserParams("user1", password, "user1@email.com", null, null, true, false));
|
||||
_session.Flush();
|
||||
_session.Clear();
|
||||
|
||||
var user2 = _membershipService.CreateUser(new CreateUserParams("d", "b", "e", null, null, true, false));
|
||||
var user2 = _membershipService.CreateUser(new CreateUserParams("user2", password, "user2@email.com", null, null, true, false));
|
||||
_session.Flush();
|
||||
_session.Clear();
|
||||
|
||||
@@ -150,8 +151,8 @@ namespace Orchard.Tests.Modules.Users.Services
|
||||
Assert.That(user1Record.Password, Is.Not.EqualTo(user2Record.Password));
|
||||
|
||||
List<LocalizedString> validationErrors;
|
||||
Assert.That(_membershipService.ValidateUser("a", "b", out validationErrors), Is.Not.Null);
|
||||
Assert.That(_membershipService.ValidateUser("d", "b", out validationErrors), Is.Not.Null);
|
||||
Assert.That(_membershipService.ValidateUser("user1", password, out validationErrors), Is.Not.Null);
|
||||
Assert.That(_membershipService.ValidateUser("user2", password, out validationErrors), Is.Not.Null);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
@@ -20,5 +20,4 @@
|
||||
<package id="Orchard.NuGet.Core" version="1.1.0.0" targetFramework="net48" />
|
||||
<package id="Remotion.Linq" version="2.2.0" targetFramework="net48" />
|
||||
<package id="Remotion.Linq.EagerFetching" version="2.2.0" targetFramework="net48" />
|
||||
<package id="SharpZipLib" version="1.3.1" targetFramework="net48" />
|
||||
</packages>
|
||||
@@ -106,7 +106,10 @@ namespace Orchard.Tests.ContentManagement {
|
||||
|
||||
[Test]
|
||||
public void AllDataTypesCanBeQueried() {
|
||||
var dt = DateTime.Now;
|
||||
var now = DateTime.Now;
|
||||
// NHibernate stores DateTime values with seconds-precision, so everything below that needs to be truncated
|
||||
// so that the query works correctly. Thanks to https://stackoverflow.com/a/1005222 for elegant solution.
|
||||
now = now.AddTicks(-(now.Ticks % TimeSpan.TicksPerSecond));
|
||||
|
||||
_manager.Create<LambdaPart>("lambda", init => {
|
||||
init.Record.BooleanStuff = true;
|
||||
@@ -116,7 +119,7 @@ namespace Orchard.Tests.ContentManagement {
|
||||
init.Record.IntegerStuff = 0;
|
||||
init.Record.LongStuff = 0;
|
||||
init.Record.StringStuff = "0";
|
||||
init.Record.DateTimeStuff = dt;
|
||||
init.Record.DateTimeStuff = now;
|
||||
});
|
||||
_session.Flush();
|
||||
|
||||
@@ -144,7 +147,7 @@ namespace Orchard.Tests.ContentManagement {
|
||||
lambda = _manager.HqlQuery().Where(alias => alias.ContentPartRecord<LambdaRecord>(), x => x.Eq("StringStuff", "0")).List();
|
||||
Assert.That(lambda.Count(), Is.EqualTo(1));
|
||||
|
||||
lambda = _manager.HqlQuery().Where(alias => alias.ContentPartRecord<LambdaRecord>(), x => x.Eq("DateTimeStuff", dt)).List();
|
||||
lambda = _manager.HqlQuery().Where(alias => alias.ContentPartRecord<LambdaRecord>(), x => x.Eq("DateTimeStuff", now)).List();
|
||||
Assert.That(lambda.Count(), Is.EqualTo(1));
|
||||
}
|
||||
|
||||
@@ -940,31 +943,29 @@ namespace Orchard.Tests.ContentManagement {
|
||||
}
|
||||
|
||||
[Test]
|
||||
// This is a potentially flaky test, but failure due to randomness is extremely unlikely.
|
||||
public void ShouldSortRandomly() {
|
||||
_manager.Create<LambdaPart>("lambda", init => {
|
||||
init.Record.IntegerStuff = 1;
|
||||
});
|
||||
|
||||
_manager.Create<LambdaPart>("lambda", init => {
|
||||
init.Record.IntegerStuff = 2;
|
||||
});
|
||||
|
||||
_manager.Create<LambdaPart>("lambda", init => {
|
||||
init.Record.IntegerStuff = 3;
|
||||
});
|
||||
_session.Flush();
|
||||
|
||||
var result = _manager.HqlQuery().ForType("lambda").List();
|
||||
Assert.That(result.Count(), Is.EqualTo(3));
|
||||
|
||||
var firstResults = new List<int>();
|
||||
|
||||
for (int i = 0; i < 10; i++) {
|
||||
result = _manager.HqlQuery().Join(alias => alias.ContentPartRecord<LambdaRecord>()).OrderBy(x => x.Named("civ"), order => order.Random()).List();
|
||||
firstResults.Add(result.First().As<LambdaPart>().Record.IntegerStuff);
|
||||
var itemCount = 10;
|
||||
for (int i = 0; i < itemCount; i++) {
|
||||
_manager.Create<LambdaPart>("lambda", init => {
|
||||
init.Record.IntegerStuff = i;
|
||||
});
|
||||
}
|
||||
|
||||
Assert.That(firstResults.Distinct().Count(), Is.GreaterThan(1));
|
||||
_session.Flush();
|
||||
|
||||
var items = _manager.HqlQuery().ForType("lambda").List();
|
||||
Assert.That(items.Count(), Is.EqualTo(itemCount));
|
||||
|
||||
var results = new List<string>();
|
||||
|
||||
for (int i = 0; i < 10; i++) {
|
||||
items = _manager.HqlQuery().Join(alias =>
|
||||
alias.ContentPartRecord<LambdaRecord>()).OrderBy(x => x.Named("civ"), order => order.Random()).List();
|
||||
results.Add(string.Join("", items.Select(item => item.As<LambdaPart>().Record.IntegerStuff)));
|
||||
}
|
||||
|
||||
Assert.That(results.Distinct().Count(), Is.GreaterThan(1));
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
@@ -7,6 +7,8 @@ using Orchard.ContentManagement;
|
||||
namespace Orchard.Tests.ContentManagement {
|
||||
[TestFixture]
|
||||
public class XmlHelperTests {
|
||||
private const string _testGuidString = "98f3dc0a-01c3-4975-bd52-1b4f5a678d73";
|
||||
|
||||
[Test]
|
||||
public void AddEl() {
|
||||
var el = new XElement("data");
|
||||
@@ -84,6 +86,14 @@ namespace Orchard.Tests.ContentManagement {
|
||||
Assert.That(el.Attribute("foo").Value, Is.EqualTo("1970-05-21T13:55:21.934Z"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GuidToAttribute() {
|
||||
var el = new XElement("data");
|
||||
el.Attr("guid", new Guid(_testGuidString));
|
||||
|
||||
Assert.That(el.Attribute("guid").Value, Is.EqualTo(_testGuidString));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void DoubleFloatDecimalToAttribute() {
|
||||
var el = new XElement("data");
|
||||
@@ -150,6 +160,14 @@ namespace Orchard.Tests.ContentManagement {
|
||||
Assert.That(el.Element("decimal").Value, Is.EqualTo("12.458"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GuidToElement() {
|
||||
var el = new XElement("data");
|
||||
el.El("guid", new Guid(_testGuidString));
|
||||
|
||||
Assert.That(el.Element("guid").Value, Is.EqualTo(_testGuidString));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ReadElement() {
|
||||
var el = XElement.Parse("<data><foo>bar</foo></data>");
|
||||
@@ -168,12 +186,14 @@ namespace Orchard.Tests.ContentManagement {
|
||||
ADouble = 12.345D,
|
||||
AFloat = 23.456F,
|
||||
ADecimal = 34.567M,
|
||||
AGuid = new Guid(_testGuidString),
|
||||
ANullableInt = 42,
|
||||
ANullableBoolean = true,
|
||||
ANullableDate = new DateTime(1970, 5, 21, 13, 55, 21, 934, DateTimeKind.Utc),
|
||||
ANullableDouble = 12.345D,
|
||||
ANullableFloat = 23.456F,
|
||||
ANullableDecimal = 34.567M
|
||||
ANullableDecimal = 34.567M,
|
||||
ANullableGuid = new Guid(_testGuidString)
|
||||
};
|
||||
var el = new XElement("data");
|
||||
el.With(target)
|
||||
@@ -184,12 +204,14 @@ namespace Orchard.Tests.ContentManagement {
|
||||
.ToAttr(t => t.ADouble)
|
||||
.ToAttr(t => t.AFloat)
|
||||
.ToAttr(t => t.ADecimal)
|
||||
.ToAttr(t => t.AGuid)
|
||||
.ToAttr(t => t.ANullableInt)
|
||||
.ToAttr(t => t.ANullableBoolean)
|
||||
.ToAttr(t => t.ANullableDate)
|
||||
.ToAttr(t => t.ANullableDouble)
|
||||
.ToAttr(t => t.ANullableFloat)
|
||||
.ToAttr(t => t.ANullableDecimal);
|
||||
.ToAttr(t => t.ANullableDecimal)
|
||||
.ToAttr(t => t.ANullableGuid);
|
||||
|
||||
|
||||
Assert.That(el.Attr("AString"), Is.EqualTo("foo"));
|
||||
@@ -199,12 +221,14 @@ namespace Orchard.Tests.ContentManagement {
|
||||
Assert.That(el.Attr("ADouble"), Is.EqualTo("12.345"));
|
||||
Assert.That(el.Attr("AFloat"), Is.EqualTo("23.456"));
|
||||
Assert.That(el.Attr("ADecimal"), Is.EqualTo("34.567"));
|
||||
Assert.That(el.Attr("AGuid"), Is.EqualTo(_testGuidString));
|
||||
Assert.That(el.Attr("ANullableInt"), Is.EqualTo("42"));
|
||||
Assert.That(el.Attr("ANullableBoolean"), Is.EqualTo("true"));
|
||||
Assert.That(el.Attr("ANullableDate"), Is.EqualTo("1970-05-21T13:55:21.934Z"));
|
||||
Assert.That(el.Attr("ANullableDouble"), Is.EqualTo("12.345"));
|
||||
Assert.That(el.Attr("ANullableFloat"), Is.EqualTo("23.456"));
|
||||
Assert.That(el.Attr("ANullableDecimal"), Is.EqualTo("34.567"));
|
||||
Assert.That(el.Attr("ANullableGuid"), Is.EqualTo(_testGuidString));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -214,10 +238,10 @@ namespace Orchard.Tests.ContentManagement {
|
||||
XElement.Parse(
|
||||
"<data AString=\"foo\" AnInt=\"42\" ABoolean=\"true\" " +
|
||||
"ADate=\"1970-05-21T13:55:21.934Z\" ADouble=\"12.345\" " +
|
||||
"AFloat=\"23.456\" ADecimal=\"34.567\" " +
|
||||
$"AFloat=\"23.456\" ADecimal=\"34.567\" AGuid=\"{_testGuidString}\" " +
|
||||
"ANullableInt=\"42\" ANullableBoolean=\"true\" " +
|
||||
"ANullableDate=\"1970-05-21T13:55:21.934Z\" ANullableDouble=\"12.345\" " +
|
||||
"ANullableFloat=\"23.456\" ANullableDecimal=\"34.567\"/>");
|
||||
$"ANullableFloat=\"23.456\" ANullableDecimal=\"34.567\" ANullableGuid=\"{_testGuidString}\"/>");
|
||||
el.With(target)
|
||||
.FromAttr(t => t.AString)
|
||||
.FromAttr(t => t.AnInt)
|
||||
@@ -226,12 +250,14 @@ namespace Orchard.Tests.ContentManagement {
|
||||
.FromAttr(t => t.ADouble)
|
||||
.FromAttr(t => t.AFloat)
|
||||
.FromAttr(t => t.ADecimal)
|
||||
.FromAttr(t => t.AGuid)
|
||||
.FromAttr(t => t.ANullableInt)
|
||||
.FromAttr(t => t.ANullableBoolean)
|
||||
.FromAttr(t => t.ANullableDate)
|
||||
.FromAttr(t => t.ANullableDouble)
|
||||
.FromAttr(t => t.ANullableFloat)
|
||||
.FromAttr(t => t.ANullableDecimal);
|
||||
.FromAttr(t => t.ANullableDecimal)
|
||||
.FromAttr(t => t.ANullableGuid);
|
||||
|
||||
Assert.That(target.AString, Is.EqualTo("foo"));
|
||||
Assert.That(target.AnInt, Is.EqualTo(42));
|
||||
@@ -240,12 +266,14 @@ namespace Orchard.Tests.ContentManagement {
|
||||
Assert.That(target.ADouble, Is.EqualTo(12.345D));
|
||||
Assert.That(target.AFloat, Is.EqualTo(23.456F));
|
||||
Assert.That(target.ADecimal, Is.EqualTo(34.567M));
|
||||
Assert.That(target.AGuid, Is.EqualTo(new Guid(_testGuidString)));
|
||||
Assert.That(target.ANullableInt, Is.EqualTo(42));
|
||||
Assert.That(target.ANullableBoolean, Is.True);
|
||||
Assert.That(target.ANullableDate, Is.EqualTo(new DateTime(1970, 5, 21, 13, 55, 21, 934, DateTimeKind.Utc)));
|
||||
Assert.That(target.ANullableDouble, Is.EqualTo(12.345D));
|
||||
Assert.That(target.ANullableFloat, Is.EqualTo(23.456F));
|
||||
Assert.That(target.ANullableDecimal, Is.EqualTo(34.567M));
|
||||
Assert.That(target.ANullableGuid, Is.EqualTo(new Guid(_testGuidString)));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -258,12 +286,14 @@ namespace Orchard.Tests.ContentManagement {
|
||||
ADouble = 12.345D,
|
||||
AFloat = 23.456F,
|
||||
ADecimal = 34.567M,
|
||||
AGuid = new Guid(_testGuidString),
|
||||
ANullableInt = 42,
|
||||
ANullableBoolean = true,
|
||||
ANullableDate = new DateTime(1970, 5, 21, 13, 55, 21, 934, DateTimeKind.Utc),
|
||||
ANullableDouble = 12.345D,
|
||||
ANullableFloat = 23.456F,
|
||||
ANullableDecimal = 34.567M
|
||||
ANullableDecimal = 34.567M,
|
||||
ANullableGuid = new Guid(_testGuidString)
|
||||
};
|
||||
var el = new XElement("data");
|
||||
el.With(target)
|
||||
@@ -274,12 +304,14 @@ namespace Orchard.Tests.ContentManagement {
|
||||
.FromAttr(t => t.ADouble)
|
||||
.FromAttr(t => t.AFloat)
|
||||
.FromAttr(t => t.ADecimal)
|
||||
.FromAttr(t => t.AGuid)
|
||||
.FromAttr(t => t.ANullableInt)
|
||||
.FromAttr(t => t.ANullableBoolean)
|
||||
.FromAttr(t => t.ANullableDate)
|
||||
.FromAttr(t => t.ANullableDouble)
|
||||
.FromAttr(t => t.ANullableFloat)
|
||||
.FromAttr(t => t.ANullableDecimal);
|
||||
.FromAttr(t => t.ANullableDecimal)
|
||||
.FromAttr(t => t.ANullableGuid);
|
||||
|
||||
Assert.That(target.AString, Is.EqualTo("foo"));
|
||||
Assert.That(target.AnInt, Is.EqualTo(42));
|
||||
@@ -288,12 +320,14 @@ namespace Orchard.Tests.ContentManagement {
|
||||
Assert.That(target.ADouble, Is.EqualTo(12.345D));
|
||||
Assert.That(target.AFloat, Is.EqualTo(23.456F));
|
||||
Assert.That(target.ADecimal, Is.EqualTo(34.567M));
|
||||
Assert.That(target.AGuid, Is.EqualTo(new Guid(_testGuidString)));
|
||||
Assert.That(target.ANullableInt, Is.EqualTo(42));
|
||||
Assert.That(target.ANullableBoolean, Is.True);
|
||||
Assert.That(target.ANullableDate, Is.EqualTo(new DateTime(1970, 5, 21, 13, 55, 21, 934, DateTimeKind.Utc)));
|
||||
Assert.That(target.ANullableDouble, Is.EqualTo(12.345D));
|
||||
Assert.That(target.ANullableFloat, Is.EqualTo(23.456F));
|
||||
Assert.That(target.ANullableDecimal, Is.EqualTo(34.567M));
|
||||
Assert.That(target.ANullableGuid, Is.EqualTo(new Guid(_testGuidString)));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -339,7 +373,8 @@ namespace Orchard.Tests.ContentManagement {
|
||||
.ToAttr(t => t.ANullableDate)
|
||||
.ToAttr(t => t.ANullableDouble)
|
||||
.ToAttr(t => t.ANullableFloat)
|
||||
.ToAttr(t => t.ANullableDecimal);
|
||||
.ToAttr(t => t.ANullableDecimal)
|
||||
.ToAttr(t => t.ANullableGuid);
|
||||
|
||||
Assert.That(el.Attr("AString"), Is.EqualTo(""));
|
||||
Assert.That(el.Attr("ANullableInt"), Is.EqualTo("null"));
|
||||
@@ -348,6 +383,7 @@ namespace Orchard.Tests.ContentManagement {
|
||||
Assert.That(el.Attr("ANullableDouble"), Is.EqualTo("null"));
|
||||
Assert.That(el.Attr("ANullableFloat"), Is.EqualTo("null"));
|
||||
Assert.That(el.Attr("ANullableDecimal"), Is.EqualTo("null"));
|
||||
Assert.That(el.Attr("ANullableGuid"), Is.EqualTo("null"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -357,7 +393,7 @@ namespace Orchard.Tests.ContentManagement {
|
||||
XElement.Parse(
|
||||
"<data AString=\"null\" ANullableInt=\"null\" ANullableBoolean=\"null\" " +
|
||||
"ANullableDate=\"null\" ANullableDouble=\"null\" " +
|
||||
"ANullableFloat=\"null\" ANullableDecimal=\"null\"/>");
|
||||
"ANullableFloat=\"null\" ANullableDecimal=\"null\" ANullableGuid=\"null\"/>");
|
||||
el.With(target)
|
||||
.FromAttr(t => t.AString)
|
||||
.FromAttr(t => t.ANullableInt)
|
||||
@@ -365,7 +401,8 @@ namespace Orchard.Tests.ContentManagement {
|
||||
.FromAttr(t => t.ANullableDate)
|
||||
.FromAttr(t => t.ANullableDouble)
|
||||
.FromAttr(t => t.ANullableFloat)
|
||||
.FromAttr(t => t.ANullableDecimal);
|
||||
.FromAttr(t => t.ANullableDecimal)
|
||||
.FromAttr(t => t.ANullableGuid);
|
||||
|
||||
Assert.That(target.AString, Is.EqualTo("null"));
|
||||
Assert.That(target.ANullableInt, Is.Null);
|
||||
@@ -374,6 +411,7 @@ namespace Orchard.Tests.ContentManagement {
|
||||
Assert.That(target.ANullableDouble, Is.Null);
|
||||
Assert.That(target.ANullableFloat, Is.Null);
|
||||
Assert.That(target.ANullableDecimal, Is.Null);
|
||||
Assert.That(target.ANullableGuid, Is.Null);
|
||||
}
|
||||
|
||||
private class Target {
|
||||
@@ -384,12 +422,14 @@ namespace Orchard.Tests.ContentManagement {
|
||||
public double ADouble { get; set; }
|
||||
public float AFloat { get; set; }
|
||||
public decimal ADecimal { get; set; }
|
||||
public Guid AGuid { get; set; }
|
||||
public int? ANullableInt { get; set; }
|
||||
public bool? ANullableBoolean { get; set; }
|
||||
public DateTime? ANullableDate { get; set; }
|
||||
public double? ANullableDouble { get; set; }
|
||||
public float? ANullableFloat { get; set; }
|
||||
public decimal? ANullableDecimal { get; set; }
|
||||
public Guid? ANullableGuid { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,10 +8,13 @@ using NUnit.Framework;
|
||||
using Orchard.DisplayManagement.Descriptors;
|
||||
using Orchard.DisplayManagement.Descriptors.ResourceBindingStrategy;
|
||||
using Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy;
|
||||
using Orchard.Environment;
|
||||
using Orchard.Environment.Descriptor.Models;
|
||||
using Orchard.Environment.Extensions;
|
||||
using Orchard.Environment.Extensions.Models;
|
||||
using Orchard.FileSystems.VirtualPath;
|
||||
using Orchard.Tests.Localization;
|
||||
using Orchard.UI.Resources;
|
||||
|
||||
namespace Orchard.Tests.DisplayManagement.Descriptors {
|
||||
[TestFixture]
|
||||
@@ -29,8 +32,10 @@ namespace Orchard.Tests.DisplayManagement.Descriptors {
|
||||
|
||||
builder.Register(ctx => _descriptor);
|
||||
builder.RegisterType<StylesheetBindingStrategy>().As<IShapeTableProvider>();
|
||||
builder.RegisterType<ResourceFileHashProvider>().As<IResourceFileHashProvider>();
|
||||
builder.RegisterInstance(_testViewEngine).As<IShapeTemplateViewEngine>();
|
||||
builder.RegisterInstance(_testVirtualPathProvider).As<IVirtualPathProvider>();
|
||||
builder.RegisterInstance(new Work<WorkContext>(resolve => new StubWorkContext())).AsSelf();
|
||||
|
||||
var extensionManager = new Mock<IExtensionManager>();
|
||||
builder.Register(ctx => extensionManager);
|
||||
|
||||
@@ -16,6 +16,7 @@ using Orchard.Environment.Extensions.Folders;
|
||||
using Orchard.Environment.Features;
|
||||
using Orchard.Environment.State;
|
||||
using Orchard.Events;
|
||||
using Orchard.Locking;
|
||||
using Orchard.Tests.Environment.Extensions;
|
||||
using Orchard.Tests.Stubs;
|
||||
|
||||
@@ -27,10 +28,10 @@ namespace Orchard.Tests.Environment.Features {
|
||||
protected override IEnumerable<Type> DatabaseTypes {
|
||||
get {
|
||||
return new[] {
|
||||
typeof (ShellDescriptorRecord),
|
||||
typeof (ShellFeatureRecord),
|
||||
typeof (ShellParameterRecord),
|
||||
};
|
||||
typeof (ShellDescriptorRecord),
|
||||
typeof (ShellFeatureRecord),
|
||||
typeof (ShellParameterRecord),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,11 +40,13 @@ namespace Orchard.Tests.Environment.Features {
|
||||
builder.RegisterInstance(_folders).As<IExtensionFolders>();
|
||||
builder.RegisterType<ExtensionManager>().As<IExtensionManager>();
|
||||
builder.RegisterType<FeatureManager>().As<IFeatureManager>();
|
||||
builder.RegisterType<LockingProvider>().As<ILockingProvider>();
|
||||
builder.RegisterType<StubCacheManager>().As<ICacheManager>();
|
||||
builder.RegisterType<StubParallelCacheContext>().As<IParallelCacheContext>();
|
||||
builder.RegisterType<StubAsyncTokenProvider>().As<IAsyncTokenProvider>();
|
||||
builder.RegisterType<ShellDescriptorManager>().As<IShellDescriptorManager>().SingleInstance();
|
||||
builder.RegisterType<ShellStateManager>().As<IShellStateManager>().SingleInstance();
|
||||
builder.RegisterType<Signals>().As<ISignals>().SingleInstance();
|
||||
builder.RegisterType<StubEventBus>().As<IEventBus>().SingleInstance();
|
||||
builder.RegisterSource(new EventsRegistrationSource());
|
||||
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
using Autofac;
|
||||
using System.Collections.Generic;
|
||||
using System.Web;
|
||||
using Autofac;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Localization.Services;
|
||||
using Orchard.Mvc;
|
||||
using Orchard.Tests.Stubs;
|
||||
using System.Collections.Generic;
|
||||
using System.Web;
|
||||
|
||||
namespace Orchard.Tests.Localization {
|
||||
[TestFixture]
|
||||
@@ -18,7 +17,7 @@ namespace Orchard.Tests.Localization {
|
||||
public void Init() {
|
||||
var mockLocalizedManager = new Mock<ILocalizedStringManager>();
|
||||
mockLocalizedManager
|
||||
.Setup(x => x.GetLocalizedString(new List<string> { It.IsAny<string>() }, It.IsAny<string>(), It.IsAny<string>()))
|
||||
.Setup(x => x.GetLocalizedString(It.IsAny<IEnumerable<string>>(), It.IsAny<string>(), It.IsAny<string>()))
|
||||
.Returns(new FormatForScope("foo {0}", null));
|
||||
|
||||
var builder = new ContainerBuilder();
|
||||
@@ -38,8 +37,7 @@ namespace Orchard.Tests.Localization {
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TextDoesEncodeHtmlEncodedArguments()
|
||||
{
|
||||
public void TextDoesEncodeHtmlEncodedArguments() {
|
||||
Assert.That(_text.Get("foo {0}", new HtmlString("bar")).Text, Is.EqualTo("foo bar"));
|
||||
Assert.That(_text.Get("foo {0}", new HtmlString("<bar>")).Text, Is.EqualTo("foo <bar>"));
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
<RootNamespace>Orchard.Tests</RootNamespace>
|
||||
<AssemblyName>Orchard.Framework.Tests</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
@@ -44,7 +45,6 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
@@ -56,7 +56,6 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
@@ -142,7 +141,6 @@
|
||||
<HintPath>..\..\lib\sqlce\System.Data.SqlServerCe.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<Reference Include="System.Net.Http.Formatting, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.7\lib\net45\System.Net.Http.Formatting.dll</HintPath>
|
||||
</Reference>
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace Orchard.Tests.UI.Resources {
|
||||
private IResourceManager _resourceManager;
|
||||
private IResourceFileHashProvider _resourceFileHashProvider;
|
||||
private TestManifestProvider _testManifest;
|
||||
private string _appPath = "/AppPath/";
|
||||
private readonly string _appPath = "/AppPath/";
|
||||
|
||||
private class TestManifestProvider : IResourceManifestProvider {
|
||||
public Action<ResourceManifest> DefineManifest { get; set; }
|
||||
@@ -30,10 +30,6 @@ namespace Orchard.Tests.UI.Resources {
|
||||
}
|
||||
|
||||
private void VerifyPaths(string resourceType, RequireSettings defaultSettings, string expectedPaths) {
|
||||
VerifyPaths(resourceType, defaultSettings, expectedPaths, false);
|
||||
}
|
||||
|
||||
private void VerifyPaths(string resourceType, RequireSettings defaultSettings, string expectedPaths, bool ssl) {
|
||||
defaultSettings = defaultSettings ?? new RequireSettings();
|
||||
var requiredResources = _resourceManager.BuildRequiredResources(resourceType);
|
||||
var renderedResources = string.Join(",", requiredResources.Select(context => context
|
||||
@@ -57,90 +53,68 @@ namespace Orchard.Tests.UI.Resources {
|
||||
|
||||
[Test]
|
||||
public void ReleasePathIsTheDefaultPath() {
|
||||
_testManifest.DefineManifest = m => {
|
||||
m.DefineResource("script", "Script1").SetUrl("script1.min.js", "script1.js");
|
||||
};
|
||||
_testManifest.DefineManifest = m => m.DefineResource("script", "Script1").SetUrl("script1.min.js", "script1.js");
|
||||
_resourceManager.Require("script", "Script1");
|
||||
VerifyPaths("script", null, "script1.min.js");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void DebugPathIsUsedWithDebugMode() {
|
||||
_testManifest.DefineManifest = m => {
|
||||
m.DefineResource("script", "Script1").SetUrl("script1.min.js", "script1.js");
|
||||
};
|
||||
_testManifest.DefineManifest = m => m.DefineResource("script", "Script1").SetUrl("script1.min.js", "script1.js");
|
||||
_resourceManager.Require("script", "Script1");
|
||||
VerifyPaths("script", new RequireSettings { DebugMode = true }, "script1.js");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ReleasePathIsUsedWhenNoDebugPath() {
|
||||
_testManifest.DefineManifest = m => {
|
||||
m.DefineResource("script", "Script1").SetUrl("script1.min.js");
|
||||
};
|
||||
_testManifest.DefineManifest = m => m.DefineResource("script", "Script1").SetUrl("script1.min.js");
|
||||
_resourceManager.Require("script", "Script1");
|
||||
VerifyPaths("script", new RequireSettings { DebugMode = true }, "script1.min.js");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void DefaultSettingsAreOverriddenByUseDebugMode() {
|
||||
_testManifest.DefineManifest = m => {
|
||||
m.DefineResource("script", "Script1").SetUrl("script1.min.js", "script1.js");
|
||||
};
|
||||
_testManifest.DefineManifest = m => m.DefineResource("script", "Script1").SetUrl("script1.min.js", "script1.js");
|
||||
_resourceManager.Require("script", "Script1").UseDebugMode();
|
||||
VerifyPaths("script", new RequireSettings { DebugMode = false }, "script1.js");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void CdnPathIsUsedInCdnMode() {
|
||||
_testManifest.DefineManifest = m => {
|
||||
m.DefineResource("script", "Script1").SetUrl("script1.js").SetCdn("http://cdn/script1.min.js");
|
||||
};
|
||||
_testManifest.DefineManifest = m => m
|
||||
.DefineResource("script", "Script1")
|
||||
.SetUrl("script1.js")
|
||||
.SetCdn("http://cdn/script1.min.js");
|
||||
_resourceManager.Require("script", "Script1");
|
||||
VerifyPaths("script", new RequireSettings { CdnMode = true }, "http://cdn/script1.min.js");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void CdnSslPathIsUsedInCdnMode() {
|
||||
_testManifest.DefineManifest = m => {
|
||||
m.DefineResource("script", "Script1").SetUrl("script1.js").SetCdn("https://cdn/script1.min.js");
|
||||
};
|
||||
_testManifest.DefineManifest = m => m
|
||||
.DefineResource("script", "Script1")
|
||||
.SetUrl("script1.js")
|
||||
.SetCdn("https://cdn/script1.min.js");
|
||||
_resourceManager.Require("script", "Script1");
|
||||
VerifyPaths("script", new RequireSettings { CdnMode = true }, "https://cdn/script1.min.js", true);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void LocalPathIsUsedInCdnModeNotSupportsSsl() {
|
||||
_testManifest.DefineManifest = m => {
|
||||
m.DefineResource("script", "Script1").SetUrl("script1.min.js", "script1.js").SetCdn("http://cdn/script1.min.js", "http://cdn/script1.js");
|
||||
};
|
||||
_resourceManager.Require("script", "Script1");
|
||||
VerifyPaths("script", new RequireSettings { CdnMode = true }, "script1.min.js", true);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void LocalDebugPathIsUsedInCdnModeNotSupportsSslAndDebug() {
|
||||
_testManifest.DefineManifest = m => {
|
||||
m.DefineResource("script", "Script1").SetUrl("script1.min.js", "script1.js").SetCdn("http://cdn/script1.min.js", "http://cdn/script1.js");
|
||||
};
|
||||
_resourceManager.Require("script", "Script1");
|
||||
VerifyPaths("script", new RequireSettings { CdnMode = true, DebugMode = true }, "script1.js", true);
|
||||
VerifyPaths("script", new RequireSettings { CdnMode = true }, "https://cdn/script1.min.js");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void CdnDebugPathIsUsedInCdnModeAndDebugMode() {
|
||||
_testManifest.DefineManifest = m => {
|
||||
m.DefineResource("script", "Script1").SetUrl("script1.js").SetCdn("http://cdn/script1.min.js", "http://cdn/script1.js");
|
||||
};
|
||||
_testManifest.DefineManifest = m => m
|
||||
.DefineResource("script", "Script1")
|
||||
.SetUrl("script1.js")
|
||||
.SetCdn("http://cdn/script1.min.js", "http://cdn/script1.js");
|
||||
_resourceManager.Require("script", "Script1");
|
||||
VerifyPaths("script", new RequireSettings { CdnMode = true, DebugMode = true }, "http://cdn/script1.js");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void DebugPathIsUsedInCdnModeAndDebugModeAndThereIsNoCdnDebugPath() {
|
||||
_testManifest.DefineManifest = m => {
|
||||
m.DefineResource("script", "Script1").SetUrl("script1.min.js", "script1.js").SetCdn("http://cdn/script1.min.js");
|
||||
};
|
||||
_testManifest.DefineManifest = m => m
|
||||
.DefineResource("script", "Script1")
|
||||
.SetUrl("script1.min.js", "script1.js")
|
||||
.SetCdn("http://cdn/script1.min.js");
|
||||
_resourceManager.Require("script", "Script1");
|
||||
VerifyPaths("script", new RequireSettings { CdnMode = true, DebugMode = true }, "script1.js");
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<RootNamespace>Orchard.WarmupStarter</RootNamespace>
|
||||
<AssemblyName>Orchard.WarmupStarter</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
@@ -22,7 +23,6 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<CodeAnalysisRuleSet>..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
||||
@@ -34,7 +34,6 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<RootNamespace>Orchard.Web.Tests</RootNamespace>
|
||||
<AssemblyName>Orchard.Web.Tests</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
@@ -41,7 +42,6 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
@@ -53,7 +53,6 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -10,6 +10,7 @@ using Orchard.Core.Common.Settings;
|
||||
using Orchard.Core.Common.ViewModels;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Services;
|
||||
using Orchard.Utility.Extensions;
|
||||
|
||||
namespace Orchard.Core.Common.Drivers {
|
||||
public class TextFieldDriver : ContentFieldDriver<TextField> {
|
||||
@@ -71,6 +72,16 @@ namespace Orchard.Core.Common.Drivers {
|
||||
if (settings.Required && String.IsNullOrWhiteSpace(field.Value)) {
|
||||
updater.AddModelError("Text", T("The {0} field is required.", T(field.DisplayName)));
|
||||
}
|
||||
|
||||
if (settings.MaxLength > 0) {
|
||||
|
||||
var value = new HtmlString(_htmlFilters.Aggregate(field.Value, (text, filter) => filter.ProcessContent(text, settings.Flavor)))
|
||||
.ToString().RemoveTags();
|
||||
|
||||
if (value.Length > settings.MaxLength) {
|
||||
updater.AddModelError("Text", T("The maximum allowed length for the field {0} is {1}", T(field.DisplayName), settings.MaxLength));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return Editor(part, field, shapeHelper);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Orchard.Core.Common.Settings {
|
||||
|
||||
@@ -9,5 +10,8 @@ namespace Orchard.Core.Common.Settings {
|
||||
public string Hint { get; set; }
|
||||
public string Placeholder { get; set; }
|
||||
public string DefaultValue { get; set; }
|
||||
[Range(0, int.MaxValue)]
|
||||
[DisplayName("Maximum Length")]
|
||||
public int MaxLength { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,9 +35,10 @@ namespace Orchard.Core.Common.Settings {
|
||||
builder.WithSetting("TextFieldSettings.Required", model.Settings.Required.ToString(CultureInfo.InvariantCulture));
|
||||
builder.WithSetting("TextFieldSettings.Placeholder", model.Settings.Placeholder);
|
||||
builder.WithSetting("TextFieldSettings.DefaultValue", model.Settings.DefaultValue);
|
||||
|
||||
yield return DefinitionTemplate(model);
|
||||
builder.WithSetting("TextFieldSettings.MaxLength", model.Settings.MaxLength.ToString());
|
||||
}
|
||||
|
||||
yield return DefinitionTemplate(model);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,12 @@
|
||||
@{
|
||||
var propertyName = Model.PropertyName != null ? (string)Model.PropertyName : "Text";
|
||||
var htmlAttributes = (Dictionary<string, object>)Model.HtmlAttributes;
|
||||
|
||||
var htmlAttributes = new Dictionary<string, object> {
|
||||
{"class", "text large"}
|
||||
};
|
||||
if (htmlAttributes == null) {
|
||||
htmlAttributes = new Dictionary<string, object> {
|
||||
{"class", "text large"}
|
||||
};
|
||||
}
|
||||
|
||||
if (Model.Required == true) {
|
||||
htmlAttributes["required"] = "required";
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
@{
|
||||
var propertyName = Model.PropertyName != null ? (string)Model.PropertyName : "Text";
|
||||
var htmlAttributes = (Dictionary<string, object>)Model.HtmlAttributes;
|
||||
|
||||
var htmlAttributes = new Dictionary<string, object> {
|
||||
{"class", "text small"}
|
||||
};
|
||||
if (htmlAttributes == null) {
|
||||
htmlAttributes = new Dictionary<string, object> {
|
||||
{"class", "text small"}
|
||||
};
|
||||
}
|
||||
|
||||
if (Model.Required == true) {
|
||||
htmlAttributes["required"] = "required";
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
@{
|
||||
var propertyName = Model.PropertyName != null ? (string)Model.PropertyName : "Text";
|
||||
var htmlAttributes = (Dictionary<string, object>)Model.HtmlAttributes;
|
||||
|
||||
var htmlAttributes = new Dictionary<string, object>();
|
||||
if (htmlAttributes == null) {
|
||||
htmlAttributes = new Dictionary<string, object>();
|
||||
}
|
||||
|
||||
if (Model.Required == true) {
|
||||
htmlAttributes["required"] = "required";
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
@{
|
||||
var propertyName = Model.PropertyName != null ? (string)Model.PropertyName : "Text";
|
||||
var htmlAttributes = (Dictionary<string, object>)Model.HtmlAttributes;
|
||||
|
||||
var htmlAttributes = new Dictionary<string, object> {
|
||||
{"class", "text medium"}
|
||||
};
|
||||
if (htmlAttributes == null) {
|
||||
htmlAttributes = new Dictionary<string, object> {
|
||||
{"class", "text medium"}
|
||||
};
|
||||
}
|
||||
|
||||
if (Model.Required == true) {
|
||||
htmlAttributes["required"] = "required";
|
||||
|
||||
@@ -3,10 +3,16 @@
|
||||
var propertyName = Model.PropertyName != null ? (string)Model.PropertyName : "Text";
|
||||
|
||||
string editorFlavor = Model.EditorFlavor;
|
||||
var htmlAttributes = (Dictionary<string, object>)Model.HtmlAttributes;
|
||||
|
||||
var htmlAttributes = new Dictionary<string, object> {
|
||||
{"class", editorFlavor.HtmlClassify()}
|
||||
};
|
||||
if (htmlAttributes == null) {
|
||||
htmlAttributes = new Dictionary<string, object> {
|
||||
{"class", editorFlavor.HtmlClassify()}};
|
||||
|
||||
}
|
||||
else {
|
||||
htmlAttributes["class"] = editorFlavor.HtmlClassify();
|
||||
}
|
||||
|
||||
if (Model.Required == true) {
|
||||
htmlAttributes["required"] = "required";
|
||||
|
||||
@@ -7,6 +7,12 @@
|
||||
@Html.ValidationMessageFor(m => m.Settings.Flavor)
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<label for="@Html.FieldIdFor(m => m.Settings.MaxLength)">@T("Maximum length")</label>
|
||||
@Html.EditorFor(m => m.Settings.MaxLength, new { htmlAttributes = new { min = 0 } })
|
||||
<span class="hint">@T("Maximum length allowed for this field. Setting the value to 0 means unlimited length.")</span>
|
||||
@Html.ValidationMessageFor(m => m.Settings.MaxLength)
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<div>
|
||||
@Html.CheckBoxFor(m => m.Settings.Required) <label for="@Html.FieldIdFor(m => m.Settings.Required)" class="forcheckbox">@T("Required")</label>
|
||||
@@ -29,4 +35,4 @@
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
@Display.DefinitionTemplate(TemplateName: "TextFieldDefaultValueEditor", Model: Model)
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
|
||||
@@ -1,17 +1,25 @@
|
||||
@model Orchard.Core.Common.ViewModels.TextFieldDriverViewModel
|
||||
@{
|
||||
var maxLength = Model.Settings.MaxLength > 0 ? Model.Settings.MaxLength.ToString() : "";
|
||||
}
|
||||
|
||||
<fieldset>
|
||||
<label for="@Html.FieldIdFor(m => m.Text)" @if(Model.Settings.Required) { <text>class="required"</text> }>@Model.Field.DisplayName</label>
|
||||
<label for="@Html.FieldIdFor(m => m.Text)" @if (Model.Settings.Required) { <text> class="required" </text> }>@Model.Field.DisplayName</label>
|
||||
@if (String.IsNullOrWhiteSpace(Model.Settings.Flavor)) {
|
||||
@(Model.Settings.Required
|
||||
? Html.TextBoxFor(m => m.Text, new { @class = "text", required = "required", placeholder = Model.Settings.Placeholder })
|
||||
: Html.TextBoxFor(m => m.Text, new { @class = "text", placeholder = Model.Settings.Placeholder }))
|
||||
? Html.TextBoxFor(m => m.Text, new { @class = "text", maxlength = maxLength, placeholder = Model.Settings.Placeholder, required = "required" })
|
||||
: Html.TextBoxFor(m => m.Text, new { @class = "text", maxlength = maxLength, placeholder = Model.Settings.Placeholder }))
|
||||
@Html.ValidationMessageFor(m => m.Text)
|
||||
}
|
||||
else {
|
||||
@Display.Body_Editor(Text: Model.Text, EditorFlavor: Model.Settings.Flavor, Required: Model.Settings.Required, ContentItem: Model.ContentItem, Placeholder: Model.Settings.Placeholder, Field: Model.Field)
|
||||
var htmlAttributes = new Dictionary<string, object> {
|
||||
{"maxlength", maxLength}
|
||||
};
|
||||
|
||||
@Display.Body_Editor(Text: Model.Text, EditorFlavor: Model.Settings.Flavor, Required: Model.Settings.Required,
|
||||
ContentItem: Model.ContentItem, Placeholder: Model.Settings.Placeholder, Field: Model.Field, HtmlAttributes: htmlAttributes)
|
||||
}
|
||||
@if (HasText(Model.Settings.Hint)) {
|
||||
<span class="hint">@Model.Settings.Hint</span>
|
||||
<span class="hint">@Model.Settings.Hint</span>
|
||||
}
|
||||
</fieldset>
|
||||
@@ -1,26 +1,26 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
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;
|
||||
using Orchard.Core.Contents.Settings;
|
||||
using Orchard.Core.Navigation.Models;
|
||||
using Orchard.Core.Navigation.Services;
|
||||
using Orchard.Core.Navigation.ViewModels;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Mvc.Extensions;
|
||||
using Orchard.UI;
|
||||
using Orchard.UI.Notify;
|
||||
using Orchard.UI.Navigation;
|
||||
using Orchard.Utility;
|
||||
using System;
|
||||
using Orchard.ContentManagement.Handlers;
|
||||
using Orchard.Logging;
|
||||
using Orchard.Exceptions;
|
||||
using Orchard.ContentManagement.Aspects;
|
||||
using Orchard.Utility.Extensions;
|
||||
using Orchard.Mvc.Html;
|
||||
using Orchard.Core.Contents.Settings;
|
||||
using Orchard.Data;
|
||||
using System.Web.Routing;
|
||||
using Orchard.Exceptions;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Logging;
|
||||
using Orchard.Mvc.Extensions;
|
||||
using Orchard.Mvc.Html;
|
||||
using Orchard.UI;
|
||||
using Orchard.UI.Navigation;
|
||||
using Orchard.UI.Notify;
|
||||
using Orchard.Utility;
|
||||
using Orchard.Utility.Extensions;
|
||||
|
||||
namespace Orchard.Core.Navigation.Controllers {
|
||||
[ValidateInput(false)]
|
||||
@@ -249,13 +249,14 @@ namespace Orchard.Core.Navigation.Controllers {
|
||||
}
|
||||
|
||||
[HttpPost, ActionName("Edit")]
|
||||
[Mvc.FormValueRequired("submit.Save")]
|
||||
[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)
|
||||
_contentManager.Publish(contentItem);
|
||||
});
|
||||
}
|
||||
|
||||
private ActionResult EditPOST(int id, string returnUrl, Action<ContentItem> conditionallyPublish) {
|
||||
var contentItem = _contentManager.Get(id, VersionOptions.DraftRequired);
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Core.Navigation.Models;
|
||||
|
||||
namespace Orchard.Core.Navigation.ViewModels {
|
||||
public class MenuPartViewModel {
|
||||
@@ -7,7 +9,8 @@ namespace Orchard.Core.Navigation.ViewModels {
|
||||
public int CurrentMenuId { get; set; }
|
||||
public bool OnMenu { get; set; }
|
||||
|
||||
public ContentItem ContentItem { get; set; }
|
||||
public ContentItem ContentItem { get; set; }
|
||||
[StringLength(MenuPartRecord.DefaultMenuTextLength)]
|
||||
public string MenuText { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
@@ -14,7 +13,7 @@
|
||||
<RootNamespace>Orchard.Core</RootNamespace>
|
||||
<AssemblyName>Orchard.Core</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<MvcBuildViews>false</MvcBuildViews>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>4.0</OldToolsVersion>
|
||||
@@ -39,7 +38,6 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>..\..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
@@ -51,13 +49,12 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
|
||||
<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>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
@@ -297,6 +294,8 @@
|
||||
<Compile Include="Title\Migrations.cs" />
|
||||
<Compile Include="Title\Models\TitlePart.cs" />
|
||||
<Compile Include="Title\Models\TitlePartRecord.cs" />
|
||||
<Compile Include="Title\Settings\TitlePartSettings.cs" />
|
||||
<Compile Include="Title\Settings\TitlePartSettingsEvents.cs" />
|
||||
<Compile Include="XmlRpc\Controllers\HomeController.cs" />
|
||||
<Compile Include="XmlRpc\Controllers\LiveWriterController.cs" />
|
||||
<Compile Include="XmlRpc\IXmlRpcDriver.cs" />
|
||||
@@ -614,6 +613,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
<Content Include="Title\Views\DefinitionTemplates\TitlePartSettings.cshtml" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
@@ -659,10 +659,4 @@
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props'))" />
|
||||
</Target>
|
||||
</Project>
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.Drivers;
|
||||
using Orchard.ContentManagement.Handlers;
|
||||
using Orchard.Core.Common.Settings;
|
||||
using Orchard.Core.Title.Models;
|
||||
using Orchard.Core.Title.Settings;
|
||||
using Orchard.Localization;
|
||||
|
||||
namespace Orchard.Core.Title.Drivers {
|
||||
@@ -33,7 +35,14 @@ namespace Orchard.Core.Title.Drivers {
|
||||
}
|
||||
|
||||
protected override DriverResult Editor(TitlePart part, IUpdateModel updater, dynamic shapeHelper) {
|
||||
updater.TryUpdateModel(part, Prefix, null, null);
|
||||
if (updater.TryUpdateModel(part, Prefix, null, null)){
|
||||
|
||||
var settings = part.Settings.GetModel<TitlePartSettings>();
|
||||
|
||||
if (settings.MaxLength > 0 && part.Title.Length > settings.MaxLength) {
|
||||
updater.AddModelError("Title", T("The maximum allowed length for the title is {0}", settings.MaxLength));
|
||||
}
|
||||
}
|
||||
|
||||
return Editor(part, shapeHelper);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using Orchard.ContentManagement.MetaData;
|
||||
using Orchard.Core.Contents.Extensions;
|
||||
using Orchard.Data.Migration;
|
||||
using Orchard.Core.Title.Settings;
|
||||
|
||||
namespace Orchard.Core.Title {
|
||||
public class Migrations : DataMigrationImpl {
|
||||
@@ -9,7 +10,7 @@ namespace Orchard.Core.Title {
|
||||
SchemaBuilder.CreateTable("TitlePartRecord",
|
||||
table => table
|
||||
.ContentPartVersionRecord()
|
||||
.Column<string>("Title", column => column.WithLength(1024))
|
||||
.Column<string>("Title", column => column.WithLength(TitlePartSettings.MaxTitleLength))
|
||||
);
|
||||
|
||||
ContentDefinitionManager.AlterPartDefinition("TitlePart", builder => builder
|
||||
|
||||
19
src/Orchard.Web/Core/Title/Settings/TitlePartSettings.cs
Normal file
19
src/Orchard.Web/Core/Title/Settings/TitlePartSettings.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace Orchard.Core.Title.Settings {
|
||||
|
||||
|
||||
public class TitlePartSettings {
|
||||
// Whenever this constant is changed a new migration step must be created to update the length of the field on the DB
|
||||
public const int MaxTitleLength = 1024;
|
||||
[Range(0, MaxTitleLength)]
|
||||
[DisplayName("Maximum Length")]
|
||||
public int MaxLength {get; set;}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.MetaData;
|
||||
using Orchard.ContentManagement.MetaData.Builders;
|
||||
using Orchard.ContentManagement.MetaData.Models;
|
||||
using Orchard.ContentManagement.ViewModels;
|
||||
|
||||
namespace Orchard.Core.Title.Settings {
|
||||
public class TitlePartSettingsEvents : ContentDefinitionEditorEventsBase {
|
||||
|
||||
public override IEnumerable<TemplateViewModel> TypePartEditor(ContentTypePartDefinition definition) {
|
||||
if (definition.PartDefinition.Name != "TitlePart") {
|
||||
yield break;
|
||||
}
|
||||
|
||||
var settings = definition
|
||||
.Settings
|
||||
.GetModel<TitlePartSettings>()
|
||||
?? new TitlePartSettings();
|
||||
|
||||
yield return DefinitionTemplate(settings);
|
||||
}
|
||||
|
||||
public override IEnumerable<TemplateViewModel> TypePartEditorUpdate(ContentTypePartDefinitionBuilder builder, IUpdateModel updateModel) {
|
||||
|
||||
if (builder.Name != "TitlePart") {
|
||||
yield break;
|
||||
}
|
||||
|
||||
var model = new TitlePartSettings();
|
||||
|
||||
if (updateModel.TryUpdateModel(model, "TitlePartSettings", null, null)) {
|
||||
builder.WithSetting("TitlePartSettings.MaxLength", model.MaxLength.ToString());
|
||||
|
||||
}
|
||||
yield return DefinitionTemplate(model);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
@using Orchard.Core.Title.Settings;
|
||||
@model TitlePartSettings
|
||||
@{
|
||||
var maxLength = TitlePartSettings.MaxTitleLength;
|
||||
}
|
||||
|
||||
<fieldset>
|
||||
<label for="@Html.FieldIdFor(m => m.MaxLength)">@T("Maximum length")</label>
|
||||
@Html.EditorFor(m => m.MaxLength, new { htmlAttributes = new { min = 0, max = maxLength } })
|
||||
<span class="hint">@T("Maximum length allowed for the title. Setting the value to 0 means the maximum allowed length is {0} characters.", maxLength)</span>
|
||||
@Html.ValidationMessageFor(m => m.MaxLength)
|
||||
</fieldset>
|
||||
@@ -1,7 +1,11 @@
|
||||
@model Orchard.Core.Title.Models.TitlePart
|
||||
@using Orchard.Core.Title.Settings
|
||||
@model Orchard.Core.Title.Models.TitlePart
|
||||
@{
|
||||
var maxLength = Model.Settings.GetModel<TitlePartSettings>().MaxLength > 0 ? Model.Settings.GetModel<TitlePartSettings>().MaxLength.ToString() : "";
|
||||
}
|
||||
|
||||
<fieldset>
|
||||
<label for="@Html.FieldIdFor(m => m.Title)" class="required">@T("Title")</label>
|
||||
@Html.TextBoxFor(m => m.Title, new { @class = "text large", autofocus = "autofocus" })
|
||||
<label for="@Html.FieldIdFor(m => m.Title)" class="required">@T("Title")</label>
|
||||
@Html.TextBoxFor(m => m.Title, new { @class = "text large", autofocus = "autofocus", maxlength = maxLength })
|
||||
<span class="hint">@T("You must provide a title for this content item")</span>
|
||||
</fieldset>
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
</namespaces>
|
||||
</pages>
|
||||
</system.web.webPages.razor>
|
||||
<!-- Registering Roslyn as a compiler for Razor IntelliSense. -->
|
||||
<appSettings>
|
||||
<add key="aspnet:RoslynCompilerLocation" value="..\bin\roslyn" />
|
||||
</appSettings>
|
||||
@@ -73,8 +72,7 @@
|
||||
</runtime>
|
||||
<system.codedom>
|
||||
<compilers>
|
||||
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701" />
|
||||
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+" />
|
||||
<compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" compilerOptions="/langversion:7.3 /nowarn:1659;1699;1701;612;618" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
</compilers>
|
||||
</system.codedom>
|
||||
</configuration>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<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" />
|
||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="2.0.1" 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="NHibernate" version="5.3.10" targetFramework="net48" />
|
||||
</packages>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
@@ -15,7 +14,7 @@
|
||||
<RootNamespace>Lucene</RootNamespace>
|
||||
<AssemblyName>Lucene</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<MvcBuildViews>false</MvcBuildViews>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<UseIISExpress>false</UseIISExpress>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
@@ -40,7 +39,6 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>..\..\..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
@@ -51,18 +49,14 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ICSharpCode.SharpZipLib, Version=1.3.3.11, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\SharpZipLib.1.3.3\lib\net45\ICSharpCode.SharpZipLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Lucene.Net, Version=3.0.3.0, Culture=neutral, PublicKeyToken=85089178b9ac3181, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Lucene.Net.3.0.3\lib\NET40\Lucene.Net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
|
||||
<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>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
@@ -170,10 +164,4 @@
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props'))" />
|
||||
</Target>
|
||||
</Project>
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
</namespaces>
|
||||
</pages>
|
||||
</system.web.webPages.razor>
|
||||
<!-- Registering Roslyn as a compiler for Razor IntelliSense. -->
|
||||
<appSettings>
|
||||
<add key="aspnet:RoslynCompilerLocation" value="..\..\bin\roslyn" />
|
||||
</appSettings>
|
||||
@@ -72,8 +71,7 @@
|
||||
</runtime>
|
||||
<system.codedom>
|
||||
<compilers>
|
||||
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701" />
|
||||
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+" />
|
||||
<compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" compilerOptions="/langversion:7.3 /nowarn:1659;1699;1701;612;618" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
</compilers>
|
||||
</system.codedom>
|
||||
</configuration>
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
<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" />
|
||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="2.0.1" 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="SharpZipLib" version="1.3.3" targetFramework="net48" />
|
||||
</packages>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
@@ -14,7 +13,7 @@
|
||||
<RootNamespace>Markdown</RootNamespace>
|
||||
<AssemblyName>Markdown</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<MvcBuildViews>false</MvcBuildViews>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>4.0</OldToolsVersion>
|
||||
@@ -39,7 +38,6 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>..\..\..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
@@ -50,7 +48,6 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
@@ -58,8 +55,8 @@
|
||||
<Reference Include="Markdig.Signed, Version=0.22.1.0, Culture=neutral, PublicKeyToken=870da25a133885f8, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Markdig.Signed.0.22.1\lib\net452\Markdig.Signed.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
|
||||
<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>
|
||||
<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>
|
||||
@@ -234,10 +231,4 @@
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props'))" />
|
||||
</Target>
|
||||
</Project>
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
</namespaces>
|
||||
</pages>
|
||||
</system.web.webPages.razor>
|
||||
<!-- Registering Roslyn as a compiler for Razor IntelliSense. -->
|
||||
<appSettings>
|
||||
<add key="aspnet:RoslynCompilerLocation" value="..\..\bin\roslyn" />
|
||||
</appSettings>
|
||||
@@ -73,8 +72,7 @@
|
||||
</runtime>
|
||||
<system.codedom>
|
||||
<compilers>
|
||||
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701" />
|
||||
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+" />
|
||||
<compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" compilerOptions="/langversion:7.3 /nowarn:1659;1699;1701;612;618" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
</compilers>
|
||||
</system.codedom>
|
||||
</configuration>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<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" />
|
||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="2.0.1" 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="System.Buffers" version="4.5.1" targetFramework="net48" />
|
||||
<package id="System.Memory" version="4.5.4" targetFramework="net48" />
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
@@ -14,7 +13,7 @@
|
||||
<RootNamespace>Orchard.Alias</RootNamespace>
|
||||
<AssemblyName>Orchard.Alias</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<MvcBuildViews>false</MvcBuildViews>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>4.0</OldToolsVersion>
|
||||
@@ -39,7 +38,6 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>..\..\..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
@@ -50,13 +48,12 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
|
||||
<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>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
@@ -196,10 +193,4 @@
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props'))" />
|
||||
</Target>
|
||||
</Project>
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
@using Orchard.Utility.Extensions
|
||||
|
||||
@{
|
||||
var urlPrefix = WorkContext.Resolve<ShellSettings>().RequestUrlPrefix;
|
||||
|
||||
Layout.Title = T("Manage Aliases").Text;
|
||||
var aliasService = WorkContext.Resolve<IAliasService>();
|
||||
AdminIndexOptions options = Model.Options;
|
||||
@@ -59,10 +57,10 @@
|
||||
<tr>
|
||||
<td>
|
||||
<input type="hidden" value="@alias.Path" name="@Html.FieldNameFor(m => Model.AliasEntries[index].Alias.Path)" />
|
||||
@Html.Link(alias.Path == String.Empty ? "/" : alias.Path, Href("~/" + urlPrefix + alias.Path))
|
||||
@Html.Link(alias.Path == String.Empty ? "/" : alias.Path, Href("~/" + alias.Path))
|
||||
</td>
|
||||
<td>
|
||||
@Html.Link(url, Href("~/" + urlPrefix + "/" + url))
|
||||
@Html.Link(url, Href("~/" + url))
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
@using Orchard.Utility.Extensions
|
||||
|
||||
@{
|
||||
var urlPrefix = WorkContext.Resolve<ShellSettings>().RequestUrlPrefix;
|
||||
|
||||
Layout.Title = T("Manage Aliases").Text;
|
||||
var aliasService = WorkContext.Resolve<IAliasService>();
|
||||
AdminIndexOptions options = Model.Options;
|
||||
@@ -73,10 +71,10 @@
|
||||
<input type="checkbox" value="true" name="@Html.FieldNameFor(m => Model.AliasEntries[index].IsChecked)" />
|
||||
</td>
|
||||
<td>
|
||||
@Html.Link(alias.Path == String.Empty ? "/" : alias.Path, Href("~/" + urlPrefix + alias.Path))
|
||||
@Html.Link(alias.Path == String.Empty ? "/" : alias.Path, Href("~/" + alias.Path))
|
||||
</td>
|
||||
<td>
|
||||
@Html.Link(url, Href("~/" + urlPrefix + "/" + url))
|
||||
@Html.Link(url, Href("~/" + url))
|
||||
</td>
|
||||
<td>
|
||||
<ul class="action-links">
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
</namespaces>
|
||||
</pages>
|
||||
</system.web.webPages.razor>
|
||||
<!-- Registering Roslyn as a compiler for Razor IntelliSense. -->
|
||||
<appSettings>
|
||||
<add key="aspnet:RoslynCompilerLocation" value="..\..\bin\roslyn" />
|
||||
</appSettings>
|
||||
@@ -73,8 +72,7 @@
|
||||
</runtime>
|
||||
<system.codedom>
|
||||
<compilers>
|
||||
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701" />
|
||||
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+" />
|
||||
<compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" compilerOptions="/langversion:7.3 /nowarn:1659;1699;1701;612;618" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
</compilers>
|
||||
</system.codedom>
|
||||
</configuration>
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
<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" />
|
||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="2.0.1" 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" />
|
||||
</packages>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
@@ -14,7 +13,7 @@
|
||||
<RootNamespace>Orchard.AntiSpam</RootNamespace>
|
||||
<AssemblyName>Orchard.AntiSpam</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<MvcBuildViews>false</MvcBuildViews>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>4.0</OldToolsVersion>
|
||||
@@ -39,7 +38,6 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>..\..\..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
@@ -50,13 +48,12 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
|
||||
<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>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
@@ -253,10 +250,4 @@
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props'))" />
|
||||
</Target>
|
||||
</Project>
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
</namespaces>
|
||||
</pages>
|
||||
</system.web.webPages.razor>
|
||||
<!-- Registering Roslyn as a compiler for Razor IntelliSense. -->
|
||||
<appSettings>
|
||||
<add key="aspnet:RoslynCompilerLocation" value="..\..\bin\roslyn" />
|
||||
</appSettings>
|
||||
@@ -73,8 +72,7 @@
|
||||
</runtime>
|
||||
<system.codedom>
|
||||
<compilers>
|
||||
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701" />
|
||||
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+" />
|
||||
<compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" compilerOptions="/langversion:7.3 /nowarn:1659;1699;1701;612;618" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
</compilers>
|
||||
</system.codedom>
|
||||
</configuration>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<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" />
|
||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="2.0.1" 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>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
@@ -15,7 +14,7 @@
|
||||
<RootNamespace>Orchard.ArchiveLater</RootNamespace>
|
||||
<AssemblyName>Orchard.ArchiveLater</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<MvcBuildViews>false</MvcBuildViews>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<UpgradeBackupLocation>
|
||||
@@ -40,7 +39,6 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>..\..\..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
@@ -51,12 +49,11 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
|
||||
<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>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
@@ -169,10 +166,4 @@
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props'))" />
|
||||
</Target>
|
||||
</Project>
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
</namespaces>
|
||||
</pages>
|
||||
</system.web.webPages.razor>
|
||||
<!-- Registering Roslyn as a compiler for Razor IntelliSense. -->
|
||||
<appSettings>
|
||||
<add key="aspnet:RoslynCompilerLocation" value="..\..\bin\roslyn" />
|
||||
</appSettings>
|
||||
@@ -73,8 +72,7 @@
|
||||
</runtime>
|
||||
<system.codedom>
|
||||
<compilers>
|
||||
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701" />
|
||||
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+" />
|
||||
<compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" compilerOptions="/langversion:7.3 /nowarn:1659;1699;1701;612;618" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
</compilers>
|
||||
</system.codedom>
|
||||
</configuration>
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
<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" />
|
||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="2.0.1" 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" />
|
||||
</packages>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
@@ -14,7 +13,7 @@
|
||||
<RootNamespace>Orchard.AuditTrail</RootNamespace>
|
||||
<AssemblyName>Orchard.AuditTrail</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<MvcBuildViews>false</MvcBuildViews>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>4.0</OldToolsVersion>
|
||||
@@ -38,7 +37,6 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>..\..\..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
@@ -49,7 +47,6 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
@@ -60,8 +57,8 @@
|
||||
<Reference Include="Iesi.Collections, Version=4.0.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Iesi.Collections.4.0.4\lib\net461\Iesi.Collections.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
|
||||
<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>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
@@ -412,10 +409,4 @@
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props'))" />
|
||||
</Target>
|
||||
</Project>
|
||||
@@ -21,7 +21,6 @@
|
||||
</namespaces>
|
||||
</pages>
|
||||
</system.web.webPages.razor>
|
||||
<!-- Registering Roslyn as a compiler for Razor IntelliSense. -->
|
||||
<appSettings>
|
||||
<add key="aspnet:RoslynCompilerLocation" value="..\..\bin\roslyn" />
|
||||
</appSettings>
|
||||
@@ -75,8 +74,7 @@
|
||||
</runtime>
|
||||
<system.codedom>
|
||||
<compilers>
|
||||
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701" />
|
||||
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+" />
|
||||
<compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" compilerOptions="/langversion:7.3 /nowarn:1659;1699;1701;612;618" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
</compilers>
|
||||
</system.codedom>
|
||||
</configuration>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<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" />
|
||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="2.0.1" 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="NHibernate" version="5.3.10" targetFramework="net48" />
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
@@ -14,7 +13,7 @@
|
||||
<RootNamespace>Orchard.Autoroute</RootNamespace>
|
||||
<AssemblyName>Orchard.Autoroute</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<MvcBuildViews>false</MvcBuildViews>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>4.0</OldToolsVersion>
|
||||
@@ -39,7 +38,6 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>..\..\..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
@@ -50,13 +48,12 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
|
||||
<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>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
@@ -217,10 +214,4 @@
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props'))" />
|
||||
</Target>
|
||||
</Project>
|
||||
|
||||
@@ -41,6 +41,7 @@ namespace Orchard.Autoroute.Providers {
|
||||
context.For<IContent>("Content")
|
||||
// {Content.Slug}
|
||||
.Token("Slug", (content => content == null ? String.Empty : _slugService.Slugify(content)))
|
||||
.Chain("Slug", "Text", (content => content == null ? String.Empty : _slugService.Slugify(content)))
|
||||
.Token("Path", (content => {
|
||||
var autoroutePart = content.As<AutoroutePart>();
|
||||
if (autoroutePart == null) {
|
||||
|
||||
@@ -186,7 +186,7 @@ namespace Orchard.Autoroute.Services {
|
||||
}
|
||||
|
||||
public string GenerateUniqueSlug(AutoroutePart part, IEnumerable<string> existingPaths) {
|
||||
if (existingPaths == null || !existingPaths.Contains(part.Path))
|
||||
if (existingPaths == null || !existingPaths.Contains(part.Path, StringComparer.OrdinalIgnoreCase))
|
||||
return part.Path;
|
||||
|
||||
var version = existingPaths.Select(s => GetSlugVersion(part.Path, s)).OrderBy(i => i).LastOrDefault();
|
||||
@@ -287,7 +287,8 @@ namespace Orchard.Autoroute.Services {
|
||||
|
||||
private static int? GetSlugVersion(string path, string potentialConflictingPath) {
|
||||
int v;
|
||||
var slugParts = potentialConflictingPath.Split(new[] { path }, StringSplitOptions.RemoveEmptyEntries);
|
||||
// Matching needs to ignore case, so both paths are forced to lowercase.
|
||||
var slugParts = potentialConflictingPath.ToLower().Split(new[] { path.ToLower() }, StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
if (slugParts.Length == 0)
|
||||
return 2;
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
</namespaces>
|
||||
</pages>
|
||||
</system.web.webPages.razor>
|
||||
<!-- Registering Roslyn as a compiler for Razor IntelliSense. -->
|
||||
<appSettings>
|
||||
<add key="aspnet:RoslynCompilerLocation" value="..\..\bin\roslyn" />
|
||||
</appSettings>
|
||||
@@ -72,8 +71,7 @@
|
||||
</runtime>
|
||||
<system.codedom>
|
||||
<compilers>
|
||||
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701" />
|
||||
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+" />
|
||||
<compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" compilerOptions="/langversion:7.3 /nowarn:1659;1699;1701;612;618" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
</compilers>
|
||||
</system.codedom>
|
||||
</configuration>
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
<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" />
|
||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="2.0.1" 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" />
|
||||
</packages>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
@@ -14,7 +13,7 @@
|
||||
<RootNamespace>Orchard.Azure.MediaServices</RootNamespace>
|
||||
<AssemblyName>Orchard.Azure.MediaServices</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<MvcBuildViews>false</MvcBuildViews>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>4.0</OldToolsVersion>
|
||||
@@ -38,7 +37,6 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>..\..\..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
@@ -49,7 +47,6 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
@@ -69,8 +66,8 @@
|
||||
<Reference Include="Microsoft.Azure.KeyVault.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.Azure.KeyVault.Core.1.0.0\lib\net40\Microsoft.Azure.KeyVault.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
|
||||
<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>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="Microsoft.Data.Edm, Version=5.8.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
@@ -601,10 +598,4 @@
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props'))" />
|
||||
</Target>
|
||||
</Project>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -41,7 +41,6 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
@@ -53,7 +52,6 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
</namespaces>
|
||||
</pages>
|
||||
</system.web.webPages.razor>
|
||||
<!-- Registering Roslyn as a compiler for Razor IntelliSense. -->
|
||||
<appSettings>
|
||||
<add key="aspnet:RoslynCompilerLocation" value="..\..\bin\roslyn" />
|
||||
</appSettings>
|
||||
@@ -90,8 +89,7 @@
|
||||
</runtime>
|
||||
<system.codedom>
|
||||
<compilers>
|
||||
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701" />
|
||||
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+" />
|
||||
<compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" compilerOptions="/langversion:7.3 /nowarn:1659;1699;1701;612;618" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
</compilers>
|
||||
</system.codedom>
|
||||
</configuration>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<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.Azure.KeyVault.Core" version="1.0.0" targetFramework="net48" />
|
||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="2.0.1" targetFramework="net48" />
|
||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="4.1.0" targetFramework="net48" />
|
||||
<package id="Microsoft.Data.Edm" version="5.8.4" targetFramework="net48" />
|
||||
<package id="Microsoft.Data.OData" version="5.8.4" targetFramework="net48" />
|
||||
<package id="Microsoft.Data.Services.Client" version="5.8.4" targetFramework="net48" />
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<RootNamespace>Orchard.Azure</RootNamespace>
|
||||
<AssemblyName>Orchard.Azure</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<MvcBuildViews>false</MvcBuildViews>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>4.0</OldToolsVersion>
|
||||
@@ -35,7 +35,6 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>..\..\..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
@@ -46,7 +45,6 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -64,7 +64,8 @@ namespace Orchard.Blogs.BlogsLocalizationExtensions.Handlers {
|
||||
var blogids = new HashSet<int> { blog.As<BlogPart>().ContentItem.Id };
|
||||
|
||||
//seek for same culture blog
|
||||
var realBlog = _localizationService.GetLocalizations(blog).SingleOrDefault(w => w.As<LocalizationPart>().Culture == blogPostCulture);
|
||||
var realBlog = _localizationService.GetLocalizations(blog)
|
||||
.SingleOrDefault(w => w.Culture?.Culture == blogPostCulture.Culture);
|
||||
if (realBlog.Has<LocalizationPart>() && realBlog.As<LocalizationPart>().Culture.Id == blogPostCulture.Id) {
|
||||
blogPost.As<ICommonPart>().Container = realBlog;
|
||||
if (blogPost.Has<AutoroutePart>()) {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
@@ -14,7 +13,7 @@
|
||||
<RootNamespace>Orchard.Blogs</RootNamespace>
|
||||
<AssemblyName>Orchard.Blogs</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<MvcBuildViews>false</MvcBuildViews>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>4.0</OldToolsVersion>
|
||||
@@ -39,7 +38,6 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>..\..\..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
@@ -50,13 +48,12 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
|
||||
<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>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
@@ -280,10 +277,4 @@
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props'))" />
|
||||
</Target>
|
||||
</Project>
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
</namespaces>
|
||||
</pages>
|
||||
</system.web.webPages.razor>
|
||||
<!-- Registering Roslyn as a compiler for Razor IntelliSense. -->
|
||||
<appSettings>
|
||||
<add key="aspnet:RoslynCompilerLocation" value="..\..\bin\roslyn" />
|
||||
</appSettings>
|
||||
@@ -73,8 +72,7 @@
|
||||
</runtime>
|
||||
<system.codedom>
|
||||
<compilers>
|
||||
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701" />
|
||||
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+" />
|
||||
<compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" compilerOptions="/langversion:7.3 /nowarn:1659;1699;1701;612;618" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
</compilers>
|
||||
</system.codedom>
|
||||
</configuration>
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
<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" />
|
||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="2.0.1" 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" />
|
||||
</packages>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<RootNamespace>Orchard.Caching</RootNamespace>
|
||||
<AssemblyName>Orchard.Caching</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<MvcBuildViews>false</MvcBuildViews>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>4.0</OldToolsVersion>
|
||||
@@ -35,7 +35,6 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>..\..\..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
@@ -46,7 +45,6 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<RootNamespace>$$ModuleName$$</RootNamespace>
|
||||
<AssemblyName>$$ModuleName$$</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<MvcBuildViews>false</MvcBuildViews>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>4.0</OldToolsVersion>
|
||||
@@ -33,7 +33,6 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>..\..\..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
@@ -44,13 +43,12 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
|
||||
<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>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
<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" />
|
||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="2.0.1" 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" />
|
||||
</packages>
|
||||
|
||||
@@ -21,13 +21,12 @@
|
||||
</namespaces>
|
||||
</pages>
|
||||
</system.web.webPages.razor>
|
||||
<!-- Registering Roslyn as a compiler for Razor IntelliSense. -->
|
||||
<appSettings>
|
||||
<add key="aspnet:RoslynCompilerLocation" value="..\..\bin\roslyn" />
|
||||
</appSettings>
|
||||
<system.codedom>
|
||||
<compilers>
|
||||
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:latest" />
|
||||
<compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" compilerOptions="/langversion:7.3 /nowarn:1659;1699;1701;612;618" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
</compilers>
|
||||
</system.codedom>
|
||||
<system.web>
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
<RootNamespace>$$ProjectName$$</RootNamespace>
|
||||
<AssemblyName>$$ProjectName$$</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<OldToolsVersion>4.0</OldToolsVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
@@ -20,7 +21,6 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>..\..\..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
@@ -31,7 +31,6 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<RootNamespace>Orchard.CodeGeneration</RootNamespace>
|
||||
<AssemblyName>Orchard.CodeGeneration</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<MvcBuildViews>false</MvcBuildViews>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<UseIISExpress>false</UseIISExpress>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
@@ -37,7 +37,6 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>..\..\..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
@@ -48,7 +47,6 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
@@ -14,7 +13,7 @@
|
||||
<RootNamespace>Orchard.Comments</RootNamespace>
|
||||
<AssemblyName>Orchard.Comments</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<MvcBuildViews>false</MvcBuildViews>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>4.0</OldToolsVersion>
|
||||
@@ -39,7 +38,6 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>..\..\..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
@@ -50,13 +48,12 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
|
||||
<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>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
@@ -271,10 +268,4 @@
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props'))" />
|
||||
</Target>
|
||||
</Project>
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
</namespaces>
|
||||
</pages>
|
||||
</system.web.webPages.razor>
|
||||
<!-- Registering Roslyn as a compiler for Razor IntelliSense. -->
|
||||
<appSettings>
|
||||
<add key="aspnet:RoslynCompilerLocation" value="..\..\bin\roslyn" />
|
||||
</appSettings>
|
||||
@@ -73,8 +72,7 @@
|
||||
</runtime>
|
||||
<system.codedom>
|
||||
<compilers>
|
||||
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701" />
|
||||
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+" />
|
||||
<compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" compilerOptions="/langversion:7.3 /nowarn:1659;1699;1701;612;618" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
</compilers>
|
||||
</system.codedom>
|
||||
</configuration>
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
<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" />
|
||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="2.0.1" 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" />
|
||||
</packages>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user