From 7674f6774ef3bd32137810b4a19274a91e3d5d6e Mon Sep 17 00:00:00 2001 From: Suha Can Date: Fri, 5 Feb 2010 15:29:49 -0800 Subject: [PATCH] Setup is now a package, instead of a core extension --HG-- branch : dev --- src/Orchard.Web/Core/Orchard.Core.csproj | 12 -- src/Orchard.Web/Orchard.Web.csproj | 4 + .../SqlDatabaseConnectionStringAttribute.cs | 2 +- .../Annotations/StringLengthMin.cs | 2 +- .../Controllers/SetupController.cs | 4 +- .../Orchard.Setup/Orchard.Setup.csproj | 133 +++++++++++++++ .../Orchard.Setup}/Package.txt | 0 .../Orchard.Setup/Properties/AssemblyInfo.cs | 34 ++++ .../Orchard.Setup}/Routes.cs | 8 +- .../Orchard.Setup}/Services/ISetupService.cs | 2 +- .../Orchard.Setup}/Services/SetupService.cs | 2 +- .../ViewModels/SetupViewModel.cs | 4 +- .../Orchard.Setup}/Views/Setup/Index.ascx | 3 +- .../Orchard.Setup}/Views/Web.config | 0 .../Packages/Orchard.Setup/Web.config | 154 ++++++++++++++++++ src/Orchard.sln | 7 + .../SafeModeShellContainerFactory.cs | 6 +- 17 files changed, 349 insertions(+), 28 deletions(-) rename src/Orchard.Web/{Core/Setup => Packages/Orchard.Setup}/Annotations/SqlDatabaseConnectionStringAttribute.cs (91%) rename src/Orchard.Web/{Core/Setup => Packages/Orchard.Setup}/Annotations/StringLengthMin.cs (90%) rename src/Orchard.Web/{Core/Setup => Packages/Orchard.Setup}/Controllers/SetupController.cs (88%) create mode 100644 src/Orchard.Web/Packages/Orchard.Setup/Orchard.Setup.csproj rename src/Orchard.Web/{Core/Setup => Packages/Orchard.Setup}/Package.txt (100%) create mode 100644 src/Orchard.Web/Packages/Orchard.Setup/Properties/AssemblyInfo.cs rename src/Orchard.Web/{Core/Setup => Packages/Orchard.Setup}/Routes.cs (87%) rename src/Orchard.Web/{Core/Setup => Packages/Orchard.Setup}/Services/ISetupService.cs (55%) rename src/Orchard.Web/{Core/Setup => Packages/Orchard.Setup}/Services/SetupService.cs (88%) rename src/Orchard.Web/{Core/Setup => Packages/Orchard.Setup}/ViewModels/SetupViewModel.cs (84%) rename src/Orchard.Web/{Core/Setup => Packages/Orchard.Setup}/Views/Setup/Index.ascx (92%) rename src/Orchard.Web/{Core/Setup => Packages/Orchard.Setup}/Views/Web.config (100%) create mode 100644 src/Orchard.Web/Packages/Orchard.Setup/Web.config diff --git a/src/Orchard.Web/Core/Orchard.Core.csproj b/src/Orchard.Web/Core/Orchard.Core.csproj index dd198ab39..1d3c618c5 100644 --- a/src/Orchard.Web/Core/Orchard.Core.csproj +++ b/src/Orchard.Web/Core/Orchard.Core.csproj @@ -111,13 +111,6 @@ - - - - - - - @@ -189,7 +182,6 @@ - @@ -208,10 +200,6 @@ - - - - diff --git a/src/Orchard.Web/Orchard.Web.csproj b/src/Orchard.Web/Orchard.Web.csproj index 6810d14cd..24fa964f9 100644 --- a/src/Orchard.Web/Orchard.Web.csproj +++ b/src/Orchard.Web/Orchard.Web.csproj @@ -128,6 +128,10 @@ {D10AD48F-407D-4DB5-A328-173EC7CB010F} Orchard.Roles + + {8C7FCBC2-E6E1-405E-BFB5-D8D9E67A09C4} + Orchard.Setup + {5D0F00F0-26C9-4785-AD61-B85710C60EB0} Orchard.Tags diff --git a/src/Orchard.Web/Core/Setup/Annotations/SqlDatabaseConnectionStringAttribute.cs b/src/Orchard.Web/Packages/Orchard.Setup/Annotations/SqlDatabaseConnectionStringAttribute.cs similarity index 91% rename from src/Orchard.Web/Core/Setup/Annotations/SqlDatabaseConnectionStringAttribute.cs rename to src/Orchard.Web/Packages/Orchard.Setup/Annotations/SqlDatabaseConnectionStringAttribute.cs index 82dff4e80..4296e23b3 100644 --- a/src/Orchard.Web/Core/Setup/Annotations/SqlDatabaseConnectionStringAttribute.cs +++ b/src/Orchard.Web/Packages/Orchard.Setup/Annotations/SqlDatabaseConnectionStringAttribute.cs @@ -1,7 +1,7 @@ using System.ComponentModel.DataAnnotations; using System.Data.SqlClient; -namespace Orchard.Core.Setup.Annotations { +namespace Orchard.Setup.Annotations { public class SqlDatabaseConnectionStringAttribute : ValidationAttribute { public override bool IsValid(object value) { if (value is string && ((string)value).Length > 0) { diff --git a/src/Orchard.Web/Core/Setup/Annotations/StringLengthMin.cs b/src/Orchard.Web/Packages/Orchard.Setup/Annotations/StringLengthMin.cs similarity index 90% rename from src/Orchard.Web/Core/Setup/Annotations/StringLengthMin.cs rename to src/Orchard.Web/Packages/Orchard.Setup/Annotations/StringLengthMin.cs index d999d2a6c..865bb2606 100644 --- a/src/Orchard.Web/Core/Setup/Annotations/StringLengthMin.cs +++ b/src/Orchard.Web/Packages/Orchard.Setup/Annotations/StringLengthMin.cs @@ -1,7 +1,7 @@ using System; using System.ComponentModel.DataAnnotations; -namespace Orchard.Core.Setup.Annotations { +namespace Orchard.Setup.Annotations { public class StringLengthMin : ValidationAttribute { private readonly int _minimumLength; diff --git a/src/Orchard.Web/Core/Setup/Controllers/SetupController.cs b/src/Orchard.Web/Packages/Orchard.Setup/Controllers/SetupController.cs similarity index 88% rename from src/Orchard.Web/Core/Setup/Controllers/SetupController.cs rename to src/Orchard.Web/Packages/Orchard.Setup/Controllers/SetupController.cs index 8e6b0f2f7..d277edca5 100644 --- a/src/Orchard.Web/Core/Setup/Controllers/SetupController.cs +++ b/src/Orchard.Web/Packages/Orchard.Setup/Controllers/SetupController.cs @@ -1,9 +1,9 @@ using System.Web.Mvc; -using Orchard.Core.Setup.ViewModels; +using Orchard.Setup.ViewModels; using Orchard.Localization; using Orchard.UI.Notify; -namespace Orchard.Core.Setup.Controllers { +namespace Orchard.Setup.Controllers { public class SetupController : Controller { private readonly INotifier _notifier; diff --git a/src/Orchard.Web/Packages/Orchard.Setup/Orchard.Setup.csproj b/src/Orchard.Web/Packages/Orchard.Setup/Orchard.Setup.csproj new file mode 100644 index 000000000..e68a1a48f --- /dev/null +++ b/src/Orchard.Web/Packages/Orchard.Setup/Orchard.Setup.csproj @@ -0,0 +1,133 @@ + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {8C7FCBC2-E6E1-405E-BFB5-D8D9E67A09C4} + {F85E285D-A4E0-4152-9332-AB1D724D3325};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} + Library + Properties + Orchard.Setup + Orchard.Setup + v3.5 + false + + + true + full + false + bin\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\ + TRACE + prompt + 4 + + + + + + 3.5 + + + 3.5 + + + 3.5 + + + False + ..\..\..\..\lib\aspnetmvc\System.Web.Mvc.dll + + + 3.5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} + Orchard + + + + + + + + + + + + + + + + $(ProjectDir)\..\Manifests + + + + + + + + + + + + False + True + 16146 + / + + + False + True + http://orchard.codeplex.com/ + False + + + + + \ No newline at end of file diff --git a/src/Orchard.Web/Core/Setup/Package.txt b/src/Orchard.Web/Packages/Orchard.Setup/Package.txt similarity index 100% rename from src/Orchard.Web/Core/Setup/Package.txt rename to src/Orchard.Web/Packages/Orchard.Setup/Package.txt diff --git a/src/Orchard.Web/Packages/Orchard.Setup/Properties/AssemblyInfo.cs b/src/Orchard.Web/Packages/Orchard.Setup/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..007b7ac29 --- /dev/null +++ b/src/Orchard.Web/Packages/Orchard.Setup/Properties/AssemblyInfo.cs @@ -0,0 +1,34 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 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("Orchard.Setup")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyProduct("Orchard")] +[assembly: AssemblyCopyright("Copyright © CodePlex Foundation 2009")] +[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("b263548d-1afe-41ba-9cba-805fe9d2d314")] + +// 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")] diff --git a/src/Orchard.Web/Core/Setup/Routes.cs b/src/Orchard.Web/Packages/Orchard.Setup/Routes.cs similarity index 87% rename from src/Orchard.Web/Core/Setup/Routes.cs rename to src/Orchard.Web/Packages/Orchard.Setup/Routes.cs index 153e79e90..80a8f59f8 100644 --- a/src/Orchard.Web/Core/Setup/Routes.cs +++ b/src/Orchard.Web/Packages/Orchard.Setup/Routes.cs @@ -3,7 +3,7 @@ using System.Web.Mvc; using System.Web.Routing; using Orchard.Mvc.Routes; -namespace Orchard.Core.Setup { +namespace Orchard.Setup { public class Routes : IRouteProvider { public void GetRoutes(ICollection routes) { @@ -17,13 +17,13 @@ namespace Orchard.Core.Setup { Route = new Route( "Setup", new RouteValueDictionary { - {"area", "Setup"}, - {"controller", "Setup"}, + {"area", "Orchard.Setup"}, + {"controller", "Orchard.Setup"}, {"action", "Index"} }, new RouteValueDictionary(), new RouteValueDictionary { - {"area", "Setup"} + {"area", "Orchard.Setup"} }, new MvcRouteHandler()) } diff --git a/src/Orchard.Web/Core/Setup/Services/ISetupService.cs b/src/Orchard.Web/Packages/Orchard.Setup/Services/ISetupService.cs similarity index 55% rename from src/Orchard.Web/Core/Setup/Services/ISetupService.cs rename to src/Orchard.Web/Packages/Orchard.Setup/Services/ISetupService.cs index 17102efb0..5aa207c5c 100644 --- a/src/Orchard.Web/Core/Setup/Services/ISetupService.cs +++ b/src/Orchard.Web/Packages/Orchard.Setup/Services/ISetupService.cs @@ -1,4 +1,4 @@ -namespace Orchard.Core.Setup.Services { +namespace Orchard.Setup.Services { public interface ISetupService : IDependency { } } diff --git a/src/Orchard.Web/Core/Setup/Services/SetupService.cs b/src/Orchard.Web/Packages/Orchard.Setup/Services/SetupService.cs similarity index 88% rename from src/Orchard.Web/Core/Setup/Services/SetupService.cs rename to src/Orchard.Web/Packages/Orchard.Setup/Services/SetupService.cs index 362bc8b87..60ee213f4 100644 --- a/src/Orchard.Web/Core/Setup/Services/SetupService.cs +++ b/src/Orchard.Web/Packages/Orchard.Setup/Services/SetupService.cs @@ -1,7 +1,7 @@ using Orchard.Localization; using Orchard.Logging; -namespace Orchard.Core.Setup.Services { +namespace Orchard.Setup.Services { public class SetupService : ISetupService { public SetupService(IOrchardServices services) { Services = services; diff --git a/src/Orchard.Web/Core/Setup/ViewModels/SetupViewModel.cs b/src/Orchard.Web/Packages/Orchard.Setup/ViewModels/SetupViewModel.cs similarity index 84% rename from src/Orchard.Web/Core/Setup/ViewModels/SetupViewModel.cs rename to src/Orchard.Web/Packages/Orchard.Setup/ViewModels/SetupViewModel.cs index 268f03d20..3de620403 100644 --- a/src/Orchard.Web/Core/Setup/ViewModels/SetupViewModel.cs +++ b/src/Orchard.Web/Packages/Orchard.Setup/ViewModels/SetupViewModel.cs @@ -1,8 +1,8 @@ using System.ComponentModel.DataAnnotations; -using Orchard.Core.Setup.Annotations; +using Orchard.Setup.Annotations; using Orchard.Mvc.ViewModels; -namespace Orchard.Core.Setup.ViewModels { +namespace Orchard.Setup.ViewModels { public class SetupViewModel : BaseViewModel { [Required, StringLength(70)] public string SiteName { get; set; } diff --git a/src/Orchard.Web/Core/Setup/Views/Setup/Index.ascx b/src/Orchard.Web/Packages/Orchard.Setup/Views/Setup/Index.ascx similarity index 92% rename from src/Orchard.Web/Core/Setup/Views/Setup/Index.ascx rename to src/Orchard.Web/Packages/Orchard.Setup/Views/Setup/Index.ascx index 7dec8b586..13b26aa71 100644 --- a/src/Orchard.Web/Core/Setup/Views/Setup/Index.ascx +++ b/src/Orchard.Web/Packages/Orchard.Setup/Views/Setup/Index.ascx @@ -1,5 +1,6 @@ <%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %> -<%@ Import Namespace="Orchard.Core.Setup.ViewModels"%> +<%@ Import Namespace="Orchard.Mvc.Html"%> +<%@ Import Namespace="Orchard.Setup.ViewModels"%>

<%=Html.TitleForPage("Orchard " + _Encoded("Setup"))%>

<% using (Html.BeginFormAntiForgeryPost()) { %> <%=Html.ValidationSummary() %> diff --git a/src/Orchard.Web/Core/Setup/Views/Web.config b/src/Orchard.Web/Packages/Orchard.Setup/Views/Web.config similarity index 100% rename from src/Orchard.Web/Core/Setup/Views/Web.config rename to src/Orchard.Web/Packages/Orchard.Setup/Views/Web.config diff --git a/src/Orchard.Web/Packages/Orchard.Setup/Web.config b/src/Orchard.Web/Packages/Orchard.Setup/Web.config new file mode 100644 index 000000000..8bfa88317 --- /dev/null +++ b/src/Orchard.Web/Packages/Orchard.Setup/Web.config @@ -0,0 +1,154 @@ + + + + + + + +
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Orchard.sln b/src/Orchard.sln index 3b9c434e6..ab71afb2c 100644 --- a/src/Orchard.sln +++ b/src/Orchard.sln @@ -39,6 +39,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Tags", "Orchard.Web EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Pages", "Orchard.Web\Packages\Orchard.Pages\Orchard.Pages.csproj", "{4A9C04A6-0986-4A92-A610-5F59FF273FB9}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Setup", "Orchard.Web\Packages\Orchard.Setup\Orchard.Setup.csproj", "{8C7FCBC2-E6E1-405E-BFB5-D8D9E67A09C4}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -113,6 +115,10 @@ Global {4A9C04A6-0986-4A92-A610-5F59FF273FB9}.Debug|Any CPU.Build.0 = Debug|Any CPU {4A9C04A6-0986-4A92-A610-5F59FF273FB9}.Release|Any CPU.ActiveCfg = Release|Any CPU {4A9C04A6-0986-4A92-A610-5F59FF273FB9}.Release|Any CPU.Build.0 = Release|Any CPU + {8C7FCBC2-E6E1-405E-BFB5-D8D9E67A09C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8C7FCBC2-E6E1-405E-BFB5-D8D9E67A09C4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8C7FCBC2-E6E1-405E-BFB5-D8D9E67A09C4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8C7FCBC2-E6E1-405E-BFB5-D8D9E67A09C4}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -132,5 +138,6 @@ Global {67C1D3AF-A0EC-46B2-BAE1-DF1DA8E0B890} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5} {5D0F00F0-26C9-4785-AD61-B85710C60EB0} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5} {4A9C04A6-0986-4A92-A610-5F59FF273FB9} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5} + {8C7FCBC2-E6E1-405E-BFB5-D8D9E67A09C4} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5} EndGlobalSection EndGlobal diff --git a/src/Orchard/Environment/ShellBuilders/SafeModeShellContainerFactory.cs b/src/Orchard/Environment/ShellBuilders/SafeModeShellContainerFactory.cs index fa80378e9..51735d9df 100644 --- a/src/Orchard/Environment/ShellBuilders/SafeModeShellContainerFactory.cs +++ b/src/Orchard/Environment/ShellBuilders/SafeModeShellContainerFactory.cs @@ -84,9 +84,9 @@ namespace Orchard.Environment.ShellBuilders { routes.Add(new RouteDescriptor { Priority = 100, Route = new Route("{controller}/{action}", - new RouteValueDictionary { { "Area", "Setup" }, { "Controller", "Setup" }, { "Action", "Index" } }, - new RouteValueDictionary { { "Area", "Setup" }, { "Controller", "Setup" }, { "Action", "Index" } }, - new RouteValueDictionary { { "Area", "Setup" } }, + new RouteValueDictionary { { "Area", "Orchard.Setup" }, { "Controller", "Setup" }, { "Action", "Index" } }, + new RouteValueDictionary { { "Area", "Orchard.Setup" }, { "Controller", "Setup" }, { "Action", "Index" } }, + new RouteValueDictionary { { "Area", "Orchard.Setup" } }, new MvcRouteHandler()) }); }