mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-19 18:27:55 +08:00
First version of UpgradeTo14 module
--HG-- branch : autoroute
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
81cb672c85fd980dd3db0515544b79a918e5eb69 src/Orchard.Web/Modules/Orchard.Alias
|
||||
38ee40302540edd0f4671b8110788b295573c345 src/Orchard.Web/Modules/Orchard.Autoroute
|
||||
c54cb640d6bc14c51b9fb9bd78231bb0facec067 src/Orchard.Web/Modules/Orchard.Forms
|
||||
c27801666ed3e8f9b9c7979a837e7d770763352a src/Orchard.Web/Modules/Orchard.Projections
|
||||
2bf79a49eea7006847fc142891d1956882c5e285 src/Orchard.Web/Modules/Orchard.Projections
|
||||
a1ef39ba4e2d0cd78b3c91d6150e841793acb34b src/Orchard.Web/Modules/Orchard.Routable
|
||||
f2a3984789ebe5caf2822ccb9e1d2c953add9c35 src/Orchard.Web/Modules/Orchard.Rules
|
||||
ce578373f907c0a55fd91229a344f0755f290174 src/Orchard.Web/Modules/Orchard.TaskLease
|
||||
|
@@ -71,7 +71,7 @@ namespace Orchard.Specs.Bindings {
|
||||
|
||||
var contentTypeDefinition = new ContentTypeDefinition(name, name);
|
||||
cdm.StoreTypeDefinition(contentTypeDefinition);
|
||||
cdm.AlterTypeDefinition(name, cfg => cfg.WithPart("CommonPart").WithPart("BodyPart").WithPart("RoutePart").WithPart("ContainablePart").Creatable().Draftable());
|
||||
cdm.AlterTypeDefinition(name, cfg => cfg.WithPart("CommonPart").WithPart("BodyPart").WithPart("AutoroutePart").WithPart("ContainablePart").Creatable().Draftable());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@@ -291,18 +291,15 @@ namespace Orchard.Core.Contents.Controllers {
|
||||
if (!Services.Authorizer.Authorize(Permissions.EditContent, contentItem, T("Couldn't edit content")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
// store the previous route in case a back redirection is requested
|
||||
// TODO: (PH:Autoroute) This won't be needed if automatic redirect aliases are implemented; otherwise, needs fixing
|
||||
/*
|
||||
string previousRoute = null;
|
||||
if(contentItem.Has<RoutePart>()
|
||||
if(contentItem.Has<IAliasAspect>()
|
||||
&&!string.IsNullOrWhiteSpace(returnUrl)
|
||||
&& Url.IsLocalUrl(returnUrl)
|
||||
// only if the original returnUrl is the content itself
|
||||
&& String.Equals(returnUrl, Url.ItemDisplayUrl(contentItem), StringComparison.OrdinalIgnoreCase)
|
||||
) {
|
||||
previousRoute = contentItem.As<RoutePart>().Path;
|
||||
}*/
|
||||
previousRoute = contentItem.As<IAliasAspect>().Path;
|
||||
}
|
||||
|
||||
dynamic model = _contentManager.UpdateEditor(contentItem, this);
|
||||
if (!ModelState.IsValid) {
|
||||
@@ -313,15 +310,12 @@ namespace Orchard.Core.Contents.Controllers {
|
||||
|
||||
conditionallyPublish(contentItem);
|
||||
|
||||
// did the route change ?
|
||||
// TODO: (PH:Autoroute) This won't be needed if automatic redirect aliases are implemented; otherwise, needs fixing
|
||||
/*
|
||||
if (!string.IsNullOrWhiteSpace(returnUrl)
|
||||
&& previousRoute != null
|
||||
&& !String.Equals(contentItem.As<RoutePart>().Path, previousRoute, StringComparison.OrdinalIgnoreCase)) {
|
||||
&& !String.Equals(contentItem.As<IAliasAspect>().Path, previousRoute, StringComparison.OrdinalIgnoreCase)) {
|
||||
returnUrl = Url.ItemDisplayUrl(contentItem);
|
||||
}
|
||||
*/
|
||||
|
||||
Services.Notifier.Information(string.IsNullOrWhiteSpace(contentItem.TypeDefinition.DisplayName)
|
||||
? T("Your content has been saved.")
|
||||
: T("Your {0} has been saved.", contentItem.TypeDefinition.DisplayName));
|
||||
|
@@ -88,26 +88,5 @@ namespace Orchard.Blogs {
|
||||
ContentDefinitionManager.AlterTypeDefinition("BlogPost", cfg => cfg.WithPart("CommonPart", p => p.WithSetting("DateEditorSettings.ShowDateEditor", "true")));
|
||||
return 4;
|
||||
}
|
||||
|
||||
public int UpdateFrom4() {
|
||||
|
||||
// TODO: (PH:Autoroute) SQL copy routes and titles and generate aliases for existing items
|
||||
|
||||
ContentDefinitionManager.AlterTypeDefinition("Blog",
|
||||
cfg => cfg
|
||||
.RemovePart("RoutePart")
|
||||
.WithPart("TitlePart")
|
||||
.WithPart("AutoroutePart")
|
||||
);
|
||||
|
||||
ContentDefinitionManager.AlterTypeDefinition("BlogPost",
|
||||
cfg => cfg
|
||||
.RemovePart("RoutePart")
|
||||
.WithPart("TitlePart")
|
||||
.WithPart("AutoroutePart")
|
||||
);
|
||||
|
||||
return 5;
|
||||
}
|
||||
}
|
||||
}
|
@@ -367,10 +367,9 @@ namespace Orchard.Blogs.Services {
|
||||
.Set("description", blogPostPart.Text)
|
||||
.Set("link", url)
|
||||
.Set("permaLink", url);
|
||||
dynamic dBlogPost = blogPostPart;
|
||||
if (dBlogPost.AutoroutePart != null) {
|
||||
blogStruct.Set("wp_slug", dBlogPost.AutoroutePart.Alias);
|
||||
}
|
||||
|
||||
blogStruct.Set("wp_slug", blogPostPart.As<IAliasAspect>().Path);
|
||||
|
||||
|
||||
if (blogPostPart.PublishedUtc != null) {
|
||||
blogStruct.Set("dateCreated", blogPostPart.PublishedUtc);
|
||||
|
@@ -10,7 +10,7 @@ namespace Orchard.Experimental {
|
||||
ContentDefinitionManager.AlterTypeDefinition("ListItem",
|
||||
cfg => cfg
|
||||
.WithPart("CommonPart")
|
||||
.WithPart("RoutePart")
|
||||
.WithPart("AutoroutePart")
|
||||
.WithPart("BodyPart")
|
||||
.WithPart("ContainablePart")
|
||||
.Creatable()
|
||||
|
@@ -27,19 +27,5 @@ namespace Orchard.Lists {
|
||||
ContentDefinitionManager.AlterTypeDefinition("List", cfg => cfg.WithPart("AdminMenuPart", p => p.WithSetting("AdminMenuPartTypeSettings.DefaultPosition", "2")));
|
||||
return 3;
|
||||
}
|
||||
|
||||
public int UpdateFrom3() {
|
||||
|
||||
// TODO: (PH:Autoroute) Copy paths, routes, etc.
|
||||
|
||||
ContentDefinitionManager.AlterTypeDefinition("List",
|
||||
cfg => cfg
|
||||
.RemovePart("RoutePart")
|
||||
.WithPart("TitlePart")
|
||||
.WithPart("AutoroutePart"));
|
||||
|
||||
return 4;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
136
src/Orchard.Web/Modules/UpgrateTo14/Migrations.cs
Normal file
136
src/Orchard.Web/Modules/UpgrateTo14/Migrations.cs
Normal file
@@ -0,0 +1,136 @@
|
||||
using System.Transactions;
|
||||
using Orchard.Alias;
|
||||
using Orchard.Autoroute.Models;
|
||||
using Orchard.Autoroute.Services;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.MetaData;
|
||||
using Orchard.Core.Common.Models;
|
||||
using Orchard.Core.Title.Models;
|
||||
using Orchard.Data;
|
||||
using Orchard.Data.Migration;
|
||||
using Orchard.Data.Migration.Schema;
|
||||
using Orchard.Environment.Configuration;
|
||||
|
||||
namespace UpgrateTo14 {
|
||||
public class UpdateTo14DataMigration : DataMigrationImpl {
|
||||
private readonly IContentManager _contentManager;
|
||||
private readonly IAutorouteService _autorouteService;
|
||||
private readonly IAliasService _aliasService;
|
||||
private readonly ISessionFactoryHolder _sessionFactoryHolder;
|
||||
private readonly ShellSettings _shellSettings;
|
||||
|
||||
public UpdateTo14DataMigration(
|
||||
IContentManager contentManager,
|
||||
IAutorouteService autorouteService,
|
||||
IAliasService aliasService,
|
||||
ISessionFactoryHolder sessionFactoryHolder,
|
||||
ShellSettings shellSettings) {
|
||||
_contentManager = contentManager;
|
||||
_autorouteService = autorouteService;
|
||||
_aliasService = aliasService;
|
||||
_sessionFactoryHolder = sessionFactoryHolder;
|
||||
_shellSettings = shellSettings;
|
||||
}
|
||||
|
||||
public int Create() {
|
||||
|
||||
var sessionFactory = _sessionFactoryHolder.GetSessionFactory();
|
||||
var session = sessionFactory.OpenSession();
|
||||
|
||||
// migrating pages
|
||||
ContentDefinitionManager.AlterTypeDefinition("Page",
|
||||
builder => builder
|
||||
.WithPart("AutoroutePart")
|
||||
.WithPart("TitlePart"));
|
||||
|
||||
var pages = _contentManager.HqlQuery().ForType("Page").List();
|
||||
|
||||
foreach(dynamic page in pages) {
|
||||
var autoroutePart = ((ContentItem)page).As<AutoroutePart>();
|
||||
var titlePart = ((ContentItem)page).As<TitlePart>();
|
||||
|
||||
using (new TransactionScope(TransactionScopeOption.Suppress)) {
|
||||
var command = session.Connection.CreateCommand();
|
||||
command.CommandText = string.Format("SELECT Title, Path FROM {0} WHERE ContentItemRecord_Id = {1}", GetPrefixedTableName("Routable_RoutePartRecord"), autoroutePart.ContentItem.Id);
|
||||
var reader = command.ExecuteReader();
|
||||
reader.Read();
|
||||
var title = reader.GetString(0);
|
||||
var path = reader.GetString(1);
|
||||
reader.Close();
|
||||
|
||||
autoroutePart.DisplayAlias = path;
|
||||
titlePart.Title = title;
|
||||
}
|
||||
|
||||
_autorouteService.PublishAlias(autoroutePart);
|
||||
}
|
||||
|
||||
ContentDefinitionManager.AlterTypeDefinition("Page", builder => builder.RemovePart("RoutePart"));
|
||||
|
||||
// migrating blogs
|
||||
ContentDefinitionManager.AlterTypeDefinition("Blog", builder => builder.WithPart("AutoroutePart").WithPart("TitlePart"));
|
||||
var blogs = _contentManager.HqlQuery().ForType("Blog").List();
|
||||
|
||||
foreach (dynamic blog in blogs) {
|
||||
var autoroutePart = ((ContentItem)blog).As<AutoroutePart>();
|
||||
var titlePart = ((ContentItem)blog).As<TitlePart>();
|
||||
|
||||
using (new TransactionScope(TransactionScopeOption.Suppress)) {
|
||||
var command = session.Connection.CreateCommand();
|
||||
command.CommandText = string.Format("SELECT Title, Path FROM {0} WHERE ContentItemRecord_Id = {1}", GetPrefixedTableName("Routable_RoutePartRecord"), autoroutePart.ContentItem.Id);
|
||||
var reader = command.ExecuteReader();
|
||||
reader.Read();
|
||||
var title = reader.GetString(0);
|
||||
var path = reader.GetString(1);
|
||||
reader.Close();
|
||||
|
||||
autoroutePart.DisplayAlias = path;
|
||||
titlePart.Title = title;
|
||||
}
|
||||
|
||||
_autorouteService.PublishAlias(autoroutePart);
|
||||
}
|
||||
|
||||
// migrating blog posts
|
||||
ContentDefinitionManager.AlterTypeDefinition("BlogPost", builder => builder.WithPart("AutoroutePart").WithPart("TitlePart"));
|
||||
var blogposts = _contentManager.HqlQuery().ForType("BlogPost").List();
|
||||
|
||||
foreach (dynamic blogpost in blogposts) {
|
||||
var autoroutePart = ((ContentItem)blogpost).As<AutoroutePart>();
|
||||
var titlePart = ((ContentItem)blogpost).As<TitlePart>();
|
||||
|
||||
using (new TransactionScope(TransactionScopeOption.Suppress)) {
|
||||
var command = session.Connection.CreateCommand();
|
||||
command.CommandText = string.Format("SELECT Title, Path FROM {0} WHERE ContentItemRecord_Id = {1}", GetPrefixedTableName("Routable_RoutePartRecord"), autoroutePart.ContentItem.Id);
|
||||
var reader = command.ExecuteReader();
|
||||
reader.Read();
|
||||
var title = reader.GetString(0);
|
||||
var path = reader.GetString(1);
|
||||
reader.Close();
|
||||
|
||||
autoroutePart.DisplayAlias = path;
|
||||
titlePart.Title = title;
|
||||
}
|
||||
|
||||
_autorouteService.PublishAlias(autoroutePart);
|
||||
}
|
||||
|
||||
// migrating containers/list
|
||||
// todo
|
||||
|
||||
_autorouteService.CreatePattern("Page", "Title", "{Content.Slug}", "about-us", true);
|
||||
_autorouteService.CreatePattern("Blog", "Title", "{Content.Slug}", "my-blog", true);
|
||||
_autorouteService.CreatePattern("BlogPost", "Blog and Title", "{Content.Container.Path}/{Content.Slug}", "my-blog/a-blog-post", true);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
private string GetPrefixedTableName(string tableName) {
|
||||
if(string.IsNullOrWhiteSpace(_shellSettings.DataTablePrefix)) {
|
||||
return tableName;
|
||||
}
|
||||
|
||||
return _shellSettings.DataTablePrefix + "_" + tableName;
|
||||
}
|
||||
}
|
||||
}
|
11
src/Orchard.Web/Modules/UpgrateTo14/Module.txt
Normal file
11
src/Orchard.Web/Modules/UpgrateTo14/Module.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
Name: UpgrateTo14
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.0
|
||||
OrchardVersion: 1.4
|
||||
Description: Description for the module
|
||||
Features:
|
||||
UpgrateTo14:
|
||||
Description: Description for feature UpgrateTo14.
|
||||
Dependencies: Orchard.Autoroute
|
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("UpgrateTo14")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyProduct("Orchard")]
|
||||
[assembly: AssemblyCopyright("")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("98a13f1d-a41f-498a-9de2-253ade7e0d92")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: SecurityTransparent]
|
25
src/Orchard.Web/Modules/UpgrateTo14/Scripts/Web.config
Normal file
25
src/Orchard.Web/Modules/UpgrateTo14/Scripts/Web.config
Normal file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<appSettings>
|
||||
<add key="webpages:Enabled" value="false" />
|
||||
</appSettings>
|
||||
<system.web>
|
||||
<httpHandlers>
|
||||
<!-- iis6 - for any request in this location, return via managed static file handler -->
|
||||
<add path="*" verb="*" type="System.Web.StaticFileHandler" />
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
accessPolicy 'Script' is to allow for a managed 404 page.
|
||||
-->
|
||||
<add name="StaticFile" path="*" verb="*" modules="StaticFileModule" preCondition="integratedMode" resourceType="File" requireAccess="Read" />
|
||||
</handlers>
|
||||
</system.webServer>
|
||||
</configuration>
|
25
src/Orchard.Web/Modules/UpgrateTo14/Styles/Web.config
Normal file
25
src/Orchard.Web/Modules/UpgrateTo14/Styles/Web.config
Normal file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<appSettings>
|
||||
<add key="webpages:Enabled" value="false" />
|
||||
</appSettings>
|
||||
<system.web>
|
||||
<httpHandlers>
|
||||
<!-- iis6 - for any request in this location, return via managed static file handler -->
|
||||
<add path="*" verb="*" type="System.Web.StaticFileHandler" />
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
accessPolicy 'Script' is to allow for a managed 404 page.
|
||||
-->
|
||||
<add name="StaticFile" path="*" verb="*" modules="StaticFileModule" preCondition="integratedMode" resourceType="File" requireAccess="Read" />
|
||||
</handlers>
|
||||
</system.webServer>
|
||||
</configuration>
|
119
src/Orchard.Web/Modules/UpgrateTo14/UpgrateTo14.csproj
Normal file
119
src/Orchard.Web/Modules/UpgrateTo14/UpgrateTo14.csproj
Normal file
@@ -0,0 +1,119 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{8A9FDB57-342D-49C2-BAFC-D885AAE5CC7C}</ProjectGuid>
|
||||
<ProjectTypeGuids>{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>UpgrateTo14</RootNamespace>
|
||||
<AssemblyName>UpgrateTo14</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<MvcBuildViews>false</MvcBuildViews>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>3.5</OldToolsVersion>
|
||||
<UpgradeBackupLocation />
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="NHibernate">
|
||||
<HintPath>..\..\..\..\lib\fluentnhibernate\NHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Transactions" />
|
||||
<Reference Include="System.Web.DynamicData" />
|
||||
<Reference Include="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\lib\aspnetmvc\System.Web.Mvc.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.Abstractions" />
|
||||
<Reference Include="System.Web.Routing" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Web.config" />
|
||||
<Content Include="Views\Web.config" />
|
||||
<Content Include="Scripts\Web.config" />
|
||||
<Content Include="Styles\Web.config" />
|
||||
<Content Include="Properties\AssemblyInfo.cs" />
|
||||
<Content Include="Module.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\Orchard\Orchard.Framework.csproj">
|
||||
<Project>{2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6}</Project>
|
||||
<Name>Orchard.Framework</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Core\Orchard.Core.csproj">
|
||||
<Project>{9916839C-39FC-4CEB-A5AF-89CA7E87119F}</Project>
|
||||
<Name>Orchard.Core</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Orchard.Alias\Orchard.Alias.csproj">
|
||||
<Project>{475B6C45-B27C-438B-8966-908B9D6D1077}</Project>
|
||||
<Name>Orchard.Alias</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Orchard.Autoroute\Orchard.Autoroute.csproj">
|
||||
<Project>{66FCCD76-2761-47E3-8D11-B45D0001DDAA}</Project>
|
||||
<Name>Orchard.Autoroute</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Migrations.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Controllers\" />
|
||||
<Folder Include="Models\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target> -->
|
||||
<Target Name="AfterBuild" DependsOnTargets="AfterBuildCompiler">
|
||||
<PropertyGroup>
|
||||
<AreasManifestDir>$(ProjectDir)\..\Manifests</AreasManifestDir>
|
||||
</PropertyGroup>
|
||||
<!-- If this is an area child project, uncomment the following line:
|
||||
<CreateAreaManifest AreaName="$(AssemblyName)" AreaType="Child" AreaPath="$(ProjectDir)" ManifestPath="$(AreasManifestDir)" ContentFiles="@(Content)" />
|
||||
-->
|
||||
<!-- If this is an area parent project, uncomment the following lines:
|
||||
<CreateAreaManifest AreaName="$(AssemblyName)" AreaType="Parent" AreaPath="$(ProjectDir)" ManifestPath="$(AreasManifestDir)" ContentFiles="@(Content)" />
|
||||
<CopyAreaManifests ManifestPath="$(AreasManifestDir)" CrossCopy="false" RenameViews="true" />
|
||||
-->
|
||||
</Target>
|
||||
<Target Name="AfterBuildCompiler" Condition="'$(MvcBuildViews)'=='true'">
|
||||
<AspNetCompiler VirtualPath="temp" PhysicalPath="$(ProjectDir)\..\$(ProjectName)" />
|
||||
</Target>
|
||||
<ProjectExtensions />
|
||||
</Project>
|
41
src/Orchard.Web/Modules/UpgrateTo14/Views/Web.config
Normal file
41
src/Orchard.Web/Modules/UpgrateTo14/Views/Web.config
Normal file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<appSettings>
|
||||
<add key="webpages:Enabled" value="false" />
|
||||
</appSettings>
|
||||
<system.web>
|
||||
<httpHandlers>
|
||||
</httpHandlers>
|
||||
|
||||
<!--
|
||||
Enabling request validation in view pages would cause validation to occur
|
||||
after the input has already been processed by the controller. By default
|
||||
MVC performs request validation before a controller processes the input.
|
||||
To change this behavior apply the ValidateInputAttribute to a
|
||||
controller or action.
|
||||
-->
|
||||
<pages
|
||||
validateRequest="false"
|
||||
pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"
|
||||
pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"
|
||||
userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<controls>
|
||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" namespace="System.Web.Mvc" tagPrefix="mvc" />
|
||||
</controls>
|
||||
</pages>
|
||||
</system.web>
|
||||
|
||||
<system.webServer>
|
||||
<validation validateIntegratedModeConfiguration="false"/>
|
||||
<handlers>
|
||||
</handlers>
|
||||
</system.webServer>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
|
||||
<bindingRedirect oldVersion="2.0.0.0" newVersion="3.0.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
41
src/Orchard.Web/Modules/UpgrateTo14/Web.config
Normal file
41
src/Orchard.Web/Modules/UpgrateTo14/Web.config
Normal file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
|
||||
<configSections>
|
||||
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||
<remove name="host" />
|
||||
<remove name="pages" />
|
||||
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
|
||||
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
|
||||
<system.web.webPages.razor>
|
||||
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<pages pageBaseType="Orchard.Mvc.ViewEngines.Razor.WebViewPage">
|
||||
<namespaces>
|
||||
<add namespace="System.Web.Mvc" />
|
||||
<add namespace="System.Web.Mvc.Ajax" />
|
||||
<add namespace="System.Web.Mvc.Html" />
|
||||
<add namespace="System.Web.Routing" />
|
||||
<add namespace="System.Web.WebPages" />
|
||||
<add namespace="System.Linq"/>
|
||||
<add namespace="System.Collections.Generic"/>
|
||||
<add namespace="Orchard.Mvc.Html"/>
|
||||
</namespaces>
|
||||
</pages>
|
||||
</system.web.webPages.razor>
|
||||
|
||||
<system.web>
|
||||
<compilation targetFramework="4.0">
|
||||
<assemblies>
|
||||
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
|
||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
</assemblies>
|
||||
</compilation>
|
||||
</system.web>
|
||||
|
||||
</configuration>
|
@@ -138,6 +138,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Alias", "Orchard.We
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Autoroute", "Orchard.Web\Modules\Orchard.Autoroute\Orchard.Autoroute.csproj", "{66FCCD76-2761-47E3-8D11-B45D0001DDAA}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UpgrateTo14", "Orchard.Web\Modules\UpgrateTo14\UpgrateTo14.csproj", "{8A9FDB57-342D-49C2-BAFC-D885AAE5CC7C}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
CodeCoverage|Any CPU = CodeCoverage|Any CPU
|
||||
@@ -147,6 +149,10 @@ Global
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{8A9FDB57-342D-49C2-BAFC-D885AAE5CC7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8A9FDB57-342D-49C2-BAFC-D885AAE5CC7C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8A9FDB57-342D-49C2-BAFC-D885AAE5CC7C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8A9FDB57-342D-49C2-BAFC-D885AAE5CC7C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{50B779EA-EC00-4699-84C0-03B395C365D2}.CodeCoverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{50B779EA-EC00-4699-84C0-03B395C365D2}.CodeCoverage|Any CPU.Build.0 = Release|Any CPU
|
||||
{50B779EA-EC00-4699-84C0-03B395C365D2}.Coverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
@@ -810,5 +816,6 @@ Global
|
||||
{7354DF37-934B-46CF-A13C-455D5F5F5413} = {3E10BF6D-ADA5-417D-B36C-EBB0660B475E}
|
||||
{34BE9011-A5A9-49DD-9E53-C3D5CA7D7CE3} = {3E10BF6D-ADA5-417D-B36C-EBB0660B475E}
|
||||
{CB70A642-8CEC-4DDE-8C9F-AD08900EC98D} = {74492CBC-7201-417E-BC29-28B4C25A58B0}
|
||||
{8A9FDB57-342D-49C2-BAFC-D885AAE5CC7C} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
Reference in New Issue
Block a user