Compare commits
26 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 44cb5fd96b | |||
| b0b987f9cd | |||
| 3961e2533d | |||
| b46f842400 | |||
| 930acfeb68 | |||
| b004c616ad | |||
| 9d64c4e551 | |||
| 9a0aacd45a | |||
| 29ff7bc340 | |||
| 39a97fb768 | |||
| 0852bd90d0 | |||
| e28365a0e5 | |||
| 0d16c79d0c | |||
| 7cc8983a25 | |||
| e7f8baeca4 | |||
| e716d14a0a | |||
| 4c6a742007 | |||
| 410241b61d | |||
| 4e47fa9a70 | |||
| 9c5fb1fead | |||
| dc41db5fc1 | |||
| 11b6a98df8 | |||
| da9fc1e147 | |||
| 319c75757a | |||
| 6e81e57c8e | |||
| 9ebe282ba6 |
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||
<metadata minClientVersion="3.4.4">
|
||||
<metadata minClientVersion="4.1.0">
|
||||
<id>UmbracoCms.Core</id>
|
||||
<version>8.0.0</version>
|
||||
<title>Umbraco Cms Core Binaries</title>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||
<metadata minClientVersion="3.4.4">
|
||||
<metadata minClientVersion="4.1.0">
|
||||
<id>UmbracoCms.Web</id>
|
||||
<version>8.0.0</version>
|
||||
<title>Umbraco Cms Core Binaries</title>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||
<metadata minClientVersion="3.4.4">
|
||||
<metadata minClientVersion="4.1.0">
|
||||
<id>UmbracoCms</id>
|
||||
<version>8.0.0</version>
|
||||
<title>Umbraco Cms</title>
|
||||
@@ -25,7 +25,7 @@
|
||||
not want this to happen as the alpha of the next major is, really, the next major already.
|
||||
-->
|
||||
<dependency id="Microsoft.AspNet.SignalR.Core" version="[2.4.0, 2.999999)" />
|
||||
<dependency id="Umbraco.ModelsBuilder.Ui" version="[8.0.1]" />
|
||||
<dependency id="Umbraco.ModelsBuilder.Ui" version="[8.0.4]" />
|
||||
<dependency id="ImageProcessor.Web" version="[4.10.0.100,4.999999)" />
|
||||
<dependency id="ImageProcessor.Web.Config" version="[2.5.0.100,2.999999)" />
|
||||
<dependency id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="[2.0.1,2.999999)" />
|
||||
|
||||
@@ -126,45 +126,55 @@
|
||||
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='Microsoft.CodeAnalysis.CSharp')" xdt:Transform="Remove" />
|
||||
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='log4net')" xdt:Transform="Remove" />
|
||||
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='System.Data.SqlServerCe')" xdt:Transform="Remove" />
|
||||
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='System.ValueTuple')" xdt:Transform="Remove" />
|
||||
<dependentAssembly xdt:Locator="Condition(./_defaultNamespace:assemblyIdentity/@name='System.Net.Http.Formatting')" xdt:Transform="Remove" />
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly xdt:Transform="Insert">
|
||||
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly xdt:Transform="Insert">
|
||||
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly xdt:Transform="Insert">
|
||||
<assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly xdt:Transform="Insert">
|
||||
<assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly xdt:Transform="Insert">
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-11.0.0.0" newVersion="11.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly xdt:Transform="Insert">
|
||||
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.2.1.0" newVersion="1.2.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly xdt:Transform="Insert">
|
||||
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.6.0" newVersion="5.2.6.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly xdt:Transform="Insert">
|
||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.6.0" newVersion="5.2.6.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly xdt:Transform="Insert">
|
||||
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly xdt:Transform="Insert">
|
||||
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly xdt:Transform="Insert">
|
||||
<assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly xdt:Transform="Insert">
|
||||
<assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly xdt:Transform="Insert">
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly xdt:Transform="Insert">
|
||||
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.2.3.0" newVersion="1.2.3.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly xdt:Transform="Insert">
|
||||
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly xdt:Transform="Insert">
|
||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly xdt:Transform="Insert">
|
||||
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly xdt:Transform="Insert">
|
||||
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
||||
<system.web.webPages.razor xdt:Transform="Remove" />
|
||||
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
param($installPath, $toolsPath, $package, $project)
|
||||
|
||||
Write-Host "installPath:" "${installPath}"
|
||||
Write-Host "toolsPath:" "${toolsPath}"
|
||||
|
||||
Write-Host " "
|
||||
|
||||
if ($project) {
|
||||
$dateTime = Get-Date -Format yyyyMMdd-HHmmss
|
||||
|
||||
# Create paths and list them
|
||||
$projectPath = (Get-Item $project.Properties.Item("FullPath").Value).FullName
|
||||
Write-Host "projectPath:" "${projectPath}"
|
||||
$backupPath = Join-Path $projectPath "App_Data\NuGetBackup\$dateTime"
|
||||
Write-Host "backupPath:" "${backupPath}"
|
||||
$copyLogsPath = Join-Path $backupPath "CopyLogs"
|
||||
Write-Host "copyLogsPath:" "${copyLogsPath}"
|
||||
$umbracoBinFolder = Join-Path $projectPath "bin"
|
||||
Write-Host "umbracoBinFolder:" "${umbracoBinFolder}"
|
||||
|
||||
# Create backup folder and logs folder if it doesn't exist yet
|
||||
New-Item -ItemType Directory -Force -Path $backupPath
|
||||
New-Item -ItemType Directory -Force -Path $copyLogsPath
|
||||
|
||||
# After backing up, remove all umbraco dlls from bin folder in case dll files are included in the VS project
|
||||
# See: http://issues.umbraco.org/issue/U4-4930
|
||||
|
||||
if(Test-Path $umbracoBinFolder) {
|
||||
$umbracoBinBackupPath = Join-Path $backupPath "bin"
|
||||
|
||||
New-Item -ItemType Directory -Force -Path $umbracoBinBackupPath
|
||||
|
||||
robocopy $umbracoBinFolder $umbracoBinBackupPath /e /LOG:$copyLogsPath\UmbracoBinBackup.log
|
||||
|
||||
# Delete files Umbraco ships with
|
||||
if(Test-Path $umbracoBinFolder\Microsoft.ApplicationBlocks.Data.dll) { Remove-Item $umbracoBinFolder\Microsoft.ApplicationBlocks.Data.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\System.Data.SqlServerCe.dll) { Remove-Item $umbracoBinFolder\System.Data.SqlServerCe.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\System.Data.SqlServerCe.Entity.dll) { Remove-Item $umbracoBinFolder\System.Data.SqlServerCe.Entity.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\Umbraco.Web.dll) { Remove-Item $umbracoBinFolder\Umbraco.Web.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\Umbraco.Core.dll) { Remove-Item $umbracoBinFolder\Umbraco.Core.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\Umbraco.ModelsBuilder.dll) { Remove-Item $umbracoBinFolder\Umbraco.ModelsBuilder.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\Umbraco.ModelsBuilder.AspNet.dll) { Remove-Item $umbracoBinFolder\Umbraco.ModelsBuilder.AspNet.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\Umbraco.Web.UI.dll) { Remove-Item $umbracoBinFolder\Umbraco.Web.UI.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\Umbraco.Examine.dll) { Remove-Item $umbracoBinFolder\Umbraco.Examine.dll -Force -Confirm:$false }
|
||||
|
||||
# Delete files Umbraco depends upon
|
||||
$amd64Folder = Join-Path $umbracoBinFolder "amd64"
|
||||
if(Test-Path $amd64Folder) { Remove-Item $amd64Folder -Force -Recurse -Confirm:$false }
|
||||
$x86Folder = Join-Path $umbracoBinFolder "x86"
|
||||
if(Test-Path $x86Folder) { Remove-Item $x86Folder -Force -Recurse -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\AutoMapper.dll) { Remove-Item $umbracoBinFolder\AutoMapper.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\AutoMapper.Net4.dll) { Remove-Item $umbracoBinFolder\AutoMapper.Net4.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\ClientDependency.Core.dll) { Remove-Item $umbracoBinFolder\ClientDependency.Core.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\ClientDependency.Core.Mvc.dll) { Remove-Item $umbracoBinFolder\ClientDependency.Core.Mvc.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\CookComputing.XmlRpcV2.dll) { Remove-Item $umbracoBinFolder\CookComputing.XmlRpcV2.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\Examine.dll) { Remove-Item $umbracoBinFolder\Examine.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\HtmlAgilityPack.dll) { Remove-Item $umbracoBinFolder\HtmlAgilityPack.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\ICSharpCode.SharpZipLib.dll) { Remove-Item $umbracoBinFolder\ICSharpCode.SharpZipLib.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\ImageProcessor.dll) { Remove-Item $umbracoBinFolder\ImageProcessor.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\ImageProcessor.Web.dll) { Remove-Item $umbracoBinFolder\ImageProcessor.Web.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\Lucene.Net.dll) { Remove-Item $umbracoBinFolder\Lucene.Net.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\Microsoft.IO.RecyclableMemoryStream.dll) { Remove-Item $umbracoBinFolder\Microsoft.IO.RecyclableMemoryStream.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\Microsoft.AspNet.Identity.Core.dll) { Remove-Item $umbracoBinFolder\Microsoft.AspNet.Identity.Core.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\Microsoft.AspNet.Identity.Owin.dll) { Remove-Item $umbracoBinFolder\Microsoft.AspNet.Identity.Owin.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\Microsoft.CodeAnalysis.CSharp.dll) { Remove-Item $umbracoBinFolder\Microsoft.CodeAnalysis.CSharp.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\Microsoft.CodeAnalysis.dll) { Remove-Item $umbracoBinFolder\Microsoft.CodeAnalysis.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\Microsoft.Owin.dll) { Remove-Item $umbracoBinFolder\Microsoft.Owin.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\Microsoft.Owin.Host.SystemWeb.dll) { Remove-Item $umbracoBinFolder\Microsoft.Owin.Host.SystemWeb.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\Microsoft.Owin.Security.dll) { Remove-Item $umbracoBinFolder\Microsoft.Owin.Security.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\Microsoft.Owin.Security.Cookies.dll) { Remove-Item $umbracoBinFolder\Microsoft.Owin.Security.Cookies.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\Microsoft.Owin.Security.OAuth.dll) { Remove-Item $umbracoBinFolder\Microsoft.Owin.Security.OAuth.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\Microsoft.Web.Infrastructure.dll) { Remove-Item $umbracoBinFolder\Microsoft.Web.Infrastructure.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\Microsoft.Web.Helpers.dll) { Remove-Item $umbracoBinFolder\Microsoft.Web.Helpers.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\Microsoft.Web.Mvc.FixedDisplayModes.dll) { Remove-Item $umbracoBinFolder\Microsoft.Web.Mvc.FixedDisplayModes.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\MiniProfiler.dll) { Remove-Item $umbracoBinFolder\MiniProfiler.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\Newtonsoft.Json.dll) { Remove-Item $umbracoBinFolder\Newtonsoft.Json.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\Owin.dll) { Remove-Item $umbracoBinFolder\Owin.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\Semver.dll) { Remove-Item $umbracoBinFolder\Semver.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\System.Collections.Immutable.dll) { Remove-Item $umbracoBinFolder\System.Collections.Immutable.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\System.Reflection.Metadata.dll) { Remove-Item $umbracoBinFolder\System.Reflection.Metadata.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\System.Net.Http.Extensions.dll) { Remove-Item $umbracoBinFolder\System.Net.Http.Extensions.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\System.Net.Http.Formatting.dll) { Remove-Item $umbracoBinFolder\System.Net.Http.Formatting.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\System.Net.Http.Primitives.dll) { Remove-Item $umbracoBinFolder\System.Net.Http.Primitives.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\System.Web.Helpers.dll) { Remove-Item $umbracoBinFolder\System.Web.Helpers.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\System.Web.Http.dll) { Remove-Item $umbracoBinFolder\System.Web.Http.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\System.Web.Http.WebHost.dll) { Remove-Item $umbracoBinFolder\System.Web.Http.WebHost.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\System.Web.Mvc.dll) { Remove-Item $umbracoBinFolder\System.Web.Mvc.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\System.Web.Razor.dll) { Remove-Item $umbracoBinFolder\System.Web.Razor.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\System.Web.WebPages.dll) { Remove-Item $umbracoBinFolder\System.Web.WebPages.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\System.Web.WebPages.Deployment.dll) { Remove-Item $umbracoBinFolder\System.Web.WebPages.Deployment.dll -Force -Confirm:$false }
|
||||
if(Test-Path $umbracoBinFolder\System.Web.WebPages.Razor.dll) { Remove-Item $umbracoBinFolder\System.Web.WebPages.Razor.dll -Force -Confirm:$false }
|
||||
}
|
||||
}
|
||||
@@ -11,37 +11,15 @@ if ($project) {
|
||||
# Create paths and list them
|
||||
$projectPath = (Get-Item $project.Properties.Item("FullPath").Value).FullName
|
||||
Write-Host "projectPath:" "${projectPath}"
|
||||
$backupPath = Join-Path $projectPath "App_Data\NuGetBackup\$dateTime"
|
||||
Write-Host "backupPath:" "${backupPath}"
|
||||
$copyLogsPath = Join-Path $backupPath "CopyLogs"
|
||||
Write-Host "copyLogsPath:" "${copyLogsPath}"
|
||||
$webConfigSource = Join-Path $projectPath "Web.config"
|
||||
Write-Host "webConfigSource:" "${webConfigSource}"
|
||||
$configFolder = Join-Path $projectPath "Config"
|
||||
Write-Host "configFolder:" "${configFolder}"
|
||||
|
||||
# Create backup folder and logs folder if it doesn't exist yet
|
||||
New-Item -ItemType Directory -Force -Path $backupPath
|
||||
New-Item -ItemType Directory -Force -Path $copyLogsPath
|
||||
|
||||
# Create a backup of original web.config
|
||||
Copy-Item $webConfigSource $backupPath -Force
|
||||
|
||||
# Backup config files folder
|
||||
if(Test-Path $configFolder) {
|
||||
$umbracoBackupPath = Join-Path $backupPath "Config"
|
||||
New-Item -ItemType Directory -Force -Path $umbracoBackupPath
|
||||
|
||||
robocopy $configFolder $umbracoBackupPath /e /LOG:$copyLogsPath\ConfigBackup.log
|
||||
}
|
||||
|
||||
# Copy umbraco and umbraco_files from package to project folder
|
||||
$umbracoFolder = Join-Path $projectPath "Umbraco"
|
||||
New-Item -ItemType Directory -Force -Path $umbracoFolder
|
||||
$umbracoFolderSource = Join-Path $installPath "UmbracoFiles\Umbraco"
|
||||
$umbracoBackupPath = Join-Path $backupPath "Umbraco"
|
||||
New-Item -ItemType Directory -Force -Path $umbracoBackupPath
|
||||
robocopy $umbracoFolder $umbracoBackupPath /e /LOG:$copyLogsPath\UmbracoBackup.log
|
||||
robocopy $umbracoFolderSource $umbracoFolder /is /it /e /xf UI.xml /LOG:$copyLogsPath\UmbracoCopy.log
|
||||
|
||||
$copyWebconfig = $true
|
||||
@@ -100,11 +78,6 @@ if ($project) {
|
||||
}
|
||||
}
|
||||
|
||||
$installFolder = Join-Path $projectPath "Install"
|
||||
if(Test-Path $installFolder) {
|
||||
Remove-Item $installFolder -Force -Recurse -Confirm:$false
|
||||
}
|
||||
|
||||
# Open appropriate readme
|
||||
if($copyWebconfig -eq $true)
|
||||
{
|
||||
|
||||
+2
-2
@@ -18,5 +18,5 @@ using System.Resources;
|
||||
[assembly: AssemblyVersion("8.0.0")]
|
||||
|
||||
// these are FYI and changed automatically
|
||||
[assembly: AssemblyFileVersion("8.0.0")]
|
||||
[assembly: AssemblyInformationalVersion("8.0.0")]
|
||||
[assembly: AssemblyFileVersion("8.0.1")]
|
||||
[assembly: AssemblyInformationalVersion("8.0.1")]
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace Umbraco.Core.Composing
|
||||
|
||||
protected override IComponent CreateItem(IFactory factory, Type itemType)
|
||||
{
|
||||
using (_logger.DebugDuration<Composers>($"Creating {itemType.FullName}.", $"Created {itemType.FullName}.", thresholdMilliseconds: LogThresholdMilliseconds))
|
||||
using (_logger.DebugDuration<ComponentCollectionBuilder>($"Creating {itemType.FullName}.", $"Created {itemType.FullName}.", thresholdMilliseconds: LogThresholdMilliseconds))
|
||||
{
|
||||
return base.CreateItem(factory, itemType);
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
/// <summary>
|
||||
/// Compose.
|
||||
/// </summary>
|
||||
/// <param name="composition"></param>
|
||||
void Compose(Composition composition);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,10 +4,8 @@
|
||||
/// Represents a core <see cref="IComposer"/>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>All core composers are required by (compose before) all user composers,
|
||||
/// and require (compose after) all runtime composers.</para>
|
||||
/// <para>Core composers compose after the initial composer, and before user composers.</para>
|
||||
/// </remarks>
|
||||
[ComposeAfter(typeof(IRuntimeComposer))]
|
||||
public interface ICoreComposer : IComposer
|
||||
{ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
namespace Umbraco.Core.Composing
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a runtime <see cref="IComposer"/>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>All runtime composers are required by (compose before) all core composers</para>
|
||||
/// </remarks>
|
||||
public interface IRuntimeComposer : IComposer
|
||||
{ }
|
||||
}
|
||||
@@ -4,9 +4,9 @@
|
||||
/// Represents a user <see cref="IComposer"/>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>All user composers require (compose after) all core composers.</para>
|
||||
/// <para>User composers compose after core composers, and before the final composer.</para>
|
||||
/// </remarks>
|
||||
[ComposeAfter(typeof(ICoreComposer))]
|
||||
public interface IUserComposer : IComposer
|
||||
{ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Umbraco.Core.Composing
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides a base class for collections of types.
|
||||
/// </summary>
|
||||
public abstract class TypeCollectionBuilderBase<TCollection, TConstraint> : ICollectionBuilder<TCollection, Type>
|
||||
where TCollection : class, IBuilderCollection<Type>
|
||||
{
|
||||
private readonly HashSet<Type> _types = new HashSet<Type>();
|
||||
|
||||
private Type Validate(Type type, string action)
|
||||
{
|
||||
if (!typeof(TConstraint).IsAssignableFrom(type))
|
||||
throw new InvalidOperationException($"Cannot {action} type {type.FullName} as it does not inherit from/implement {typeof(TConstraint).FullName}.");
|
||||
return type;
|
||||
}
|
||||
|
||||
public void Add(Type type) => _types.Add(Validate(type, "add"));
|
||||
|
||||
public void Add<T>() => Add(typeof(T));
|
||||
|
||||
public void Add(IEnumerable<Type> types)
|
||||
{
|
||||
foreach (var type in types) Add(type);
|
||||
}
|
||||
|
||||
public void Remove(Type type) => _types.Remove(Validate(type, "remove"));
|
||||
|
||||
public void Remove<T>() => Remove(typeof(T));
|
||||
|
||||
public TCollection CreateCollection(IFactory factory)
|
||||
{
|
||||
return factory.CreateInstance<TCollection>(_types);
|
||||
}
|
||||
|
||||
public void RegisterWith(IRegister register)
|
||||
{
|
||||
register.Register(CreateCollection, Lifetime.Singleton);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ using Umbraco.Core.Configuration;
|
||||
using Umbraco.Core.Migrations.Upgrade.V_7_12_0;
|
||||
using Umbraco.Core.Migrations.Upgrade.V_7_14_0;
|
||||
using Umbraco.Core.Migrations.Upgrade.V_8_0_0;
|
||||
using Umbraco.Core.Migrations.Upgrade.V_8_0_1;
|
||||
|
||||
namespace Umbraco.Core.Migrations.Upgrade
|
||||
{
|
||||
@@ -137,6 +138,8 @@ namespace Umbraco.Core.Migrations.Upgrade
|
||||
|
||||
To<RenameLabelAndRichTextPropertyEditorAliases>("{E0CBE54D-A84F-4A8F-9B13-900945FD7ED9}");
|
||||
To<MergeDateAndDateTimePropertyEditor>("{78BAF571-90D0-4D28-8175-EF96316DA789}");
|
||||
To<ChangeNuCacheJsonFormat>("{80C0A0CB-0DD5-4573-B000-C4B7C313C70D}");
|
||||
|
||||
//FINAL
|
||||
|
||||
|
||||
@@ -167,7 +170,7 @@ namespace Umbraco.Core.Migrations.Upgrade
|
||||
From("{init-7.12.4}").To("{init-7.10.0}"); // same as 7.12.0
|
||||
From("{init-7.13.0}").To("{init-7.10.0}"); // same as 7.12.0
|
||||
From("{init-7.13.1}").To("{init-7.10.0}"); // same as 7.12.0
|
||||
|
||||
|
||||
// 7.14.0 has migrations, handle it...
|
||||
// clone going from 7.10 to 1350617A (the last one before we started to merge 7.12 migrations), then
|
||||
// clone going from CF51B39B (after 7.12 migrations) to 0009109C (the last one before we started to merge 7.12 migrations),
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
using Umbraco.Core.Migrations.PostMigrations;
|
||||
|
||||
namespace Umbraco.Core.Migrations.Upgrade.V_8_0_1
|
||||
{
|
||||
public class ChangeNuCacheJsonFormat : MigrationBase
|
||||
{
|
||||
public ChangeNuCacheJsonFormat(IMigrationContext context) : base(context)
|
||||
{ }
|
||||
|
||||
public override void Migrate()
|
||||
{
|
||||
// nothing - just adding the post-migration
|
||||
Context.AddPostMigration<RebuildPublishedSnapshot>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,14 +11,14 @@ namespace Umbraco.Core.Models.PublishedContent
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="PublishedCultureInfo"/> class.
|
||||
/// </summary>
|
||||
public PublishedCultureInfo(string culture, string name, DateTime date)
|
||||
public PublishedCultureInfo(string culture, string name, string urlSegment, DateTime date)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(culture)) throw new ArgumentNullOrEmptyException(nameof(culture));
|
||||
if (string.IsNullOrWhiteSpace(name)) throw new ArgumentNullOrEmptyException(nameof(name));
|
||||
|
||||
Culture = culture;
|
||||
Name = name;
|
||||
UrlSegment = name.ToUrlSegment(culture);
|
||||
UrlSegment = urlSegment;
|
||||
Date = date;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,6 +36,10 @@ namespace Umbraco.Core.PropertyEditors.ValueConverters
|
||||
if (source is int)
|
||||
return (int)source == 1;
|
||||
|
||||
// this is required for correct true/false handling in nested content elements
|
||||
if (source is long)
|
||||
return (long)source == 1;
|
||||
|
||||
if (source is bool)
|
||||
return (bool)source;
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using Umbraco.Core.Models.PublishedContent;
|
||||
|
||||
namespace Umbraco.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides extension methods for <see cref="IPublishedModelFactory"/>.
|
||||
/// </summary>
|
||||
public static class PublishedModelFactoryExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Executes an action with a safe live factory/
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>If the factory is a live factory, ensures it is refreshed and locked while executing the action.</para>
|
||||
/// </remarks>
|
||||
public static void WithSafeLiveFactory(this IPublishedModelFactory factory, Action action)
|
||||
{
|
||||
if (factory is ILivePublishedModelFactory liveFactory)
|
||||
{
|
||||
lock (liveFactory.SyncRoot)
|
||||
{
|
||||
liveFactory.Refresh();
|
||||
action();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
action();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -5,11 +5,11 @@ using Umbraco.Core.IO;
|
||||
|
||||
namespace Umbraco.Core.Runtime
|
||||
{
|
||||
public class CoreRuntimeComponent : IComponent
|
||||
public class CoreInitialComponent : IComponent
|
||||
{
|
||||
private readonly IEnumerable<Profile> _mapperProfiles;
|
||||
|
||||
public CoreRuntimeComponent(IEnumerable<Profile> mapperProfiles)
|
||||
public CoreInitialComponent(IEnumerable<Profile> mapperProfiles)
|
||||
{
|
||||
_mapperProfiles = mapperProfiles;
|
||||
}
|
||||
+3
-1
@@ -24,7 +24,9 @@ using IntegerValidator = Umbraco.Core.PropertyEditors.Validators.IntegerValidato
|
||||
|
||||
namespace Umbraco.Core.Runtime
|
||||
{
|
||||
public class CoreRuntimeComposer : ComponentComposer<CoreRuntimeComponent>, IRuntimeComposer
|
||||
// core's initial composer composes before all core composers
|
||||
[ComposeBefore(typeof(ICoreComposer))]
|
||||
public class CoreInitialComposer : ComponentComposer<CoreInitialComponent>
|
||||
{
|
||||
public override void Compose(Composition composition)
|
||||
{
|
||||
@@ -168,7 +168,7 @@ namespace Umbraco.Core.Runtime
|
||||
_state.BootFailedException = bfe;
|
||||
}
|
||||
|
||||
timer.Fail(exception: bfe); // be sure to log the exception - even if we repeat ourselves
|
||||
timer?.Fail(exception: bfe); // be sure to log the exception - even if we repeat ourselves
|
||||
|
||||
// if something goes wrong above, we may end up with no factory
|
||||
// meaning nothing can get the runtime state, etc - so let's try
|
||||
@@ -242,7 +242,7 @@ namespace Umbraco.Core.Runtime
|
||||
}
|
||||
catch
|
||||
{
|
||||
timer.Fail();
|
||||
timer?.Fail();
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,7 +168,6 @@
|
||||
<Compile Include="Composing\EnableComposerAttribute.cs" />
|
||||
<Compile Include="Composing\IComposer.cs" />
|
||||
<Compile Include="Composing\ICoreComposer.cs" />
|
||||
<Compile Include="Composing\IRuntimeComposer.cs" />
|
||||
<Compile Include="Composing\IComponent.cs" />
|
||||
<Compile Include="Composing\IUserComposer.cs" />
|
||||
<Compile Include="Compose\ManifestWatcherComposer.cs" />
|
||||
@@ -209,10 +208,13 @@
|
||||
<Compile Include="Composing\TypeLoader.cs" />
|
||||
<Compile Include="IO\MediaPathSchemes\UniqueMediaPathScheme.cs" />
|
||||
<Compile Include="Migrations\Upgrade\V_8_0_0\MergeDateAndDateTimePropertyEditor.cs" />
|
||||
<Compile Include="Migrations\Upgrade\V_8_0_1\ChangeNuCacheJsonFormat.cs" />
|
||||
<Compile Include="Models\PublishedContent\ILivePublishedModelFactory.cs" />
|
||||
<Compile Include="PropertyEditors\DateTimeConfiguration.cs" />
|
||||
<Compile Include="Migrations\Upgrade\V_8_0_0\RenameLabelAndRichTextPropertyEditorAliases.cs" />
|
||||
<Compile Include="PublishedModelFactoryExtensions.cs" />
|
||||
<Compile Include="Services\PropertyValidationService.cs" />
|
||||
<Compile Include="Composing\TypeCollectionBuilderBase.cs" />
|
||||
<Compile Include="TypeLoaderExtensions.cs" />
|
||||
<Compile Include="Composing\WeightAttribute.cs" />
|
||||
<Compile Include="Composing\WeightedCollectionBuilderBase.cs" />
|
||||
@@ -529,7 +531,7 @@
|
||||
<Compile Include="RuntimeLevelReason.cs" />
|
||||
<Compile Include="RuntimeOptions.cs" />
|
||||
<Compile Include="Runtime\CoreRuntime.cs" />
|
||||
<Compile Include="Runtime\CoreRuntimeComponent.cs" />
|
||||
<Compile Include="Runtime\CoreInitialComponent.cs" />
|
||||
<Compile Include="CustomBooleanTypeConverter.cs" />
|
||||
<Compile Include="Migrations\Expressions\Common\ExecutableBuilder.cs" />
|
||||
<Compile Include="Migrations\Expressions\Common\IExecutableBuilder.cs" />
|
||||
@@ -1310,7 +1312,7 @@
|
||||
<Compile Include="ReflectionUtilities.cs" />
|
||||
<Compile Include="RuntimeLevel.cs" />
|
||||
<Compile Include="RuntimeState.cs" />
|
||||
<Compile Include="Runtime\CoreRuntimeComposer.cs" />
|
||||
<Compile Include="Runtime\CoreInitialComposer.cs" />
|
||||
<Compile Include="SafeCallContext.cs" />
|
||||
<Compile Include="Scoping\IInstanceIdentifiable.cs" />
|
||||
<Compile Include="Scoping\IScope.cs" />
|
||||
|
||||
@@ -158,7 +158,7 @@ namespace Umbraco.Tests.Cache
|
||||
new TestDefaultCultureAccessor(),
|
||||
TestObjects.GetUmbracoSettings(),
|
||||
TestObjects.GetGlobalSettings(),
|
||||
Enumerable.Empty<IUrlProvider>(),
|
||||
new UrlProviderCollection(Enumerable.Empty<IUrlProvider>()),
|
||||
Mock.Of<IUserService>());
|
||||
|
||||
// just assert it does not throw
|
||||
|
||||
@@ -15,6 +15,7 @@ using Umbraco.Core.PropertyEditors;
|
||||
using Umbraco.Core.Scoping;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Core.Services.Changes;
|
||||
using Umbraco.Core.Strings;
|
||||
using Umbraco.Tests.TestHelpers;
|
||||
using Umbraco.Tests.Testing.Objects;
|
||||
using Umbraco.Tests.Testing.Objects.Accessors;
|
||||
@@ -180,8 +181,9 @@ namespace Umbraco.Tests.PublishedContent
|
||||
dataSource,
|
||||
globalSettings,
|
||||
new SiteDomainHelper(),
|
||||
contentTypeServiceBaseFactory,
|
||||
Mock.Of<IEntityXmlSerializer>());
|
||||
Mock.Of<IEntityXmlSerializer>(),
|
||||
Mock.Of<IPublishedModelFactory>(),
|
||||
new UrlSegmentProviderCollection(new[] { new DefaultUrlSegmentProvider() }));
|
||||
|
||||
// invariant is the current default
|
||||
_variationAccesor.VariationContext = new VariationContext();
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace Umbraco.Tests.Routing
|
||||
{
|
||||
base.SetUp();
|
||||
|
||||
WebRuntimeComponent.CreateRoutes(
|
||||
WebFinalComponent.CreateRoutes(
|
||||
new TestUmbracoContextAccessor(),
|
||||
TestObjects.GetGlobalSettings(),
|
||||
new SurfaceControllerTypeCollection(Enumerable.Empty<Type>()),
|
||||
|
||||
@@ -81,7 +81,7 @@ namespace Umbraco.Tests.Runtimes
|
||||
|
||||
var composerTypes = typeLoader.GetTypes<IComposer>() // all of them
|
||||
.Where(x => !x.FullName.StartsWith("Umbraco.Tests.")) // exclude test components
|
||||
.Where(x => x != typeof(WebRuntimeComposer)); // exclude web runtime
|
||||
.Where(x => x != typeof(WebInitialComposer)); // exclude web runtime
|
||||
var composers = new Composers(composition, composerTypes, profilingLogger);
|
||||
composers.Compose();
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace Umbraco.Tests.Runtimes
|
||||
new PluginViewEngine()
|
||||
};
|
||||
|
||||
WebRuntimeComponent.WrapViewEngines(engines);
|
||||
WebInitialComponent.WrapViewEngines(engines);
|
||||
|
||||
Assert.That(engines.Count, Is.EqualTo(2));
|
||||
Assert.That(engines[0], Is.InstanceOf<ProfilingViewEngine>());
|
||||
@@ -34,7 +34,7 @@ namespace Umbraco.Tests.Runtimes
|
||||
new PluginViewEngine()
|
||||
};
|
||||
|
||||
WebRuntimeComponent.WrapViewEngines(engines);
|
||||
WebInitialComponent.WrapViewEngines(engines);
|
||||
|
||||
Assert.That(engines.Count, Is.EqualTo(2));
|
||||
Assert.That(((ProfilingViewEngine)engines[0]).Inner, Is.InstanceOf<RenderViewEngine>());
|
||||
@@ -50,7 +50,7 @@ namespace Umbraco.Tests.Runtimes
|
||||
profiledEngine
|
||||
};
|
||||
|
||||
WebRuntimeComponent.WrapViewEngines(engines);
|
||||
WebInitialComponent.WrapViewEngines(engines);
|
||||
|
||||
Assert.That(engines[0], Is.SameAs(profiledEngine));
|
||||
}
|
||||
@@ -58,7 +58,7 @@ namespace Umbraco.Tests.Runtimes
|
||||
[Test]
|
||||
public void WrapViewEngines_CollectionIsNull_DoesNotThrow()
|
||||
{
|
||||
Assert.DoesNotThrow(() => WebRuntimeComponent.WrapViewEngines(null));
|
||||
Assert.DoesNotThrow(() => WebInitialComponent.WrapViewEngines(null));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ using Umbraco.Core.Persistence.Repositories;
|
||||
using Umbraco.Core.PropertyEditors;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Core.Services.Implement;
|
||||
using Umbraco.Core.Strings;
|
||||
using Umbraco.Core.Sync;
|
||||
using Umbraco.Tests.TestHelpers;
|
||||
using Umbraco.Tests.Testing;
|
||||
@@ -97,8 +98,10 @@ namespace Umbraco.Tests.Scoping
|
||||
documentRepository, mediaRepository, memberRepository,
|
||||
DefaultCultureAccessor,
|
||||
new DatabaseDataSource(),
|
||||
Factory.GetInstance<IGlobalSettings>(), new SiteDomainHelper(), contentTypeServiceBaseFactory,
|
||||
Factory.GetInstance<IEntityXmlSerializer>());
|
||||
Factory.GetInstance<IGlobalSettings>(), new SiteDomainHelper(),
|
||||
Factory.GetInstance<IEntityXmlSerializer>(),
|
||||
Mock.Of<IPublishedModelFactory>(),
|
||||
new UrlSegmentProviderCollection(new[] { new DefaultUrlSegmentProvider() }));
|
||||
}
|
||||
|
||||
protected UmbracoContext GetUmbracoContextNu(string url, int templateId = 1234, RouteData routeData = null, bool setSingleton = false, IUmbracoSettingsSection umbracoSettings = null, IEnumerable<IUrlProvider> urlProviders = null)
|
||||
|
||||
@@ -15,6 +15,7 @@ using Umbraco.Core.Persistence.Dtos;
|
||||
using Umbraco.Core.Persistence.Repositories;
|
||||
using Umbraco.Core.PropertyEditors;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Core.Strings;
|
||||
using Umbraco.Core.Sync;
|
||||
using Umbraco.Tests.Testing;
|
||||
using Umbraco.Web;
|
||||
@@ -70,8 +71,10 @@ namespace Umbraco.Tests.Services
|
||||
documentRepository, mediaRepository, memberRepository,
|
||||
DefaultCultureAccessor,
|
||||
new DatabaseDataSource(),
|
||||
Factory.GetInstance<IGlobalSettings>(), new SiteDomainHelper(), contentTypeServiceBaseFactory,
|
||||
Factory.GetInstance<IEntityXmlSerializer>());
|
||||
Factory.GetInstance<IGlobalSettings>(), new SiteDomainHelper(),
|
||||
Factory.GetInstance<IEntityXmlSerializer>(),
|
||||
Mock.Of<IPublishedModelFactory>(),
|
||||
new UrlSegmentProviderCollection(new[] { new DefaultUrlSegmentProvider() }));
|
||||
}
|
||||
|
||||
public class LocalServerMessenger : ServerMessengerBase
|
||||
|
||||
@@ -116,7 +116,7 @@ namespace Umbraco.Tests.TestHelpers
|
||||
|
||||
var umbracoSettings = GetUmbracoSettings();
|
||||
var globalSettings = GetGlobalSettings();
|
||||
var urlProviders = Enumerable.Empty<IUrlProvider>();
|
||||
var urlProviders = new UrlProviderCollection(Enumerable.Empty<IUrlProvider>());
|
||||
|
||||
if (accessor == null) accessor = new TestUmbracoContextAccessor();
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace Umbraco.Tests.Web.Mvc
|
||||
new TestDefaultCultureAccessor(),
|
||||
TestObjects.GetUmbracoSettings(),
|
||||
globalSettings,
|
||||
Enumerable.Empty<IUrlProvider>(),
|
||||
new UrlProviderCollection(Enumerable.Empty<IUrlProvider>()),
|
||||
Mock.Of<IUserService>());
|
||||
|
||||
var umbracoContextReference = umbracoContextFactory.EnsureUmbracoContext(Mock.Of<HttpContextBase>());
|
||||
@@ -100,7 +100,7 @@ namespace Umbraco.Tests.Web.Mvc
|
||||
new TestDefaultCultureAccessor(),
|
||||
TestObjects.GetUmbracoSettings(),
|
||||
globalSettings,
|
||||
Enumerable.Empty<IUrlProvider>(),
|
||||
new UrlProviderCollection(Enumerable.Empty<IUrlProvider>()),
|
||||
Mock.Of<IUserService>());
|
||||
|
||||
var umbracoContextReference = umbracoContextFactory.EnsureUmbracoContext(Mock.Of<HttpContextBase>());
|
||||
@@ -129,7 +129,7 @@ namespace Umbraco.Tests.Web.Mvc
|
||||
new TestDefaultCultureAccessor(),
|
||||
TestObjects.GetUmbracoSettings(),
|
||||
globalSettings,
|
||||
Enumerable.Empty<IUrlProvider>(),
|
||||
new UrlProviderCollection(Enumerable.Empty<IUrlProvider>()),
|
||||
Mock.Of<IUserService>());
|
||||
|
||||
var umbracoContextReference = umbracoContextFactory.EnsureUmbracoContext(Mock.Of<HttpContextBase>());
|
||||
@@ -158,7 +158,7 @@ namespace Umbraco.Tests.Web.Mvc
|
||||
new TestDefaultCultureAccessor(),
|
||||
TestObjects.GetUmbracoSettings(),
|
||||
globalSettings,
|
||||
Enumerable.Empty<IUrlProvider>(),
|
||||
new UrlProviderCollection(Enumerable.Empty<IUrlProvider>()),
|
||||
Mock.Of<IUserService>());
|
||||
|
||||
var umbracoContextReference = umbracoContextFactory.EnsureUmbracoContext(Mock.Of<HttpContextBase>());
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace Umbraco.Tests.Web.Mvc
|
||||
new TestDefaultCultureAccessor(),
|
||||
TestObjects.GetUmbracoSettings(),
|
||||
globalSettings,
|
||||
Enumerable.Empty<IUrlProvider>(),
|
||||
new UrlProviderCollection(Enumerable.Empty<IUrlProvider>()),
|
||||
Mock.Of<IUserService>());
|
||||
|
||||
var umbracoContextReference = umbracoContextFactory.EnsureUmbracoContext(Mock.Of<HttpContextBase>());
|
||||
@@ -73,7 +73,7 @@ namespace Umbraco.Tests.Web.Mvc
|
||||
new TestDefaultCultureAccessor(),
|
||||
TestObjects.GetUmbracoSettings(),
|
||||
globalSettings,
|
||||
Enumerable.Empty<IUrlProvider>(),
|
||||
new UrlProviderCollection(Enumerable.Empty<IUrlProvider>()),
|
||||
Mock.Of<IUserService>());
|
||||
|
||||
var umbracoContextReference = umbracoContextFactory.EnsureUmbracoContext(Mock.Of<HttpContextBase>());
|
||||
@@ -103,7 +103,7 @@ namespace Umbraco.Tests.Web.Mvc
|
||||
new TestDefaultCultureAccessor(),
|
||||
Mock.Of<IUmbracoSettingsSection>(section => section.WebRouting == Mock.Of<IWebRoutingSection>(routingSection => routingSection.UrlProviderMode == "Auto")),
|
||||
globalSettings,
|
||||
Enumerable.Empty<IUrlProvider>(),
|
||||
new UrlProviderCollection(Enumerable.Empty<IUrlProvider>()),
|
||||
Mock.Of<IUserService>());
|
||||
|
||||
var umbracoContextReference = umbracoContextFactory.EnsureUmbracoContext(Mock.Of<HttpContextBase>());
|
||||
@@ -140,7 +140,7 @@ namespace Umbraco.Tests.Web.Mvc
|
||||
new TestDefaultCultureAccessor(),
|
||||
Mock.Of<IUmbracoSettingsSection>(section => section.WebRouting == webRoutingSettings),
|
||||
globalSettings,
|
||||
Enumerable.Empty<IUrlProvider>(),
|
||||
new UrlProviderCollection(Enumerable.Empty<IUrlProvider>()),
|
||||
Mock.Of<IUserService>());
|
||||
|
||||
var umbracoContextReference = umbracoContextFactory.EnsureUmbracoContext(Mock.Of<HttpContextBase>());
|
||||
|
||||
@@ -104,7 +104,7 @@ namespace Umbraco.Tests.Web
|
||||
new TestDefaultCultureAccessor(),
|
||||
Mock.Of<IUmbracoSettingsSection>(section => section.WebRouting == Mock.Of<IWebRoutingSection>(routingSection => routingSection.UrlProviderMode == "Auto")),
|
||||
globalSettings,
|
||||
new[] { testUrlProvider.Object },
|
||||
new UrlProviderCollection(new[] { testUrlProvider.Object }),
|
||||
Mock.Of<IUserService>());
|
||||
|
||||
using (var reference = umbracoContextFactory.EnsureUmbracoContext(Mock.Of<HttpContextBase>()))
|
||||
|
||||
+1
-1
@@ -344,8 +344,8 @@
|
||||
loadAuditTrail(true);
|
||||
loadRedirectUrls();
|
||||
setNodePublishStatus();
|
||||
updateCurrentUrls();
|
||||
}
|
||||
updateCurrentUrls();
|
||||
});
|
||||
|
||||
//ensure to unregister from all events!
|
||||
|
||||
+4
-2
@@ -15,10 +15,12 @@ function umbFileUpload() {
|
||||
el.on('change', function (event) {
|
||||
var files = event.target.files;
|
||||
//emit event upward
|
||||
scope.$emit("filesSelected", { files: files });
|
||||
scope.$emit("filesSelected", { files: files });
|
||||
//clear the element value - this allows us to pick the same file again and again
|
||||
el.val('');
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
angular.module('umbraco.directives').directive("umbFileUpload", umbFileUpload);
|
||||
angular.module('umbraco.directives').directive("umbFileUpload", umbFileUpload);
|
||||
|
||||
@@ -166,7 +166,9 @@ body.touch .umb-tree {
|
||||
}
|
||||
|
||||
.umb-tree .umb-tree-node-checked > .umb-tree-item__inner > i[class^="icon-"],
|
||||
.umb-tree .umb-tree-node-checked > .umb-tree-item__inner > i[class*=" icon-"] {
|
||||
.umb-tree .umb-tree-node-checked > .umb-tree-item__inner > i[class*=" icon-"],
|
||||
.umb-tree .umb-tree-node-checked .umb-search-group-item-name > i[class^="icon-"],
|
||||
.umb-tree .umb-tree-node-checked .umb-search-group-item-name > i[class*=" icon-"] {
|
||||
font-family: 'icomoon' !important;
|
||||
color: @green !important;
|
||||
|
||||
|
||||
@@ -151,14 +151,14 @@ input.umb-table__input {
|
||||
|
||||
// Show checkmark when checked, hide file icon
|
||||
.umb-table-row--selected {
|
||||
/*
|
||||
|
||||
.umb-table-body__fileicon {
|
||||
display: none;
|
||||
}
|
||||
.umb-table-body__checkicon {
|
||||
display: inline-block;
|
||||
}
|
||||
*/
|
||||
|
||||
&::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
|
||||
@@ -113,7 +113,12 @@ var app = angular.module("umbraco.preview", ['umbraco.resources', 'umbraco.servi
|
||||
$scope.exitPreview = function () {
|
||||
|
||||
var culture = $location.search().culture || getParameterByName("culture");
|
||||
var relativeUrl = "/" + $scope.pageId +'?culture='+ culture;
|
||||
var relativeUrl = "/" + $scope.pageId;
|
||||
|
||||
if(culture){
|
||||
relativeUrl +='?culture='+ culture;
|
||||
}
|
||||
|
||||
window.top.location.href = "../preview/end?redir=" + encodeURIComponent(relativeUrl);
|
||||
};
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
// method to select a search result
|
||||
function selectResult(evt, result) {
|
||||
result.selected = result.selected === true ? false : true;
|
||||
nodeSelectHandler(evt, { event: evt, node: result });
|
||||
nodeSelectHandler({ event: evt, node: result });
|
||||
}
|
||||
|
||||
//callback when there are search results
|
||||
@@ -96,7 +96,7 @@
|
||||
// Mini list view
|
||||
$scope.selectListViewNode = function (node) {
|
||||
node.selected = node.selected === true ? false : true;
|
||||
nodeSelectHandler({}, { node: node });
|
||||
nodeSelectHandler({ node: node });
|
||||
};
|
||||
|
||||
$scope.closeMiniListView = function () {
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
// method to select a search result
|
||||
function selectResult(evt, result) {
|
||||
result.selected = result.selected === true ? false : true;
|
||||
nodeSelectHandler(evt, { event: evt, node: result });
|
||||
nodeSelectHandler({ event: evt, node: result });
|
||||
}
|
||||
|
||||
//callback when there are search results
|
||||
@@ -96,7 +96,7 @@
|
||||
// Mini list view
|
||||
$scope.selectListViewNode = function (node) {
|
||||
node.selected = node.selected === true ? false : true;
|
||||
nodeSelectHandler({}, { node: node });
|
||||
nodeSelectHandler({ node: node });
|
||||
};
|
||||
|
||||
$scope.closeMiniListView = function () {
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
ng-class="{'is-active': vm.item.active, '-has-error': vm.item.hasError}">
|
||||
<i class="icon {{ vm.item.icon }}"></i>
|
||||
<span class="umb-sub-views-nav-item-text">{{ vm.item.name }}</span>
|
||||
<div ng-show="item.badge" class="badge -type-{{vm.item.badge.type}}">{{vm.item.badge.count}}</div>
|
||||
<div ng-show="vm.item.badge" class="badge -type-{{vm.item.badge.type}}">{{vm.item.badge.count}}</div>
|
||||
</a>
|
||||
|
||||
<ul class="dropdown-menu umb-sub-views-nav-item__anchor_dropdown" ng-if="vm.item.anchors && vm.item.anchors.length > 1">
|
||||
|
||||
@@ -93,7 +93,7 @@ angular.module("umbraco").controller("Umbraco.Editors.Content.CopyController",
|
||||
// method to select a search result
|
||||
$scope.selectResult = function (evt, result) {
|
||||
result.selected = result.selected === true ? false : true;
|
||||
nodeSelectHandler(evt, { event: evt, node: result });
|
||||
nodeSelectHandler({ event: evt, node: result });
|
||||
};
|
||||
|
||||
//callback when there are search results
|
||||
|
||||
@@ -66,7 +66,7 @@ angular.module("umbraco").controller("Umbraco.Editors.Content.MoveController",
|
||||
// method to select a search result
|
||||
$scope.selectResult = function (evt, result) {
|
||||
result.selected = result.selected === true ? false : true;
|
||||
nodeSelectHandler(evt, { event: evt, node: result });
|
||||
nodeSelectHandler({ event: evt, node: result });
|
||||
};
|
||||
|
||||
//callback when there are search results
|
||||
@@ -124,7 +124,7 @@ angular.module("umbraco").controller("Umbraco.Editors.Content.MoveController",
|
||||
// Mini list view
|
||||
$scope.selectListViewNode = function (node) {
|
||||
node.selected = node.selected === true ? false : true;
|
||||
nodeSelectHandler({}, { node: node });
|
||||
nodeSelectHandler({ node: node });
|
||||
};
|
||||
|
||||
$scope.closeMiniListView = function () {
|
||||
|
||||
@@ -57,7 +57,7 @@ angular.module("umbraco").controller("Umbraco.Editors.Content.RestoreController"
|
||||
// method to select a search result
|
||||
$scope.selectResult = function (evt, result) {
|
||||
result.selected = result.selected === true ? false : true;
|
||||
nodeSelectHandler(evt, { event: evt, node: result });
|
||||
nodeSelectHandler({ event: evt, node: result });
|
||||
};
|
||||
|
||||
//callback when there are search results
|
||||
@@ -74,7 +74,7 @@ angular.module("umbraco").controller("Umbraco.Editors.Content.RestoreController"
|
||||
// Mini list view
|
||||
$scope.selectListViewNode = function (node) {
|
||||
node.selected = node.selected === true ? false : true;
|
||||
nodeSelectHandler({}, { node: node });
|
||||
nodeSelectHandler({ node: node });
|
||||
};
|
||||
|
||||
$scope.closeMiniListView = function () {
|
||||
|
||||
@@ -57,7 +57,7 @@ angular.module("umbraco").controller("Umbraco.Editors.Media.RestoreController",
|
||||
// method to select a search result
|
||||
$scope.selectResult = function (evt, result) {
|
||||
result.selected = result.selected === true ? false : true;
|
||||
nodeSelectHandler(evt, { event: evt, node: result });
|
||||
nodeSelectHandler({ event: evt, node: result });
|
||||
};
|
||||
|
||||
//callback when there are search results
|
||||
@@ -74,7 +74,7 @@ angular.module("umbraco").controller("Umbraco.Editors.Media.RestoreController",
|
||||
// Mini list view
|
||||
$scope.selectListViewNode = function (node) {
|
||||
node.selected = node.selected === true ? false : true;
|
||||
nodeSelectHandler({}, { node: node });
|
||||
nodeSelectHandler({ node: node });
|
||||
};
|
||||
|
||||
$scope.closeMiniListView = function () {
|
||||
|
||||
@@ -122,24 +122,25 @@ angular.module("umbraco")
|
||||
},
|
||||
|
||||
over: function (event, ui) {
|
||||
var area = $(event.target).scope().area;
|
||||
|
||||
var area = event.target.getScope_HackForSortable().area;
|
||||
var allowedEditors = area.allowed;
|
||||
|
||||
if (($.inArray(ui.item.scope().control.editor.alias, allowedEditors) < 0 && allowedEditors) ||
|
||||
|
||||
if (($.inArray(ui.item[0].getScope_HackForSortable().control.editor.alias, allowedEditors) < 0 && allowedEditors) ||
|
||||
(startingArea != area && area.maxItems != '' && area.maxItems > 0 && area.maxItems < area.controls.length + 1)) {
|
||||
|
||||
$scope.$apply(function () {
|
||||
$(event.target).scope().area.dropNotAllowed = true;
|
||||
event.target.getScope_HackForSortable().area.dropNotAllowed = true;
|
||||
});
|
||||
|
||||
ui.placeholder.hide();
|
||||
cancelMove = true;
|
||||
}
|
||||
else {
|
||||
if ($(event.target).scope().area.controls.length == 0){
|
||||
if (event.target.getScope_HackForSortable().area.controls.length == 0){
|
||||
|
||||
$scope.$apply(function () {
|
||||
$(event.target).scope().area.dropOnEmpty = true;
|
||||
event.target.getScope_HackForSortable().area.dropOnEmpty = true;
|
||||
});
|
||||
ui.placeholder.hide();
|
||||
} else {
|
||||
@@ -151,8 +152,9 @@ angular.module("umbraco")
|
||||
|
||||
out: function(event, ui) {
|
||||
$scope.$apply(function () {
|
||||
$(event.target).scope().area.dropNotAllowed = false;
|
||||
$(event.target).scope().area.dropOnEmpty = false;
|
||||
var dropArea = event.target.getScope_HackForSortable().area;
|
||||
dropArea.dropNotAllowed = false;
|
||||
dropArea.dropOnEmpty = false;
|
||||
});
|
||||
},
|
||||
|
||||
@@ -178,10 +180,9 @@ angular.module("umbraco")
|
||||
currentForm.$setDirty();
|
||||
},
|
||||
|
||||
start: function (e, ui) {
|
||||
|
||||
start: function (event, ui) {
|
||||
//Get the starting area for reference
|
||||
var area = $(e.target).scope().area;
|
||||
var area = event.target.getScope_HackForSortable().area;
|
||||
startingArea = area;
|
||||
|
||||
// fade out control when sorting
|
||||
@@ -207,7 +208,7 @@ angular.module("umbraco")
|
||||
});
|
||||
},
|
||||
|
||||
stop: function (e, ui) {
|
||||
stop: function (event, ui) {
|
||||
|
||||
// Fade in control when sorting stops
|
||||
ui.item[0].style.opacity = "1";
|
||||
@@ -236,7 +237,7 @@ angular.module("umbraco")
|
||||
|
||||
$scope.$apply(function () {
|
||||
|
||||
var cell = $(e.target).scope().area;
|
||||
var cell = event.target.getScope_HackForSortable().area;
|
||||
cell.hasActiveChild = hasActiveChild(cell, cell.controls);
|
||||
cell.active = false;
|
||||
});
|
||||
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
function umbGridHackScope() {
|
||||
|
||||
function link($scope, $element) {
|
||||
|
||||
// Since the grid used the el.scope() method, which should only be used by debugging, and only are avilable in debug-mode. I had to make a replica method doig the same:
|
||||
$element[0].getScope_HackForSortable = function() {
|
||||
return $scope;
|
||||
}
|
||||
}
|
||||
|
||||
var directive = {
|
||||
restrict: "A",
|
||||
link: link
|
||||
};
|
||||
|
||||
return directive;
|
||||
|
||||
}
|
||||
|
||||
angular.module("umbraco").directive("umbGridHackScope", umbGridHackScope);
|
||||
|
||||
})();
|
||||
@@ -159,7 +159,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="umb-cell-inner" ui-sortable="sortableOptionsCell" ng-model="area.controls">
|
||||
<div class="umb-cell-inner" ui-sortable="sortableOptionsCell" umb-grid-hack-scope ng-model="area.controls">
|
||||
|
||||
<!-- Control placeholder -->
|
||||
<div class="umb-cell-placeholder" ng-if="area.controls.length === 0" ng-click="openEditorOverlay($event, area, 0, area.$uniqueId);">
|
||||
@@ -171,6 +171,7 @@
|
||||
|
||||
<!-- for each control in areas -->
|
||||
<div class="umb-control"
|
||||
umb-grid-hack-scope
|
||||
ng-repeat="control in area.controls"
|
||||
ng-click="clickControl($index, area.controls, area)"
|
||||
ng-class="{'-active': control.active}"
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
<PackageReference Include="MiniProfiler" Version="4.0.138" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
|
||||
<PackageReference Include="Umbraco.ModelsBuilder.Ui">
|
||||
<Version>8.0.1</Version>
|
||||
<Version>8.0.4</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Umbraco.SqlServerCE" Version="4.0.0.1" />
|
||||
</ItemGroup>
|
||||
@@ -340,9 +340,9 @@
|
||||
<WebProjectProperties>
|
||||
<UseIIS>False</UseIIS>
|
||||
<AutoAssignPort>True</AutoAssignPort>
|
||||
<DevelopmentServerPort>8000</DevelopmentServerPort>
|
||||
<DevelopmentServerPort>8010</DevelopmentServerPort>
|
||||
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
||||
<IISUrl>http://localhost:8000</IISUrl>
|
||||
<IISUrl>http://localhost:8010</IISUrl>
|
||||
<NTLMAuthentication>False</NTLMAuthentication>
|
||||
<UseCustomServer>False</UseCustomServer>
|
||||
<CustomServerUrl>
|
||||
|
||||
@@ -1127,7 +1127,7 @@ To manage your website, simply open the Umbraco back office and start adding con
|
||||
<key alias="cancelAndUploadAnother">Cancel and upload another package</key>
|
||||
<key alias="accept">I accept</key>
|
||||
<key alias="termsOfUse">terms of use</key>
|
||||
|
||||
|
||||
<key alias="pathToFile">Path to file</key>
|
||||
<key alias="pathToFileDescription">Absolute path to file (ie: /bin/umbraco.bin)</key>
|
||||
<key alias="installed">Installed</key>
|
||||
@@ -1994,13 +1994,13 @@ To manage your website, simply open the Umbraco back office and start adding con
|
||||
<key alias="httpsCheckExpiringCertificate">Your website's SSL certificate is expiring in %0% days.</key>
|
||||
<key alias="healthCheckInvalidUrl">Error pinging the URL %0% - '%1%'</key>
|
||||
<key alias="httpsCheckIsCurrentSchemeHttps">You are currently %0% viewing the site using the HTTPS scheme.</key>
|
||||
<key alias="httpsCheckConfigurationRectifyNotPossible">The appSetting 'umbracoUseSSL' is set to 'false' in your web.config file. Once you access this site using the HTTPS scheme, that should be set to 'true'.</key>
|
||||
<key alias="httpsCheckConfigurationCheckResult">The appSetting 'umbracoUseSSL' is set to '%0%' in your web.config file, your cookies are %1% marked as secure.</key>
|
||||
<key alias="httpsCheckEnableHttpsError">Could not update the 'umbracoUseSSL' setting in your web.config file. Error: %0%</key>
|
||||
<key alias="httpsCheckConfigurationRectifyNotPossible">The appSetting 'Umbraco.Core.UseHttps' is set to 'false' in your web.config file. Once you access this site using the HTTPS scheme, that should be set to 'true'.</key>
|
||||
<key alias="httpsCheckConfigurationCheckResult">The appSetting 'Umbraco.Core.UseHttps' is set to '%0%' in your web.config file, your cookies are %1% marked as secure.</key>
|
||||
<key alias="httpsCheckEnableHttpsError">Could not update the 'Umbraco.Core.UseHttps' setting in your web.config file. Error: %0%</key>
|
||||
<!-- The following keys don't get tokens passed in -->
|
||||
<key alias="httpsCheckEnableHttpsButton">Enable HTTPS</key>
|
||||
<key alias="httpsCheckEnableHttpsDescription">Sets umbracoSSL setting to true in the appSettings of the web.config file.</key>
|
||||
<key alias="httpsCheckEnableHttpsSuccess">The appSetting 'umbracoUseSSL' is now set to 'true' in your web.config file, your cookies will be marked as secure.</key>
|
||||
<key alias="httpsCheckEnableHttpsSuccess">The appSetting 'Umbraco.Core.UseHttps' is now set to 'true' in your web.config file, your cookies will be marked as secure.</key>
|
||||
<key alias="rectifyButton">Fix</key>
|
||||
<key alias="cannotRectifyShouldNotEqual">Cannot fix a check with a value comparison type of 'ShouldNotEqual'.</key>
|
||||
<key alias="cannotRectifyShouldEqualWithValue">Cannot fix a check with a value comparison type of 'ShouldEqual' with a provided value.</key>
|
||||
|
||||
@@ -2005,13 +2005,13 @@ To manage your website, simply open the Umbraco back office and start adding con
|
||||
<key alias="httpsCheckExpiringCertificate">Your website's SSL certificate is expiring in %0% days.</key>
|
||||
<key alias="healthCheckInvalidUrl">Error pinging the URL %0% - '%1%'</key>
|
||||
<key alias="httpsCheckIsCurrentSchemeHttps">You are currently %0% viewing the site using the HTTPS scheme.</key>
|
||||
<key alias="httpsCheckConfigurationRectifyNotPossible">The appSetting 'umbracoUseSSL' is set to 'false' in your web.config file. Once you access this site using the HTTPS scheme, that should be set to 'true'.</key>
|
||||
<key alias="httpsCheckConfigurationCheckResult">The appSetting 'umbracoUseSSL' is set to '%0%' in your web.config file, your cookies are %1% marked as secure.</key>
|
||||
<key alias="httpsCheckEnableHttpsError">Could not update the 'umbracoUseSSL' setting in your web.config file. Error: %0%</key>
|
||||
<key alias="httpsCheckConfigurationRectifyNotPossible">The appSetting 'Umbraco.Core.UseHttps' is set to 'false' in your web.config file. Once you access this site using the HTTPS scheme, that should be set to 'true'.</key>
|
||||
<key alias="httpsCheckConfigurationCheckResult">The appSetting 'Umbraco.Core.UseHttps' is set to '%0%' in your web.config file, your cookies are %1% marked as secure.</key>
|
||||
<key alias="httpsCheckEnableHttpsError">Could not update the 'Umbraco.Core.UseHttps' setting in your web.config file. Error: %0%</key>
|
||||
<!-- The following keys don't get tokens passed in -->
|
||||
<key alias="httpsCheckEnableHttpsButton">Enable HTTPS</key>
|
||||
<key alias="httpsCheckEnableHttpsDescription">Sets umbracoSSL setting to true in the appSettings of the web.config file.</key>
|
||||
<key alias="httpsCheckEnableHttpsSuccess">The appSetting 'umbracoUseSSL' is now set to 'true' in your web.config file, your cookies will be marked as secure.</key>
|
||||
<key alias="httpsCheckEnableHttpsSuccess">The appSetting 'Umbraco.Core.UseHttps' is now set to 'true' in your web.config file, your cookies will be marked as secure.</key>
|
||||
<key alias="rectifyButton">Fix</key>
|
||||
<key alias="cannotRectifyShouldNotEqual">Cannot fix a check with a value comparison type of 'ShouldNotEqual'.</key>
|
||||
<key alias="cannotRectifyShouldEqualWithValue">Cannot fix a check with a value comparison type of 'ShouldEqual' with a provided value.</key>
|
||||
|
||||
@@ -1292,9 +1292,9 @@
|
||||
<key alias="mailBody"><![CDATA[
|
||||
Hola %0%.
|
||||
|
||||
Este mail se ha generado automáticamente para informale que %2% has solicitado que el documento '%1%' sea traducido en '%5%'.
|
||||
Este mail se ha generado automáticamente para informale que %2% has solicitado que el documento '%1%' sea traducido en '%5%'.
|
||||
|
||||
Para editarlo, vaya a la dirección http://%3%/translation/details.aspx?id=%4% o inicia sesión en umbraco y ve a http://%3% para ver las tareas pendientes de traducir.
|
||||
Para editarlo, vaya a la dirección http://%3%/translation/details.aspx?id=%4% o inicia sesión en umbraco y ve a http://%3% para ver las tareas pendientes de traducir.
|
||||
|
||||
Espero que tenga un buen dia.
|
||||
|
||||
@@ -1587,13 +1587,13 @@
|
||||
<key alias="httpsCheckExpiringCertificate">El certificado SSL de tu sitio caducará en %0% días.</key>
|
||||
<key alias="healthCheckInvalidUrl">Error haciendo ping a la URL %0% - '%1%'</key>
|
||||
<key alias="httpsCheckIsCurrentSchemeHttps">Actualmente estás %0% viendo el sitio usando el esquema HTTPS.</key>
|
||||
<key alias="httpsCheckConfigurationRectifyNotPossible">El appSetting 'umbracoUseSSL' está configurado como 'false' en tu archivo web.config. Una vez que accedes al sitio usando HTTPS, debería ser configurado como 'true'.</key>
|
||||
<key alias="httpsCheckConfigurationCheckResult">Ele appSetting 'umbracoUseSSL' está configurado como '%0%' en tu archivo web.config, tus cookies son %1% marcadas como seguras.</key>
|
||||
<key alias="httpsCheckEnableHttpsError">No se pudo actualizar 'umbracoUseSSL' en tu archivo web.config. Error: %0%</key>
|
||||
<key alias="httpsCheckConfigurationRectifyNotPossible">El appSetting 'Umbraco.Core.UseHttps' está configurado como 'false' en tu archivo web.config. Una vez que accedes al sitio usando HTTPS, debería ser configurado como 'true'.</key>
|
||||
<key alias="httpsCheckConfigurationCheckResult">Ele appSetting 'Umbraco.Core.UseHttps' está configurado como '%0%' en tu archivo web.config, tus cookies son %1% marcadas como seguras.</key>
|
||||
<key alias="httpsCheckEnableHttpsError">No se pudo actualizar 'Umbraco.Core.UseHttps' en tu archivo web.config. Error: %0%</key>
|
||||
<!-- The following keys don't get tokens passed in -->
|
||||
<key alias="httpsCheckEnableHttpsButton">Activar HTTPS</key>
|
||||
<key alias="httpsCheckEnableHttpsDescription">Configura umbracoSSL como true en los appSettings del archivo web.config.</key>
|
||||
<key alias="httpsCheckEnableHttpsSuccess">El appSetting 'umbracoUseSSL' está ahora configurado como 'true' en tu archivo web.config, tus cookies se marcarán como seguras.</key>
|
||||
<key alias="httpsCheckEnableHttpsSuccess">El appSetting 'Umbraco.Core.UseHttps' está ahora configurado como 'true' en tu archivo web.config, tus cookies se marcarán como seguras.</key>
|
||||
<key alias="rectifyButton">Arreglar</key>
|
||||
<key alias="cannotRectifyShouldNotEqual">No se pudo arreglar chequeo con un valor de comparación 'ShouldNotEqual'.</key>
|
||||
<key alias="cannotRectifyShouldEqualWithValue">No se pudo arreglar chequeo con un valor de comparación 'ShouldEqual' con el valor introducido.</key>
|
||||
|
||||
@@ -1782,13 +1782,13 @@ Pour gérer votre site, ouvrez simplement le backoffice Umbraco et commencez à
|
||||
<key alias="httpsCheckExpiringCertificate">Le certificat SSL de votre site web va expirer dans %0% jours.</key>
|
||||
<key alias="healthCheckInvalidUrl">Erreur en essayant de contacter l'URL %0% - '%1%'</key>
|
||||
<key alias="httpsCheckIsCurrentSchemeHttps">Vous êtes actuellement %0% à voir le site via le schéma HTTPS.</key>
|
||||
<key alias="httpsCheckConfigurationRectifyNotPossible">La valeur appSetting 'umbracoUseSSL' est fixée à 'false' dans votre fichier web.config. Une fois que vous donnerez accès à ce site en utilisant le schéma HTTPS, cette valeur devra être mise à 'true'.</key>
|
||||
<key alias="httpsCheckConfigurationCheckResult">La valeur appSetting 'umbracoUseSSL' est fixée à '%0%' dans votre fichier web.config, vos cookies sont %1% marqués comme étant sécurisés.</key>
|
||||
<key alias="httpsCheckEnableHttpsError">Impossible de mettre à jour la configuration 'umbracoUseSSL' dans votre fichier web.config. Erreur : %0%</key>
|
||||
<key alias="httpsCheckConfigurationRectifyNotPossible">La valeur appSetting 'Umbraco.Core.UseHttps' est fixée à 'false' dans votre fichier web.config. Une fois que vous donnerez accès à ce site en utilisant le schéma HTTPS, cette valeur devra être mise à 'true'.</key>
|
||||
<key alias="httpsCheckConfigurationCheckResult">La valeur appSetting 'Umbraco.Core.UseHttps' est fixée à '%0%' dans votre fichier web.config, vos cookies sont %1% marqués comme étant sécurisés.</key>
|
||||
<key alias="httpsCheckEnableHttpsError">Impossible de mettre à jour la configuration 'Umbraco.Core.UseHttps' dans votre fichier web.config. Erreur : %0%</key>
|
||||
<!-- The following keys don't get tokens passed in -->
|
||||
<key alias="httpsCheckEnableHttpsButton">Activer HTTPS</key>
|
||||
<key alias="httpsCheckEnableHttpsDescription">Fixe la configuration 'umbracoSSL' à 'true' dans la section appSettings du fichier web.config.</key>
|
||||
<key alias="httpsCheckEnableHttpsSuccess">La configuration appSetting 'umbracoUseSSL' est maintenant fixée à 'true' dans votre fichier web.config, vos cookies seront marqués comme étant sécurisés.</key>
|
||||
<key alias="httpsCheckEnableHttpsSuccess">La configuration appSetting 'Umbraco.Core.UseHttps' est maintenant fixée à 'true' dans votre fichier web.config, vos cookies seront marqués comme étant sécurisés.</key>
|
||||
<key alias="rectifyButton">Corriger</key>
|
||||
<key alias="cannotRectifyShouldNotEqual">Impossible de corriger une vérification avec un type de comparaison 'ShouldNotEqual'.</key>
|
||||
<key alias="cannotRectifyShouldEqualWithValue">Impossible de corriger une vérification avec un type de comparaison 'ShouldEqual' avec une valeur spécifiée.</key>
|
||||
|
||||
@@ -1344,13 +1344,13 @@ Echter, Runway biedt een gemakkelijke basis om je snel op weg te helpen. Als je
|
||||
<key alias="httpsCheckInvalidCertificate">Cerficaat validatie foutmelding: '%0%'</key>
|
||||
<key alias="healthCheckInvalidUrl">Fout bij pingen van URL %0% - '%1%'</key>
|
||||
<key alias="httpsCheckIsCurrentSchemeHttps">De site wordt momenteel %0% bekeken via HTTPS.</key>
|
||||
<key alias="httpsCheckConfigurationRectifyNotPossible">De appSetting 'umbracoUseSSL' in web.config staat op 'false'. Indien HTTPS gebruikt wordt moet deze op 'true' staan.</key>
|
||||
<key alias="httpsCheckConfigurationCheckResult">De appSetting 'umbracoUseSSL' in web.config is ingesteld op '%0%'. Cookies zijn %1% ingesteld als secure.</key>
|
||||
<key alias="httpsCheckEnableHttpsError">De 'umbracoUseSSL' waarde in web.config kon niet aangepast worden. Foutmelding: %0%</key>
|
||||
<key alias="httpsCheckConfigurationRectifyNotPossible">De appSetting 'Umbraco.Core.UseHttps' in web.config staat op 'false'. Indien HTTPS gebruikt wordt moet deze op 'true' staan.</key>
|
||||
<key alias="httpsCheckConfigurationCheckResult">De appSetting 'Umbraco.Core.UseHttps' in web.config is ingesteld op '%0%'. Cookies zijn %1% ingesteld als secure.</key>
|
||||
<key alias="httpsCheckEnableHttpsError">De 'Umbraco.Core.UseHttps' waarde in web.config kon niet aangepast worden. Foutmelding: %0%</key>
|
||||
<!-- The following keys don't get tokens passed in -->
|
||||
<key alias="httpsCheckEnableHttpsButton">HTTPS inschakelen</key>
|
||||
<key alias="httpsCheckEnableHttpsDescription">Zet in de appSettings van de web.config de umbracoSSL instelling op 'true'.</key>
|
||||
<key alias="httpsCheckEnableHttpsSuccess">De appSetting 'umbracoUseSSL' is nu ingesteld op 'true', cookies zullen als 'secure' worden aangemerkt.</key>
|
||||
<key alias="httpsCheckEnableHttpsSuccess">De appSetting 'Umbraco.Core.UseHttps' is nu ingesteld op 'true', cookies zullen als 'secure' worden aangemerkt.</key>
|
||||
<key alias="rectifyButton">Herstellen</key>
|
||||
<key alias="cannotRectifyShouldNotEqual">Kan een controle met vergelijkingstype 'ShouldNotEqual' niet herstellen.</key>
|
||||
<key alias="cannotRectifyShouldEqualWithValue">Kan een controle met vergelijkingstype 'ShouldNotEqual' en gedefinieerde waarde niet herstellen.</key>
|
||||
|
||||
@@ -1423,13 +1423,13 @@ Naciśnij przycisk <strong>instaluj</strong>, aby zainstalować bazę danych Umb
|
||||
<key alias="httpsCheckExpiringCertificate">Certyfikat SSL Twojej strony wygaśnie za %0% dni.</key>
|
||||
<key alias="healthCheckInvalidUrl">Błąd pingowania adresu URL %0% - '%1%'</key>
|
||||
<key alias="httpsCheckIsCurrentSchemeHttps">Oglądasz %0% stronę używając HTTPS.</key>
|
||||
<key alias="httpsCheckConfigurationRectifyNotPossible">appSetting 'umbracoUseSSL' został ustawiony na 'false' w Twoim pliku web.config. Po uzyskaniu dostępu do strony, używając HTTPS, powinieneś go ustawić na 'true'.</key>
|
||||
<key alias="httpsCheckConfigurationCheckResult">appSetting 'umbracoUseSSL' został ustawiony na '%0%' w Twoim pliku web.config, Twoje ciasteczka są %1% ustawione jako bezpieczne.</key>
|
||||
<key alias="httpsCheckEnableHttpsError">Nie można zaktualizaować ustawień 'umbracoUseSSL' w Twoim pliku web.config file. Błąd: %0%</key>
|
||||
<key alias="httpsCheckConfigurationRectifyNotPossible">appSetting 'Umbraco.Core.UseHttps' został ustawiony na 'false' w Twoim pliku web.config. Po uzyskaniu dostępu do strony, używając HTTPS, powinieneś go ustawić na 'true'.</key>
|
||||
<key alias="httpsCheckConfigurationCheckResult">appSetting 'Umbraco.Core.UseHttps' został ustawiony na '%0%' w Twoim pliku web.config, Twoje ciasteczka są %1% ustawione jako bezpieczne.</key>
|
||||
<key alias="httpsCheckEnableHttpsError">Nie można zaktualizaować ustawień 'Umbraco.Core.UseHttps' w Twoim pliku web.config file. Błąd: %0%</key>
|
||||
<!-- Następujące klucze nie mają przekazanych tokenów -->
|
||||
<key alias="httpsCheckEnableHttpsButton">Włącz HTTPS</key>
|
||||
<key alias="httpsCheckEnableHttpsDescription">Ustawia umbracoSSL na 'true' w appSettings pliku web.config.</key>
|
||||
<key alias="httpsCheckEnableHttpsSuccess">appSetting 'umbracoUseSSL' jest teraz ustawione na 'true' w Twoim pliku web.config, Twoje ciasteczka będą oznaczone jako bezpieczne.</key>
|
||||
<key alias="httpsCheckEnableHttpsSuccess">appSetting 'Umbraco.Core.UseHttps' jest teraz ustawione na 'true' w Twoim pliku web.config, Twoje ciasteczka będą oznaczone jako bezpieczne.</key>
|
||||
<key alias="rectifyButton">Napraw</key>
|
||||
<key alias="cannotRectifyShouldNotEqual">Nie można naprawić sprawdzenia z wartością typu porównania 'ShouldNotEqual'.</key>
|
||||
<key alias="cannotRectifyShouldEqualWithValue">Nie można naprawić sprawdzenia z wartością typu porównania 'ShouldEqual' z wprowadzoną wartością.</key>
|
||||
|
||||
@@ -712,13 +712,13 @@
|
||||
<key alias="httpsCheckValidCertificate">Сертификат Вашего веб-сайта отмечен как проверенный.</key>
|
||||
<key alias="httpsCheckInvalidCertificate">Ошибка проверки сертификата: '%0%'</key>
|
||||
<key alias="httpsCheckIsCurrentSchemeHttps">Сейчас Вы %0% просматриваете сайт, используя протокол HTTPS.</key>
|
||||
<key alias="httpsCheckConfigurationRectifyNotPossible">Параметр 'umbracoUseSSL' в секции 'appSetting' установлен в 'false' в файле web.config. Если Вам необходим доступ к сайту по протоколу HTTPS, нужно установить данный параметр в 'true'.</key>
|
||||
<key alias="httpsCheckConfigurationCheckResult">Параметр 'umbracoUseSSL' в секции 'appSetting' в файле установлен в '%0%', значения cookies %1% маркированы как безопасные.</key>
|
||||
<key alias="httpsCheckEnableHttpsError">Невозможно обновить значение параметра 'umbracoUseSSL' в файле web.config. Ошибка: %0%</key>
|
||||
<key alias="httpsCheckConfigurationRectifyNotPossible">Параметр 'Umbraco.Core.UseHttps' в секции 'appSetting' установлен в 'false' в файле web.config. Если Вам необходим доступ к сайту по протоколу HTTPS, нужно установить данный параметр в 'true'.</key>
|
||||
<key alias="httpsCheckConfigurationCheckResult">Параметр 'Umbraco.Core.UseHttps' в секции 'appSetting' в файле установлен в '%0%', значения cookies %1% маркированы как безопасные.</key>
|
||||
<key alias="httpsCheckEnableHttpsError">Невозможно обновить значение параметра 'Umbraco.Core.UseHttps' в файле web.config. Ошибка: %0%</key>
|
||||
<!-- The following keys don't get tokens passed in -->
|
||||
<key alias="httpsCheckEnableHttpsButton">Разрешить HTTPS</key>
|
||||
<key alias="httpsCheckEnableHttpsDescription">Устанавливает значение параметра 'umbracoSSL' в 'true' в секции 'appSettings' файла web.config.</key>
|
||||
<key alias="httpsCheckEnableHttpsSuccess">Параметр 'umbracoUseSSL' в секции 'appSetting' файла web.config теперь установлен в 'true', значения cookies будут промаркированы как безопасные.</key>
|
||||
<key alias="httpsCheckEnableHttpsSuccess">Параметр 'Umbraco.Core.UseHttps' в секции 'appSetting' файла web.config теперь установлен в 'true', значения cookies будут промаркированы как безопасные.</key>
|
||||
<key alias="rectifyButton">Исправить</key>
|
||||
<key alias="cannotRectifyShouldNotEqual">Невозможно исправление по результату проверки значения на 'ShouldNotEqual'.</key>
|
||||
<key alias="cannotRectifyShouldEqualWithValue">Невозможно исправление по результату проверки значения на 'ShouldEqual' с предоставленным значением.</key>
|
||||
|
||||
@@ -1208,13 +1208,13 @@
|
||||
<key alias="httpsCheckInvalidCertificate">Certificate validation error: '%0%'</key>
|
||||
<key alias="httpsCheckInvalidUrl">Error pinging the URL %0% - '%1%'</key>
|
||||
<key alias="httpsCheckIsCurrentSchemeHttps">You are currently %0% viewing the site using the HTTPS scheme.</key>
|
||||
<key alias="httpsCheckConfigurationRectifyNotPossible">The appSetting 'umbracoUseSSL' is set to 'false' in your web.config file. Once you access this site using the HTTPS scheme, that should be set to 'true'.</key>
|
||||
<key alias="httpsCheckConfigurationCheckResult">The appSetting 'umbracoUseSSL' is set to '%0%' in your web.config file, your cookies are %1% marked as secure.</key>
|
||||
<key alias="httpsCheckEnableHttpsError">Could not update the 'umbracoUseSSL' setting in your web.config file. Error: %0%</key>
|
||||
<key alias="httpsCheckConfigurationRectifyNotPossible">The appSetting 'Umbraco.Core.UseHttps' is set to 'false' in your web.config file. Once you access this site using the HTTPS scheme, that should be set to 'true'.</key>
|
||||
<key alias="httpsCheckConfigurationCheckResult">The appSetting 'Umbraco.Core.UseHttps' is set to '%0%' in your web.config file, your cookies are %1% marked as secure.</key>
|
||||
<key alias="httpsCheckEnableHttpsError">Could not update the 'Umbraco.Core.UseHttps' setting in your web.config file. Error: %0%</key>
|
||||
<!-- The following keys don't get tokens passed in -->
|
||||
<key alias="httpsCheckEnableHttpsButton">Enable HTTPS</key>
|
||||
<key alias="httpsCheckEnableHttpsDescription">Sets umbracoSSL setting to true in the appSettings of the web.config file.</key>
|
||||
<key alias="httpsCheckEnableHttpsSuccess">The appSetting 'umbracoUseSSL' is now set to 'true' in your web.config file, your cookies will be marked as secure.</key>
|
||||
<key alias="httpsCheckEnableHttpsSuccess">The appSetting 'Umbraco.Core.UseHttps' is now set to 'true' in your web.config file, your cookies will be marked as secure.</key>
|
||||
<key alias="rectifyButton">Fix</key>
|
||||
<key alias="cannotRectifyShouldNotEqual">Cannot fix a check with a value comparison type of 'ShouldNotEqual'.</key>
|
||||
<key alias="cannotRectifyShouldEqualWithValue">Cannot fix a check with a value comparison type of 'ShouldEqual' with a provided value.</key>
|
||||
|
||||
@@ -1187,13 +1187,13 @@
|
||||
<key alias="httpsCheckInvalidCertificate">憑證驗證錯誤:%0%</key>
|
||||
<key alias="healthCheckInvalidUrl">網址探查錯誤:%0% - '%1%'</key>
|
||||
<key alias="httpsCheckIsCurrentSchemeHttps">您目前使用HTTPS瀏覽本站:%0%</key>
|
||||
<key alias="httpsCheckConfigurationRectifyNotPossible">在您的web.config檔案中,appSetting的umbracoUseSSL是設為false。當您開始使用HTTPS時,應將其改為 true。</key>
|
||||
<key alias="httpsCheckConfigurationCheckResult">在您的web.config檔案中,appSetting的umbracoUseSSL是設為 %0%,您的cookies %0% 標成安全。</key>
|
||||
<key alias="httpsCheckEnableHttpsError">無法在您的web.config檔案中,更新appSetting的umbracoUseSSL設定,錯誤訊息:%0%</key>
|
||||
<key alias="httpsCheckConfigurationRectifyNotPossible">在您的web.config檔案中,appSetting的Umbraco.Core.UseHttps是設為false。當您開始使用HTTPS時,應將其改為 true。</key>
|
||||
<key alias="httpsCheckConfigurationCheckResult">在您的web.config檔案中,appSetting的Umbraco.Core.UseHttps是設為 %0%,您的cookies %0% 標成安全。</key>
|
||||
<key alias="httpsCheckEnableHttpsError">無法在您的web.config檔案中,更新appSetting的Umbraco.Core.UseHttps設定,錯誤訊息:%0%</key>
|
||||
<!-- The following keys don't get tokens passed in -->
|
||||
<key alias="httpsCheckEnableHttpsButton">開啟HTTPS</key>
|
||||
<key alias="httpsCheckEnableHttpsDescription">在web.config檔案中,將appSetting的umbracoUseSSL設true。</key>
|
||||
<key alias="httpsCheckEnableHttpsSuccess">在您的web.config檔案中,appSetting的umbracoUseSSL已設為 true,您的cookies 將被標成安全。</key>
|
||||
<key alias="httpsCheckEnableHttpsDescription">在web.config檔案中,將appSetting的Umbraco.Core.UseHttps設true。</key>
|
||||
<key alias="httpsCheckEnableHttpsSuccess">在您的web.config檔案中,appSetting的Umbraco.Core.UseHttps已設為 true,您的cookies 將被標成安全。</key>
|
||||
<key alias="rectifyButton">修正</key>
|
||||
<key alias="cannotRectifyShouldNotEqual">無法修正比較種類檢查為'ShouldNotEqual'。</key>
|
||||
<key alias="cannotRectifyShouldEqualWithValue">用提供的數值無法修正比較種類檢查為'ShouldEqual'。</key>
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.WebPages;
|
||||
using Umbraco.Web.Composing;
|
||||
|
||||
namespace Umbraco.Web.UI.Config.Splashes
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Cache;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.PublishedContent;
|
||||
@@ -82,20 +83,8 @@ namespace Umbraco.Web.Cache
|
||||
// service of changes, else factories may try to rebuild models while
|
||||
// we are using the database to load content into caches
|
||||
|
||||
// ReSharper disable once SuspiciousTypeConversion.Global
|
||||
if (_publishedModelFactory is ILivePublishedModelFactory live)
|
||||
{
|
||||
lock (live.SyncRoot)
|
||||
{
|
||||
live.Refresh();
|
||||
_publishedSnapshotService.Notify(payloads);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// ReSharper disable once InconsistentlySynchronizedField
|
||||
_publishedSnapshotService.Notify(payloads);
|
||||
}
|
||||
_publishedModelFactory.WithSafeLiveFactory(() =>
|
||||
_publishedSnapshotService.Notify(payloads));
|
||||
|
||||
// now we can trigger the event
|
||||
base.Refresh(payloads);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Cache;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.PublishedContent;
|
||||
@@ -65,20 +66,8 @@ namespace Umbraco.Web.Cache
|
||||
// service of changes, else factories may try to rebuild models while
|
||||
// we are using the database to load content into caches
|
||||
|
||||
// ReSharper disable once SuspiciousTypeConversion.Global
|
||||
if (_publishedModelFactory is ILivePublishedModelFactory live)
|
||||
{
|
||||
lock (live.SyncRoot)
|
||||
{
|
||||
live.Refresh();
|
||||
_publishedSnapshotService.Notify(payloads);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// ReSharper disable once InconsistentlySynchronizedField
|
||||
_publishedSnapshotService.Notify(payloads);
|
||||
}
|
||||
_publishedModelFactory.WithSafeLiveFactory(() =>
|
||||
_publishedSnapshotService.Notify(payloads));
|
||||
|
||||
base.Refresh(payloads);
|
||||
}
|
||||
|
||||
@@ -119,8 +119,8 @@ namespace Umbraco.Web.Cache
|
||||
() => MemberGroupService.Deleted -= MemberGroupService_Deleted);
|
||||
|
||||
// bind to media events - handles all media changes
|
||||
Bind(() => MediaService.TreeChanged += MediaService_Changed,
|
||||
() => MediaService.TreeChanged -= MediaService_Changed);
|
||||
Bind(() => MediaService.TreeChanged += MediaService_TreeChanged,
|
||||
() => MediaService.TreeChanged -= MediaService_TreeChanged);
|
||||
|
||||
// bind to content events
|
||||
Bind(() => ContentService.Saved += ContentService_Saved, // needed for permissions
|
||||
@@ -403,7 +403,7 @@ namespace Umbraco.Web.Cache
|
||||
|
||||
#region MediaService
|
||||
|
||||
private void MediaService_Changed(IMediaService sender, TreeChange<IMedia>.EventArgs args)
|
||||
private void MediaService_TreeChanged(IMediaService sender, TreeChange<IMedia>.EventArgs args)
|
||||
{
|
||||
_distributedCache.RefreshMediaCache(args.Changes.ToArray());
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace Umbraco.Web.ContentApps
|
||||
Weight = Weight
|
||||
});
|
||||
|
||||
case IMedia media when !media.ContentType.IsContainer && media.ContentType.Alias != Core.Constants.Conventions.MediaTypes.Folder:
|
||||
case IMedia media when !media.ContentType.IsContainer || media.Properties.Count > 0:
|
||||
return _mediaApp ?? (_mediaApp = new ContentApp
|
||||
{
|
||||
Alias = "umbContent",
|
||||
|
||||
@@ -183,7 +183,7 @@ namespace Umbraco.Web.HealthCheck.Checks.Security
|
||||
private HealthCheckStatus FixHttpsSetting()
|
||||
{
|
||||
var configFile = IOHelper.MapPath("~/Web.config");
|
||||
const string xPath = "/configuration/appSettings/add[@key='umbracoUseSSL']/@value";
|
||||
const string xPath = "/configuration/appSettings/add[@key='Umbraco.Core.UseHttps']/@value";
|
||||
var configurationService = new ConfigurationService(configFile, xPath, _textService);
|
||||
var updateConfigFile = configurationService.UpdateConfigFile("true");
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ using Umbraco.Core;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.PublishedContent;
|
||||
using Umbraco.Core.PropertyEditors;
|
||||
using Umbraco.Core.Strings;
|
||||
using Umbraco.Web.Composing;
|
||||
using Umbraco.Web.Editors;
|
||||
using Umbraco.Web.Routing;
|
||||
@@ -198,10 +199,10 @@ namespace Umbraco.Web.Macros
|
||||
Id = _inner.Id;
|
||||
Key = _inner.Key;
|
||||
|
||||
// TODO: ARGH! need to fix this - this is not good because it uses ApplicationContext.Current
|
||||
CreatorName = _inner.GetCreatorProfile()?.Name;
|
||||
WriterName = _inner.GetWriterProfile()?.Name;
|
||||
|
||||
// TODO: inject
|
||||
var contentType = Current.Services.ContentTypeBaseServices.GetContentTypeOf(_inner);
|
||||
ContentType = Current.PublishedContentTypeFactory.CreateContentType(contentType);
|
||||
|
||||
@@ -252,8 +253,9 @@ namespace Umbraco.Web.Macros
|
||||
if (_cultureInfos != null)
|
||||
return _cultureInfos;
|
||||
|
||||
var urlSegmentProviders = Current.UrlSegmentProviders; // TODO inject
|
||||
return _cultureInfos = _inner.PublishCultureInfos.Values
|
||||
.ToDictionary(x => x.Culture, x => new PublishedCultureInfo(x.Culture, x.Name, x.Date));
|
||||
.ToDictionary(x => x.Culture, x => new PublishedCultureInfo(x.Culture, x.Name, _inner.GetUrlSegment(urlSegmentProviders, x.Culture), x.Date));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,6 @@ namespace Umbraco.Web.Models.Mapping
|
||||
.ForMember(x => x.RedirectId, expression => expression.MapFrom(item => item.Key));
|
||||
}
|
||||
|
||||
private static string GetUrl(IUmbracoContextAccessor umbracoContextAccessor, IRedirectUrl item) => umbracoContextAccessor?.UmbracoContext?.UrlProvider?.GetUrl(item.Id, item.Culture);
|
||||
private static string GetUrl(IUmbracoContextAccessor umbracoContextAccessor, IRedirectUrl item) => umbracoContextAccessor?.UmbracoContext?.UrlProvider?.GetUrl(item.ContentId, item.Culture);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,10 +4,6 @@ using Umbraco.Core.Composing;
|
||||
|
||||
namespace Umbraco.Web.Mvc
|
||||
{
|
||||
// unless we want to modify the content of the collection
|
||||
// which we are not doing at the moment
|
||||
// we can inherit from BuilderCollectionBase and just be enumerable
|
||||
|
||||
public class SurfaceControllerTypeCollection : BuilderCollectionBase<Type>
|
||||
{
|
||||
public SurfaceControllerTypeCollection(IEnumerable<Type> items)
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
using Umbraco.Core.Composing;
|
||||
using Umbraco.Web.WebApi;
|
||||
|
||||
namespace Umbraco.Web.Mvc
|
||||
{
|
||||
public class SurfaceControllerTypeCollectionBuilder : TypeCollectionBuilderBase<SurfaceControllerTypeCollection, SurfaceController>
|
||||
{ }
|
||||
}
|
||||
@@ -7,17 +7,17 @@ using GlobalSettings = Umbraco.Core.Configuration.GlobalSettings;
|
||||
namespace Umbraco.Web.Mvc
|
||||
{
|
||||
/// <summary>
|
||||
/// If umbracoUseSSL property in web.config is set to true, this filter will redirect any http access to https.
|
||||
/// If Umbraco.Core.UseHttps property in web.config is set to true, this filter will redirect any http access to https.
|
||||
/// </summary>
|
||||
public class UmbracoRequireHttpsAttribute : RequireHttpsAttribute
|
||||
{
|
||||
/// <summary>
|
||||
/// If umbracoUseSSL is true and we have a non-HTTPS request, handle redirect.
|
||||
/// If Umbraco.Core.UseHttps is true and we have a non-HTTPS request, handle redirect.
|
||||
/// </summary>
|
||||
/// <param name="filterContext">Filter context</param>
|
||||
protected override void HandleNonHttpsRequest(AuthorizationContext filterContext)
|
||||
{
|
||||
// If umbracoUseSSL is set, let base method handle redirect. Otherwise, we don't care.
|
||||
// If Umbraco.Core.UseHttps is set, let base method handle redirect. Otherwise, we don't care.
|
||||
if (Current.Configs.Global().UseHttps)
|
||||
{
|
||||
base.HandleNonHttpsRequest(filterContext);
|
||||
@@ -25,7 +25,7 @@ namespace Umbraco.Web.Mvc
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check to see if HTTPS is currently being used if umbracoUseSSL is true.
|
||||
/// Check to see if HTTPS is currently being used if Umbraco.Core.UseHttps is true.
|
||||
/// </summary>
|
||||
/// <param name="filterContext">Filter context</param>
|
||||
public override void OnAuthorization(AuthorizationContext filterContext)
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters
|
||||
macroAlias,
|
||||
umbracoContext.PublishedRequest?.PublishedContent,
|
||||
//needs to be explicitly casted to Dictionary<string, object>
|
||||
macroAttributes.ConvertTo(x => (string)x, x => x)).ToString()));
|
||||
macroAttributes.ConvertTo(x => (string)x, x => x)).GetAsText()));
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource
|
||||
{
|
||||
Published = PrimitiveSerializer.Boolean.ReadFrom(stream),
|
||||
Name = PrimitiveSerializer.String.ReadFrom(stream),
|
||||
UrlSegment = PrimitiveSerializer.String.ReadFrom(stream),
|
||||
VersionId = PrimitiveSerializer.Int32.ReadFrom(stream),
|
||||
VersionDate = PrimitiveSerializer.DateTime.ReadFrom(stream),
|
||||
WriterId = PrimitiveSerializer.Int32.ReadFrom(stream),
|
||||
@@ -27,6 +28,7 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource
|
||||
{
|
||||
PrimitiveSerializer.Boolean.WriteTo(value.Published, stream);
|
||||
PrimitiveSerializer.String.WriteTo(value.Name, stream);
|
||||
PrimitiveSerializer.String.WriteTo(value.UrlSegment, stream);
|
||||
PrimitiveSerializer.Int32.WriteTo(value.VersionId, stream);
|
||||
PrimitiveSerializer.DateTime.WriteTo(value.VersionDate, stream);
|
||||
PrimitiveSerializer.Int32.WriteTo(value.WriterId, stream);
|
||||
|
||||
+2
-1
@@ -18,7 +18,7 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource
|
||||
for (var i = 0; i < pcount; i++)
|
||||
{
|
||||
var languageId = PrimitiveSerializer.String.ReadFrom(stream);
|
||||
var cultureVariation = new CultureVariation { Name = ReadStringObject(stream), Date = ReadDateTime(stream) };
|
||||
var cultureVariation = new CultureVariation { Name = ReadStringObject(stream), UrlSegment = ReadStringObject(stream), Date = ReadDateTime(stream) };
|
||||
dict[languageId] = cultureVariation;
|
||||
}
|
||||
return dict;
|
||||
@@ -40,6 +40,7 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource
|
||||
|
||||
PrimitiveSerializer.String.WriteTo(culture, stream); // should never be null
|
||||
WriteObject(variation.Name, stream); // write an object in case it's null (though... should not happen)
|
||||
WriteObject(variation.UrlSegment, stream); // write an object in case it's null (though... should not happen)
|
||||
PrimitiveSerializer.DateTime.WriteTo(variation.Date, stream);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource
|
||||
internal class ContentData
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string UrlSegment { get; set; }
|
||||
public int VersionId { get; set; }
|
||||
public DateTime VersionDate { get; set; }
|
||||
public int WriterId { get; set; }
|
||||
|
||||
@@ -16,5 +16,8 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource
|
||||
[JsonProperty("cultureData")]
|
||||
[JsonConverter(typeof(CaseInsensitiveDictionaryConverter<CultureVariation>))]
|
||||
public Dictionary<string, CultureVariation> CultureData { get; set; }
|
||||
|
||||
[JsonProperty("urlSegment")]
|
||||
public string UrlSegment { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,9 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[JsonProperty("urlSegment")]
|
||||
public string UrlSegment { get; set; }
|
||||
|
||||
[JsonProperty("date")]
|
||||
public DateTime Date { get; set; }
|
||||
|
||||
|
||||
@@ -223,6 +223,7 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource
|
||||
p = new ContentData
|
||||
{
|
||||
Name = dto.PubName,
|
||||
UrlSegment = nested.UrlSegment,
|
||||
Published = true,
|
||||
TemplateId = dto.PubTemplateId,
|
||||
VersionId = dto.VersionId,
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace Umbraco.Web.PublishedCache.NuCache
|
||||
_publishedSnapshotAccessor = publishedSnapshotAccessor ?? throw new ArgumentNullException(nameof(publishedSnapshotAccessor));
|
||||
VariationContextAccessor = variationContextAccessor ?? throw new ArgumentNullException(nameof(variationContextAccessor));
|
||||
|
||||
_urlSegment = ContentData.Name.ToUrlSegment();
|
||||
_urlSegment = ContentData.UrlSegment;
|
||||
IsPreviewing = ContentData.Published == false;
|
||||
|
||||
var properties = new List<IPublishedProperty>();
|
||||
@@ -276,8 +276,9 @@ namespace Umbraco.Web.PublishedCache.NuCache
|
||||
|
||||
if (ContentData.CultureInfos == null)
|
||||
throw new Exception("oops: _contentDate.CultureInfos is null.");
|
||||
|
||||
return _cultureInfos = ContentData.CultureInfos
|
||||
.ToDictionary(x => x.Key, x => new PublishedCultureInfo(x.Key, x.Value.Name, x.Value.Date), StringComparer.OrdinalIgnoreCase);
|
||||
.ToDictionary(x => x.Key, x => new PublishedCultureInfo(x.Key, x.Value.Name, x.Value.UrlSegment, x.Value.Date), StringComparer.OrdinalIgnoreCase);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ using Umbraco.Core.Scoping;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Core.Services.Changes;
|
||||
using Umbraco.Core.Services.Implement;
|
||||
using Umbraco.Core.Strings;
|
||||
using Umbraco.Web.Cache;
|
||||
using Umbraco.Web.Install;
|
||||
using Umbraco.Web.PublishedCache.NuCache.DataSource;
|
||||
@@ -44,9 +45,9 @@ namespace Umbraco.Web.PublishedCache.NuCache
|
||||
private readonly IMemberRepository _memberRepository;
|
||||
private readonly IGlobalSettings _globalSettings;
|
||||
private readonly ISiteDomainHelper _siteDomainHelper;
|
||||
private readonly IContentTypeBaseServiceProvider _contentTypeBaseServiceProvider;
|
||||
private readonly IEntityXmlSerializer _entitySerializer;
|
||||
private readonly IDefaultCultureAccessor _defaultCultureAccessor;
|
||||
private readonly UrlSegmentProviderCollection _urlSegmentProviders;
|
||||
|
||||
// volatile because we read it with no lock
|
||||
private volatile bool _isReady;
|
||||
@@ -88,8 +89,9 @@ namespace Umbraco.Web.PublishedCache.NuCache
|
||||
IUmbracoContextAccessor umbracoContextAccessor, ILogger logger, IScopeProvider scopeProvider,
|
||||
IDocumentRepository documentRepository, IMediaRepository mediaRepository, IMemberRepository memberRepository,
|
||||
IDefaultCultureAccessor defaultCultureAccessor,
|
||||
IDataSource dataSource, IGlobalSettings globalSettings, ISiteDomainHelper siteDomainHelper, IContentTypeBaseServiceProvider contentTypeBaseServiceProvider,
|
||||
IEntityXmlSerializer entitySerializer)
|
||||
IDataSource dataSource, IGlobalSettings globalSettings, ISiteDomainHelper siteDomainHelper,
|
||||
IEntityXmlSerializer entitySerializer, IPublishedModelFactory publishedModelFactory,
|
||||
UrlSegmentProviderCollection urlSegmentProviders)
|
||||
: base(publishedSnapshotAccessor, variationContextAccessor)
|
||||
{
|
||||
//if (Interlocked.Increment(ref _singletonCheck) > 1)
|
||||
@@ -107,7 +109,7 @@ namespace Umbraco.Web.PublishedCache.NuCache
|
||||
_defaultCultureAccessor = defaultCultureAccessor;
|
||||
_globalSettings = globalSettings;
|
||||
_siteDomainHelper = siteDomainHelper;
|
||||
_contentTypeBaseServiceProvider = contentTypeBaseServiceProvider;
|
||||
_urlSegmentProviders = urlSegmentProviders;
|
||||
|
||||
// we need an Xml serializer here so that the member cache can support XPath,
|
||||
// for members this is done by navigating the serialized-to-xml member
|
||||
@@ -167,7 +169,7 @@ namespace Umbraco.Web.PublishedCache.NuCache
|
||||
|
||||
_domainStore = new SnapDictionary<int, Domain>();
|
||||
|
||||
LoadCaches();
|
||||
publishedModelFactory.WithSafeLiveFactory(LoadCaches);
|
||||
|
||||
Guid GetUid(ContentStore store, int id) => store.LiveSnapshot.Get(id)?.Uid ?? default;
|
||||
int GetId(ContentStore store, Guid uid) => store.LiveSnapshot.Get(uid)?.Id ?? default;
|
||||
@@ -571,6 +573,10 @@ namespace Umbraco.Web.PublishedCache.NuCache
|
||||
// because now we should ALWAYS run with the database server messenger, and then the RefreshAll will
|
||||
// be processed as soon as we are configured and the messenger processes instructions.
|
||||
|
||||
// note: notifications for content type and data type changes should be invoked with the
|
||||
// pure live model factory, if any, locked and refreshed - see ContentTypeCacheRefresher and
|
||||
// DataTypeCacheRefresher
|
||||
|
||||
public override void Notify(ContentCacheRefresher.JsonPayload[] payloads, out bool draftChanged, out bool publishedChanged)
|
||||
{
|
||||
// no cache, trash everything
|
||||
@@ -1265,7 +1271,13 @@ namespace Umbraco.Web.PublishedCache.NuCache
|
||||
foreach (var cultureInfo in infos)
|
||||
{
|
||||
var cultureIsDraft = !published && content is IContent d && d.IsCultureEdited(cultureInfo.Culture);
|
||||
cultureData[cultureInfo.Culture] = new CultureVariation { Name = cultureInfo.Name, Date = content.GetUpdateDate(cultureInfo.Culture) ?? DateTime.MinValue, IsDraft = cultureIsDraft };
|
||||
cultureData[cultureInfo.Culture] = new CultureVariation
|
||||
{
|
||||
Name = cultureInfo.Name,
|
||||
UrlSegment = content.GetUrlSegment(_urlSegmentProviders, cultureInfo.Culture),
|
||||
Date = content.GetUpdateDate(cultureInfo.Culture) ?? DateTime.MinValue,
|
||||
IsDraft = cultureIsDraft
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1273,7 +1285,8 @@ namespace Umbraco.Web.PublishedCache.NuCache
|
||||
var nestedData = new ContentNestedData
|
||||
{
|
||||
PropertyData = propertyData,
|
||||
CultureData = cultureData
|
||||
CultureData = cultureData,
|
||||
UrlSegment = content.GetUrlSegment(_urlSegmentProviders)
|
||||
};
|
||||
|
||||
var dto = new ContentNuDto
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Umbraco.Core.Models.PublishedContent;
|
||||
using Umbraco.Web.Mvc;
|
||||
|
||||
namespace Umbraco.Web.Routing
|
||||
{
|
||||
/// <summary>
|
||||
/// This url provider is used purely to deal with umbraco custom routes that utilize <see cref="UmbracoVirtualNodeRouteHandler"/> and will return
|
||||
/// the URL returned from the current PublishedContentRequest.PublishedContent (virtual node) if the request is in fact a virtual route and
|
||||
/// the id that is being requested matches the id of the current PublishedContentRequest.PublishedContent.
|
||||
/// </summary>
|
||||
internal class CustomRouteUrlProvider : IUrlProvider
|
||||
{
|
||||
/// <summary>
|
||||
/// This will return the URL that is returned by the assigned custom <see cref="IPublishedContent"/> if this is a custom route
|
||||
/// </summary>
|
||||
public UrlInfo GetUrl(UmbracoContext umbracoContext, IPublishedContent content, UrlProviderMode mode, string culture, Uri current)
|
||||
{
|
||||
if (umbracoContext?.PublishedRequest?.PublishedContent == null) return null;
|
||||
if (umbracoContext.HttpContext?.Request?.RequestContext?.RouteData?.DataTokens == null) return null;
|
||||
if (umbracoContext.HttpContext.Request.RequestContext.RouteData.DataTokens.ContainsKey(Core.Constants.Web.CustomRouteDataToken) == false) return null;
|
||||
|
||||
|
||||
//If we get this far, it means it's a custom route with published content assigned, check if the id being requested for is the same id as the assigned published content
|
||||
//NOTE: This looks like it might cause an infinite loop because PublishedContentBase.Url calls into UmbracoContext.Current.UrlProvider.GetUrl which calls back into the IUrlProvider pipeline
|
||||
// but the specific purpose of this is that a developer is using their own IPublishedContent that returns a specific Url and doesn't go back into the UrlProvider pipeline.
|
||||
// TODO: We could put a try/catch here just in case, else we could do some reflection checking to see if the implementation is PublishedContentBase and the Url property is not overridden.
|
||||
return UrlInfo.Url(
|
||||
content.Id == umbracoContext.PublishedRequest.PublishedContent.Id
|
||||
? umbracoContext.PublishedRequest.PublishedContent.GetUrl(culture)
|
||||
: null,
|
||||
culture);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This always returns an empty result because this url provider is used purely to deal with Umbraco custom routes with
|
||||
/// UmbracoVirtualNodeRouteHandler, we really only care about the normal URL so that RedirectToCurrentUmbracoPage() works
|
||||
/// with SurfaceControllers
|
||||
/// </summary>
|
||||
/// <param name="umbracoContext"></param>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="current"></param>
|
||||
/// <returns></returns>
|
||||
public IEnumerable<UrlInfo> GetOtherUrls(UmbracoContext umbracoContext, int id, Uri current)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Web.Http;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Composing;
|
||||
using Umbraco.Core.Configuration;
|
||||
using Umbraco.Web.Install;
|
||||
using Umbraco.Web.Mvc;
|
||||
using Umbraco.Web.WebApi;
|
||||
|
||||
namespace Umbraco.Web.Runtime
|
||||
{
|
||||
public class WebFinalComponent : IComponent
|
||||
{
|
||||
private readonly IUmbracoContextAccessor _umbracoContextAccessor;
|
||||
private readonly SurfaceControllerTypeCollection _surfaceControllerTypes;
|
||||
private readonly UmbracoApiControllerTypeCollection _apiControllerTypes;
|
||||
private readonly IGlobalSettings _globalSettings;
|
||||
|
||||
public WebFinalComponent(IUmbracoContextAccessor umbracoContextAccessor, SurfaceControllerTypeCollection surfaceControllerTypes, UmbracoApiControllerTypeCollection apiControllerTypes, IGlobalSettings globalSettings)
|
||||
{
|
||||
_umbracoContextAccessor = umbracoContextAccessor;
|
||||
_surfaceControllerTypes = surfaceControllerTypes;
|
||||
_apiControllerTypes = apiControllerTypes;
|
||||
_globalSettings = globalSettings;
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
// set routes
|
||||
CreateRoutes(_umbracoContextAccessor, _globalSettings, _surfaceControllerTypes, _apiControllerTypes);
|
||||
|
||||
// ensure WebAPI is initialized, after everything
|
||||
GlobalConfiguration.Configuration.EnsureInitialized();
|
||||
}
|
||||
|
||||
public void Terminate()
|
||||
{ }
|
||||
|
||||
// internal for tests
|
||||
internal static void CreateRoutes(
|
||||
IUmbracoContextAccessor umbracoContextAccessor,
|
||||
IGlobalSettings globalSettings,
|
||||
SurfaceControllerTypeCollection surfaceControllerTypes,
|
||||
UmbracoApiControllerTypeCollection apiControllerTypes)
|
||||
{
|
||||
var umbracoPath = globalSettings.GetUmbracoMvcArea();
|
||||
|
||||
// create the front-end route
|
||||
var defaultRoute = RouteTable.Routes.MapRoute(
|
||||
"Umbraco_default",
|
||||
umbracoPath + "/RenderMvc/{action}/{id}",
|
||||
new { controller = "RenderMvc", action = "Index", id = UrlParameter.Optional }
|
||||
);
|
||||
defaultRoute.RouteHandler = new RenderRouteHandler(umbracoContextAccessor, ControllerBuilder.Current.GetControllerFactory());
|
||||
|
||||
// register install routes
|
||||
RouteTable.Routes.RegisterArea<UmbracoInstallArea>();
|
||||
|
||||
// register all back office routes
|
||||
RouteTable.Routes.RegisterArea(new BackOfficeArea(globalSettings));
|
||||
|
||||
// plugin controllers must come first because the next route will catch many things
|
||||
RoutePluginControllers(globalSettings, surfaceControllerTypes, apiControllerTypes);
|
||||
}
|
||||
|
||||
private static void RoutePluginControllers(
|
||||
IGlobalSettings globalSettings,
|
||||
SurfaceControllerTypeCollection surfaceControllerTypes,
|
||||
UmbracoApiControllerTypeCollection apiControllerTypes)
|
||||
{
|
||||
var umbracoPath = globalSettings.GetUmbracoMvcArea();
|
||||
|
||||
// need to find the plugin controllers and route them
|
||||
var pluginControllers = surfaceControllerTypes.Concat(apiControllerTypes).ToArray();
|
||||
|
||||
// local controllers do not contain the attribute
|
||||
var localControllers = pluginControllers.Where(x => PluginController.GetMetadata(x).AreaName.IsNullOrWhiteSpace());
|
||||
foreach (var s in localControllers)
|
||||
{
|
||||
if (TypeHelper.IsTypeAssignableFrom<SurfaceController>(s))
|
||||
RouteLocalSurfaceController(s, umbracoPath);
|
||||
else if (TypeHelper.IsTypeAssignableFrom<UmbracoApiController>(s))
|
||||
RouteLocalApiController(s, umbracoPath);
|
||||
}
|
||||
|
||||
// get the plugin controllers that are unique to each area (group by)
|
||||
var pluginSurfaceControlleres = pluginControllers.Where(x => PluginController.GetMetadata(x).AreaName.IsNullOrWhiteSpace() == false);
|
||||
var groupedAreas = pluginSurfaceControlleres.GroupBy(controller => PluginController.GetMetadata(controller).AreaName);
|
||||
// loop through each area defined amongst the controllers
|
||||
foreach (var g in groupedAreas)
|
||||
{
|
||||
// create & register an area for the controllers (this will throw an exception if all controllers are not in the same area)
|
||||
var pluginControllerArea = new PluginControllerArea(globalSettings, g.Select(PluginController.GetMetadata));
|
||||
RouteTable.Routes.RegisterArea(pluginControllerArea);
|
||||
}
|
||||
}
|
||||
|
||||
private static void RouteLocalApiController(Type controller, string umbracoPath)
|
||||
{
|
||||
var meta = PluginController.GetMetadata(controller);
|
||||
var url = umbracoPath + (meta.IsBackOffice ? "/BackOffice" : "") + "/Api/" + meta.ControllerName + "/{action}/{id}";
|
||||
var route = RouteTable.Routes.MapHttpRoute(
|
||||
$"umbraco-api-{meta.ControllerName}",
|
||||
url, // url to match
|
||||
new { controller = meta.ControllerName, id = UrlParameter.Optional },
|
||||
new[] { meta.ControllerNamespace });
|
||||
if (route.DataTokens == null) // web api routes don't set the data tokens object
|
||||
route.DataTokens = new RouteValueDictionary();
|
||||
route.DataTokens.Add(Core.Constants.Web.UmbracoDataToken, "api"); //ensure the umbraco token is set
|
||||
}
|
||||
|
||||
private static void RouteLocalSurfaceController(Type controller, string umbracoPath)
|
||||
{
|
||||
var meta = PluginController.GetMetadata(controller);
|
||||
var url = umbracoPath + "/Surface/" + meta.ControllerName + "/{action}/{id}";
|
||||
var route = RouteTable.Routes.MapRoute(
|
||||
$"umbraco-surface-{meta.ControllerName}",
|
||||
url, // url to match
|
||||
new { controller = meta.ControllerName, action = "Index", id = UrlParameter.Optional },
|
||||
new[] { meta.ControllerNamespace }); // look in this namespace to create the controller
|
||||
route.DataTokens.Add(Core.Constants.Web.UmbracoDataToken, "surface"); // ensure the umbraco token is set
|
||||
route.DataTokens.Add("UseNamespaceFallback", false); // don't look anywhere else except this namespace!
|
||||
// make it use our custom/special SurfaceMvcHandler
|
||||
route.RouteHandler = new SurfaceRouteHandler();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
using Umbraco.Core.Composing;
|
||||
|
||||
namespace Umbraco.Web.Runtime
|
||||
{
|
||||
// web's final composer composes after all user composers
|
||||
[ComposeAfter(typeof(IUserComposer))]
|
||||
public class WebFinalComposer : ComponentComposer<WebFinalComponent>
|
||||
{ }
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Web.Configuration;
|
||||
using System.Web.Http;
|
||||
using System.Web.Http.Dispatcher;
|
||||
using System.Web.Mvc;
|
||||
using ClientDependency.Core.CompositeFiles.Providers;
|
||||
using ClientDependency.Core.Config;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Composing;
|
||||
using Umbraco.Core.Configuration;
|
||||
using Umbraco.Core.IO;
|
||||
using Umbraco.Web.JavaScript;
|
||||
using Umbraco.Web.Mvc;
|
||||
using Umbraco.Web.WebApi;
|
||||
|
||||
using Current = Umbraco.Web.Composing.Current;
|
||||
|
||||
namespace Umbraco.Web.Runtime
|
||||
{
|
||||
public sealed class WebInitialComponent : IComponent
|
||||
{
|
||||
private readonly IGlobalSettings _globalSettings;
|
||||
|
||||
public WebInitialComponent(IGlobalSettings globalSettings)
|
||||
{
|
||||
_globalSettings = globalSettings;
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
// setup mvc and webapi services
|
||||
SetupMvcAndWebApi();
|
||||
|
||||
// When using a non-web runtime and this component is loaded ClientDependency explodes because it'll
|
||||
// want to access HttpContext.Current, which doesn't exist
|
||||
if (IOHelper.IsHosted)
|
||||
{
|
||||
ConfigureClientDependency(_globalSettings);
|
||||
}
|
||||
|
||||
// Disable the X-AspNetMvc-Version HTTP Header
|
||||
MvcHandler.DisableMvcResponseHeader = true;
|
||||
|
||||
// wrap view engines in the profiling engine
|
||||
WrapViewEngines(ViewEngines.Engines);
|
||||
|
||||
// add global filters
|
||||
ConfigureGlobalFilters();
|
||||
}
|
||||
|
||||
public void Terminate()
|
||||
{ }
|
||||
|
||||
private static void ConfigureGlobalFilters()
|
||||
{
|
||||
GlobalFilters.Filters.Add(new EnsurePartialViewMacroViewContextFilterAttribute());
|
||||
}
|
||||
|
||||
// internal for tests
|
||||
internal static void WrapViewEngines(IList<IViewEngine> viewEngines)
|
||||
{
|
||||
if (viewEngines == null || viewEngines.Count == 0) return;
|
||||
|
||||
var originalEngines = viewEngines.ToList();
|
||||
viewEngines.Clear();
|
||||
foreach (var engine in originalEngines)
|
||||
{
|
||||
var wrappedEngine = engine is ProfilingViewEngine ? engine : new ProfilingViewEngine(engine);
|
||||
viewEngines.Add(wrappedEngine);
|
||||
}
|
||||
}
|
||||
|
||||
private static void SetupMvcAndWebApi()
|
||||
{
|
||||
//don't output the MVC version header (security)
|
||||
MvcHandler.DisableMvcResponseHeader = true;
|
||||
|
||||
// set master controller factory
|
||||
var controllerFactory = new MasterControllerFactory(() => Current.FilteredControllerFactories);
|
||||
ControllerBuilder.Current.SetControllerFactory(controllerFactory);
|
||||
|
||||
// set the render & plugin view engines
|
||||
ViewEngines.Engines.Add(new RenderViewEngine());
|
||||
ViewEngines.Engines.Add(new PluginViewEngine());
|
||||
|
||||
//set model binder
|
||||
ModelBinderProviders.BinderProviders.Add(ContentModelBinder.Instance); // is a provider
|
||||
|
||||
////add the profiling action filter
|
||||
//GlobalFilters.Filters.Add(new ProfilingActionFilter());
|
||||
|
||||
GlobalConfiguration.Configuration.Services.Replace(typeof(IHttpControllerSelector),
|
||||
new NamespaceHttpControllerSelector(GlobalConfiguration.Configuration));
|
||||
}
|
||||
|
||||
private static void ConfigureClientDependency(IGlobalSettings globalSettings)
|
||||
{
|
||||
// Backwards compatibility - set the path and URL type for ClientDependency 1.5.1 [LK]
|
||||
XmlFileMapper.FileMapDefaultFolder = SystemDirectories.TempData.EnsureEndsWith('/') + "ClientDependency";
|
||||
BaseCompositeFileProcessingProvider.UrlTypeDefault = CompositeUrlType.Base64QueryStrings;
|
||||
|
||||
// Now we need to detect if we are running 'Umbraco.Core.LocalTempStorage' as EnvironmentTemp and in that case we want to change the CDF file
|
||||
// location to be there
|
||||
if (globalSettings.LocalTempStorageLocation == LocalTempStorage.EnvironmentTemp)
|
||||
{
|
||||
var cachePath = globalSettings.LocalTempPath;
|
||||
|
||||
//set the file map and composite file default location to the %temp% location
|
||||
BaseCompositeFileProcessingProvider.CompositeFilePathDefaultFolder
|
||||
= XmlFileMapper.FileMapDefaultFolder
|
||||
= Path.Combine(cachePath, "ClientDependency");
|
||||
}
|
||||
|
||||
if (ConfigurationManager.GetSection("system.web/httpRuntime") is HttpRuntimeSection section)
|
||||
{
|
||||
//set the max url length for CDF to be the smallest of the max query length, max request length
|
||||
ClientDependency.Core.CompositeFiles.CompositeDependencyHandler.MaxHandlerUrlLength = Math.Min(section.MaxQueryStringLength, section.MaxRequestLength);
|
||||
}
|
||||
|
||||
//Register a custom renderer - used to process property editor dependencies
|
||||
var renderer = new DependencyPathRenderer();
|
||||
renderer.Initialize("Umbraco.DependencyPathRenderer", new NameValueCollection
|
||||
{
|
||||
{ "compositeFileHandlerPath", ClientDependencySettings.Instance.CompositeFileHandlerPath }
|
||||
});
|
||||
|
||||
ClientDependencySettings.Instance.MvcRendererCollection.Add(renderer);
|
||||
}
|
||||
}
|
||||
}
|
||||
+10
-10
@@ -44,8 +44,10 @@ using Current = Umbraco.Web.Composing.Current;
|
||||
|
||||
namespace Umbraco.Web.Runtime
|
||||
{
|
||||
[ComposeAfter(typeof(CoreRuntimeComposer))]
|
||||
public sealed class WebRuntimeComposer : ComponentComposer<WebRuntimeComponent>, IRuntimeComposer
|
||||
// web's initial composer composes after core's, and before all core composers
|
||||
[ComposeAfter(typeof(CoreInitialComposer))]
|
||||
[ComposeBefore(typeof(ICoreComposer))]
|
||||
public sealed class WebInitialComposer : ComponentComposer<WebInitialComponent>
|
||||
{
|
||||
public override void Compose(Composition composition)
|
||||
{
|
||||
@@ -156,12 +158,11 @@ namespace Umbraco.Web.Runtime
|
||||
.Add(() => composition.TypeLoader.GetTypes<IAction>());
|
||||
|
||||
//we need to eagerly scan controller types since they will need to be routed
|
||||
var surfaceControllerTypes = new SurfaceControllerTypeCollection(composition.TypeLoader.GetSurfaceControllers());
|
||||
composition.RegisterUnique(surfaceControllerTypes);
|
||||
|
||||
//we need to eagerly scan controller types since they will need to be routed
|
||||
var umbracoApiControllerTypes = new UmbracoApiControllerTypeCollection(composition.TypeLoader.GetUmbracoApiControllers());
|
||||
composition.RegisterUnique(umbracoApiControllerTypes);
|
||||
composition.WithCollectionBuilder<SurfaceControllerTypeCollectionBuilder>()
|
||||
.Add(composition.TypeLoader.GetSurfaceControllers());
|
||||
var umbracoApiControllerTypes = composition.TypeLoader.GetUmbracoApiControllers().ToList();
|
||||
composition.WithCollectionBuilder<UmbracoApiControllerTypeCollectionBuilder>()
|
||||
.Add(umbracoApiControllerTypes);
|
||||
|
||||
// both TinyMceValueConverter (in Core) and RteMacroRenderingValueConverter (in Web) will be
|
||||
// discovered when CoreBootManager configures the converters. We HAVE to remove one of them
|
||||
@@ -180,8 +181,7 @@ namespace Umbraco.Web.Runtime
|
||||
|
||||
composition.WithCollectionBuilder<UrlProviderCollectionBuilder>()
|
||||
.Append<AliasUrlProvider>()
|
||||
.Append<DefaultUrlProvider>()
|
||||
.Append<CustomRouteUrlProvider>();
|
||||
.Append<DefaultUrlProvider>();
|
||||
|
||||
composition.RegisterUnique<IContentLastChanceFinder, ContentFinderByConfigured404>();
|
||||
|
||||
@@ -1,265 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Configuration;
|
||||
using System.Web.Http;
|
||||
using System.Web.Http.Dispatcher;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
using ClientDependency.Core.CompositeFiles.Providers;
|
||||
using ClientDependency.Core.Config;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Composing;
|
||||
using Umbraco.Core.Configuration;
|
||||
using Umbraco.Core.Configuration.UmbracoSettings;
|
||||
using Umbraco.Core.IO;
|
||||
using Umbraco.Core.Models.PublishedContent;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Web.Install;
|
||||
using Umbraco.Web.JavaScript;
|
||||
using Umbraco.Web.Models.Trees;
|
||||
using Umbraco.Web.Mvc;
|
||||
using Umbraco.Web.PublishedCache;
|
||||
using Umbraco.Web.Routing;
|
||||
using Umbraco.Web.Security;
|
||||
using Umbraco.Web.Trees;
|
||||
using Umbraco.Web.WebApi;
|
||||
|
||||
using Current = Umbraco.Web.Composing.Current;
|
||||
|
||||
namespace Umbraco.Web.Runtime
|
||||
{
|
||||
public sealed class WebRuntimeComponent : IComponent
|
||||
{
|
||||
private readonly IUmbracoContextAccessor _umbracoContextAccessor;
|
||||
private readonly SurfaceControllerTypeCollection _surfaceControllerTypes;
|
||||
private readonly UmbracoApiControllerTypeCollection _apiControllerTypes;
|
||||
private readonly IPublishedSnapshotService _publishedSnapshotService;
|
||||
private readonly IUserService _userService;
|
||||
private readonly IUmbracoSettingsSection _umbracoSettings;
|
||||
private readonly IGlobalSettings _globalSettings;
|
||||
private readonly IVariationContextAccessor _variationContextAccessor;
|
||||
private readonly UrlProviderCollection _urlProviders;
|
||||
|
||||
public WebRuntimeComponent(
|
||||
IUmbracoContextAccessor umbracoContextAccessor,
|
||||
SurfaceControllerTypeCollection surfaceControllerTypes,
|
||||
UmbracoApiControllerTypeCollection apiControllerTypes,
|
||||
IPublishedSnapshotService publishedSnapshotService,
|
||||
IUserService userService,
|
||||
IUmbracoSettingsSection umbracoSettings,
|
||||
IGlobalSettings globalSettings,
|
||||
IVariationContextAccessor variationContextAccessor,
|
||||
UrlProviderCollection urlProviders)
|
||||
{
|
||||
_umbracoContextAccessor = umbracoContextAccessor;
|
||||
_surfaceControllerTypes = surfaceControllerTypes;
|
||||
_apiControllerTypes = apiControllerTypes;
|
||||
_publishedSnapshotService = publishedSnapshotService;
|
||||
_userService = userService;
|
||||
_umbracoSettings = umbracoSettings;
|
||||
_globalSettings = globalSettings;
|
||||
_variationContextAccessor = variationContextAccessor;
|
||||
_urlProviders = urlProviders;
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
// setup mvc and webapi services
|
||||
SetupMvcAndWebApi();
|
||||
|
||||
// When using a non-web runtime and this component is loaded ClientDependency explodes because it'll
|
||||
// want to access HttpContext.Current, which doesn't exist
|
||||
if (IOHelper.IsHosted)
|
||||
{
|
||||
ConfigureClientDependency(_globalSettings);
|
||||
}
|
||||
|
||||
// Disable the X-AspNetMvc-Version HTTP Header
|
||||
MvcHandler.DisableMvcResponseHeader = true;
|
||||
|
||||
// wrap view engines in the profiling engine
|
||||
WrapViewEngines(ViewEngines.Engines);
|
||||
|
||||
// add global filters
|
||||
ConfigureGlobalFilters();
|
||||
|
||||
// set routes
|
||||
CreateRoutes(_umbracoContextAccessor, _globalSettings, _surfaceControllerTypes, _apiControllerTypes);
|
||||
|
||||
// ensure WebAPI is initialized, after everything
|
||||
GlobalConfiguration.Configuration.EnsureInitialized();
|
||||
}
|
||||
|
||||
public void Terminate()
|
||||
{ }
|
||||
|
||||
private static void ConfigureGlobalFilters()
|
||||
{
|
||||
GlobalFilters.Filters.Add(new EnsurePartialViewMacroViewContextFilterAttribute());
|
||||
}
|
||||
|
||||
// internal for tests
|
||||
internal static void WrapViewEngines(IList<IViewEngine> viewEngines)
|
||||
{
|
||||
if (viewEngines == null || viewEngines.Count == 0) return;
|
||||
|
||||
var originalEngines = viewEngines.ToList();
|
||||
viewEngines.Clear();
|
||||
foreach (var engine in originalEngines)
|
||||
{
|
||||
var wrappedEngine = engine is ProfilingViewEngine ? engine : new ProfilingViewEngine(engine);
|
||||
viewEngines.Add(wrappedEngine);
|
||||
}
|
||||
}
|
||||
|
||||
// internal for tests
|
||||
internal static void CreateRoutes(
|
||||
IUmbracoContextAccessor umbracoContextAccessor,
|
||||
IGlobalSettings globalSettings,
|
||||
SurfaceControllerTypeCollection surfaceControllerTypes,
|
||||
UmbracoApiControllerTypeCollection apiControllerTypes)
|
||||
{
|
||||
var umbracoPath = globalSettings.GetUmbracoMvcArea();
|
||||
|
||||
// create the front-end route
|
||||
var defaultRoute = RouteTable.Routes.MapRoute(
|
||||
"Umbraco_default",
|
||||
umbracoPath + "/RenderMvc/{action}/{id}",
|
||||
new { controller = "RenderMvc", action = "Index", id = UrlParameter.Optional }
|
||||
);
|
||||
defaultRoute.RouteHandler = new RenderRouteHandler(umbracoContextAccessor, ControllerBuilder.Current.GetControllerFactory());
|
||||
|
||||
// register install routes
|
||||
RouteTable.Routes.RegisterArea<UmbracoInstallArea>();
|
||||
|
||||
// register all back office routes
|
||||
RouteTable.Routes.RegisterArea(new BackOfficeArea(globalSettings));
|
||||
|
||||
// plugin controllers must come first because the next route will catch many things
|
||||
RoutePluginControllers(globalSettings, surfaceControllerTypes, apiControllerTypes);
|
||||
}
|
||||
|
||||
private static void RoutePluginControllers(
|
||||
IGlobalSettings globalSettings,
|
||||
SurfaceControllerTypeCollection surfaceControllerTypes,
|
||||
UmbracoApiControllerTypeCollection apiControllerTypes)
|
||||
{
|
||||
var umbracoPath = globalSettings.GetUmbracoMvcArea();
|
||||
|
||||
// need to find the plugin controllers and route them
|
||||
var pluginControllers = surfaceControllerTypes.Concat(apiControllerTypes).ToArray();
|
||||
|
||||
// local controllers do not contain the attribute
|
||||
var localControllers = pluginControllers.Where(x => PluginController.GetMetadata(x).AreaName.IsNullOrWhiteSpace());
|
||||
foreach (var s in localControllers)
|
||||
{
|
||||
if (TypeHelper.IsTypeAssignableFrom<SurfaceController>(s))
|
||||
RouteLocalSurfaceController(s, umbracoPath);
|
||||
else if (TypeHelper.IsTypeAssignableFrom<UmbracoApiController>(s))
|
||||
RouteLocalApiController(s, umbracoPath);
|
||||
}
|
||||
|
||||
// get the plugin controllers that are unique to each area (group by)
|
||||
var pluginSurfaceControlleres = pluginControllers.Where(x => PluginController.GetMetadata(x).AreaName.IsNullOrWhiteSpace() == false);
|
||||
var groupedAreas = pluginSurfaceControlleres.GroupBy(controller => PluginController.GetMetadata(controller).AreaName);
|
||||
// loop through each area defined amongst the controllers
|
||||
foreach (var g in groupedAreas)
|
||||
{
|
||||
// create & register an area for the controllers (this will throw an exception if all controllers are not in the same area)
|
||||
var pluginControllerArea = new PluginControllerArea(globalSettings, g.Select(PluginController.GetMetadata));
|
||||
RouteTable.Routes.RegisterArea(pluginControllerArea);
|
||||
}
|
||||
}
|
||||
|
||||
private static void RouteLocalApiController(Type controller, string umbracoPath)
|
||||
{
|
||||
var meta = PluginController.GetMetadata(controller);
|
||||
var url = umbracoPath + (meta.IsBackOffice ? "/BackOffice" : "") + "/Api/" + meta.ControllerName + "/{action}/{id}";
|
||||
var route = RouteTable.Routes.MapHttpRoute(
|
||||
$"umbraco-api-{meta.ControllerName}",
|
||||
url, // url to match
|
||||
new { controller = meta.ControllerName, id = UrlParameter.Optional },
|
||||
new[] { meta.ControllerNamespace });
|
||||
if (route.DataTokens == null) // web api routes don't set the data tokens object
|
||||
route.DataTokens = new RouteValueDictionary();
|
||||
route.DataTokens.Add(Core.Constants.Web.UmbracoDataToken, "api"); //ensure the umbraco token is set
|
||||
}
|
||||
|
||||
private static void RouteLocalSurfaceController(Type controller, string umbracoPath)
|
||||
{
|
||||
var meta = PluginController.GetMetadata(controller);
|
||||
var url = umbracoPath + "/Surface/" + meta.ControllerName + "/{action}/{id}";
|
||||
var route = RouteTable.Routes.MapRoute(
|
||||
$"umbraco-surface-{meta.ControllerName}",
|
||||
url, // url to match
|
||||
new { controller = meta.ControllerName, action = "Index", id = UrlParameter.Optional },
|
||||
new[] { meta.ControllerNamespace }); // look in this namespace to create the controller
|
||||
route.DataTokens.Add(Core.Constants.Web.UmbracoDataToken, "surface"); // ensure the umbraco token is set
|
||||
route.DataTokens.Add("UseNamespaceFallback", false); // don't look anywhere else except this namespace!
|
||||
// make it use our custom/special SurfaceMvcHandler
|
||||
route.RouteHandler = new SurfaceRouteHandler();
|
||||
}
|
||||
|
||||
private static void SetupMvcAndWebApi()
|
||||
{
|
||||
//don't output the MVC version header (security)
|
||||
MvcHandler.DisableMvcResponseHeader = true;
|
||||
|
||||
// set master controller factory
|
||||
var controllerFactory = new MasterControllerFactory(() => Current.FilteredControllerFactories);
|
||||
ControllerBuilder.Current.SetControllerFactory(controllerFactory);
|
||||
|
||||
// set the render & plugin view engines
|
||||
ViewEngines.Engines.Add(new RenderViewEngine());
|
||||
ViewEngines.Engines.Add(new PluginViewEngine());
|
||||
|
||||
//set model binder
|
||||
ModelBinderProviders.BinderProviders.Add(ContentModelBinder.Instance); // is a provider
|
||||
|
||||
////add the profiling action filter
|
||||
//GlobalFilters.Filters.Add(new ProfilingActionFilter());
|
||||
|
||||
GlobalConfiguration.Configuration.Services.Replace(typeof(IHttpControllerSelector),
|
||||
new NamespaceHttpControllerSelector(GlobalConfiguration.Configuration));
|
||||
}
|
||||
|
||||
private static void ConfigureClientDependency(IGlobalSettings globalSettings)
|
||||
{
|
||||
// Backwards compatibility - set the path and URL type for ClientDependency 1.5.1 [LK]
|
||||
XmlFileMapper.FileMapDefaultFolder = SystemDirectories.TempData.EnsureEndsWith('/') + "ClientDependency";
|
||||
BaseCompositeFileProcessingProvider.UrlTypeDefault = CompositeUrlType.Base64QueryStrings;
|
||||
|
||||
// Now we need to detect if we are running 'Umbraco.Core.LocalTempStorage' as EnvironmentTemp and in that case we want to change the CDF file
|
||||
// location to be there
|
||||
if (globalSettings.LocalTempStorageLocation == LocalTempStorage.EnvironmentTemp)
|
||||
{
|
||||
var cachePath = globalSettings.LocalTempPath;
|
||||
|
||||
//set the file map and composite file default location to the %temp% location
|
||||
BaseCompositeFileProcessingProvider.CompositeFilePathDefaultFolder
|
||||
= XmlFileMapper.FileMapDefaultFolder
|
||||
= Path.Combine(cachePath, "ClientDependency");
|
||||
}
|
||||
|
||||
if (ConfigurationManager.GetSection("system.web/httpRuntime") is HttpRuntimeSection section)
|
||||
{
|
||||
//set the max url length for CDF to be the smallest of the max query length, max request length
|
||||
ClientDependency.Core.CompositeFiles.CompositeDependencyHandler.MaxHandlerUrlLength = Math.Min(section.MaxQueryStringLength, section.MaxRequestLength);
|
||||
}
|
||||
|
||||
//Register a custom renderer - used to process property editor dependencies
|
||||
var renderer = new DependencyPathRenderer();
|
||||
renderer.Initialize("Umbraco.DependencyPathRenderer", new NameValueCollection
|
||||
{
|
||||
{ "compositeFileHandlerPath", ClientDependencySettings.Instance.CompositeFileHandlerPath }
|
||||
});
|
||||
|
||||
ClientDependencySettings.Instance.MvcRendererCollection.Add(renderer);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -204,6 +204,7 @@
|
||||
<Compile Include="Models\ContentEditing\MacroParameterDisplay.cs" />
|
||||
<Compile Include="Models\PublishedContent\HybridVariationContextAccessor.cs" />
|
||||
<Compile Include="Models\TemplateQuery\QueryConditionExtensions.cs" />
|
||||
<Compile Include="Mvc\SurfaceControllerTypeCollectionBuilder.cs" />
|
||||
<Compile Include="Routing\IPublishedRouter.cs" />
|
||||
<Compile Include="Services\DashboardService.cs" />
|
||||
<Compile Include="Services\IDashboardService.cs" />
|
||||
@@ -253,7 +254,7 @@
|
||||
<Compile Include="PropertyEditors\PropertyEditorsComposer.cs" />
|
||||
<Compile Include="PublishedCache\NuCache\NuCacheComposer.cs" />
|
||||
<Compile Include="Routing\RedirectTrackingComposer.cs" />
|
||||
<Compile Include="Runtime\WebRuntimeComposer.cs" />
|
||||
<Compile Include="Runtime\WebInitialComposer.cs" />
|
||||
<Compile Include="Scheduling\SchedulerComposer.cs" />
|
||||
<Compile Include="Search\ExamineComposer.cs" />
|
||||
<Compile Include="Search\GenericIndexDiagnostics.cs" />
|
||||
@@ -603,9 +604,10 @@
|
||||
<Compile Include="Editors\Filters\MemberSaveValidationAttribute.cs" />
|
||||
<Compile Include="WebApi\SessionHttpControllerRouteHandler.cs" />
|
||||
<Compile Include="WebApi\UmbracoApiControllerTypeCollection.cs" />
|
||||
<Compile Include="WebApi\UmbracoApiControllerTypeCollectionBuilder.cs" />
|
||||
<Compile Include="WebApi\UnhandedExceptionLoggerConfigurationAttribute.cs" />
|
||||
<Compile Include="WebApi\UnhandledExceptionLogger.cs" />
|
||||
<Compile Include="Runtime\WebRuntimeComponent.cs" />
|
||||
<Compile Include="Runtime\WebInitialComponent.cs" />
|
||||
<Compile Include="Editors\PublishedStatusController.cs" />
|
||||
<Compile Include="Editors\NuCacheStatusController.cs" />
|
||||
<Compile Include="Actions\ActionAssignDomain.cs" />
|
||||
@@ -875,7 +877,6 @@
|
||||
<Compile Include="PublishedContentQuery.cs" />
|
||||
<Compile Include="ImageCropperTemplateExtensions.cs" />
|
||||
<Compile Include="Mvc\UmbracoVirtualNodeRouteHandler.cs" />
|
||||
<Compile Include="Routing\CustomRouteUrlProvider.cs" />
|
||||
<Compile Include="Routing\UrlProviderExtensions.cs" />
|
||||
<Compile Include="Scheduling\BackgroundTaskRunnerOptions.cs" />
|
||||
<Compile Include="Scheduling\IBackgroundTaskRunner.cs" />
|
||||
@@ -1186,6 +1187,8 @@
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WebViewPageExtensions.cs" />
|
||||
<Compile Include="Runtime\WebFinalComponent.cs" />
|
||||
<Compile Include="Runtime\WebFinalComposer.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="JavaScript\Resources.resx">
|
||||
|
||||
@@ -28,13 +28,13 @@ namespace Umbraco.Web
|
||||
|
||||
private readonly IUmbracoSettingsSection _umbracoSettings;
|
||||
private readonly IGlobalSettings _globalSettings;
|
||||
private readonly IEnumerable<IUrlProvider> _urlProviders;
|
||||
private readonly UrlProviderCollection _urlProviders;
|
||||
private readonly IUserService _userService;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="UmbracoContextFactory"/> class.
|
||||
/// </summary>
|
||||
public UmbracoContextFactory(IUmbracoContextAccessor umbracoContextAccessor, IPublishedSnapshotService publishedSnapshotService, IVariationContextAccessor variationContextAccessor, IDefaultCultureAccessor defaultCultureAccessor, IUmbracoSettingsSection umbracoSettings, IGlobalSettings globalSettings, IEnumerable<IUrlProvider> urlProviders, IUserService userService)
|
||||
public UmbracoContextFactory(IUmbracoContextAccessor umbracoContextAccessor, IPublishedSnapshotService publishedSnapshotService, IVariationContextAccessor variationContextAccessor, IDefaultCultureAccessor defaultCultureAccessor, IUmbracoSettingsSection umbracoSettings, IGlobalSettings globalSettings, UrlProviderCollection urlProviders, IUserService userService)
|
||||
{
|
||||
_umbracoContextAccessor = umbracoContextAccessor ?? throw new ArgumentNullException(nameof(umbracoContextAccessor));
|
||||
_publishedSnapshotService = publishedSnapshotService ?? throw new ArgumentNullException(nameof(publishedSnapshotService));
|
||||
@@ -65,7 +65,7 @@ namespace Umbraco.Web
|
||||
if (currentUmbracoContext != null)
|
||||
return new UmbracoContextReference(currentUmbracoContext, false, _umbracoContextAccessor);
|
||||
|
||||
|
||||
|
||||
httpContext = httpContext ?? new HttpContextWrapper(HttpContext.Current ?? new HttpContext(new SimpleWorkerRequest("null.aspx", "", NullWriterInstance)));
|
||||
|
||||
var umbracoContext = CreateUmbracoContext(httpContext);
|
||||
|
||||
@@ -11,7 +11,7 @@ using Umbraco.Core.Configuration;
|
||||
namespace Umbraco.Web.WebApi.Filters
|
||||
{
|
||||
/// <summary>
|
||||
/// If umbracoUseSSL property in web.config is set to true, this filter will redirect any http access to https.
|
||||
/// If Umbraco.Core.UseHttps property in web.config is set to true, this filter will redirect any http access to https.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This will only redirect Head/Get requests, otherwise will respond with text
|
||||
|
||||
@@ -4,10 +4,6 @@ using Umbraco.Core.Composing;
|
||||
|
||||
namespace Umbraco.Web.WebApi
|
||||
{
|
||||
// unless we want to modify the content of the collection
|
||||
// which we are not doing at the moment
|
||||
// we can inherit from BuilderCollectionBase and just be enumerable
|
||||
|
||||
public class UmbracoApiControllerTypeCollection : BuilderCollectionBase<Type>
|
||||
{
|
||||
public UmbracoApiControllerTypeCollection(IEnumerable<Type> items)
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
using Umbraco.Core.Composing;
|
||||
|
||||
namespace Umbraco.Web.WebApi
|
||||
{
|
||||
public class UmbracoApiControllerTypeCollectionBuilder : TypeCollectionBuilderBase<UmbracoApiControllerTypeCollection, UmbracoApiController>
|
||||
{ }
|
||||
}
|
||||
Reference in New Issue
Block a user