Removing incorrect definition of extension type

There is no such thing as a "Core" extension type.
"Theme" and "Module" are the only valid extension types.

--HG--
branch : dev
This commit is contained in:
Renaud Paquay
2010-12-08 14:44:55 -08:00
parent 9b8a20c222
commit a81d4c0821
3 changed files with 6 additions and 7 deletions

View File

@@ -21,9 +21,9 @@ namespace Orchard.Specs.Bindings {
webApp.GivenIHaveACleanSiteWith(
virtualDirectory,
TableData(
new { extension = DefaultExtensionTypes.Module, names = "Orchard.Setup, Orchard.Pages, Orchard.Blogs, Orchard.Messaging, Orchard.Modules, Orchard.Packaging, Orchard.PublishLater, Orchard.Themes, Orchard.Scripting, Orchard.Widgets, Orchard.Users, Orchard.Roles, Orchard.Comments, Orchard.jQuery, Orchard.Tags, TinyMce" },
new { extension = DefaultExtensionTypes.Core, names = "Common, Dashboard, Feeds, HomePage, Navigation, Contents, Routable, Scheduling, Settings, Shapes, XmlRpc" },
new { extension = DefaultExtensionTypes.Theme, names = "SafeMode, TheAdmin, TheThemeMachine" }));
new { extension = "Module", names = "Orchard.Setup, Orchard.Pages, Orchard.Blogs, Orchard.Messaging, Orchard.Modules, Orchard.Packaging, Orchard.PublishLater, Orchard.Themes, Orchard.Scripting, Orchard.Widgets, Orchard.Users, Orchard.Roles, Orchard.Comments, Orchard.jQuery, Orchard.Tags, TinyMce" },
new { extension = "Core", names = "Common, Dashboard, Feeds, HomePage, Navigation, Contents, Routable, Scheduling, Settings, Shapes, XmlRpc" },
new { extension = "Theme", names = "SafeMode, TheAdmin, TheThemeMachine" }));
webApp.WhenIGoTo("Setup");

View File

@@ -140,13 +140,13 @@ namespace Orchard.Specs.Bindings {
foreach (var row in table.Rows) {
foreach (var name in row["names"].Split(',').Select(x => x.Trim())) {
switch (row["extension"]) {
case DefaultExtensionTypes.Core:
case "Core":
GivenIHaveCore(name);
break;
case DefaultExtensionTypes.Module:
case "Module":
GivenIHaveModule(name);
break;
case DefaultExtensionTypes.Theme:
case "Theme":
GivenIHaveTheme(name);
break;
default:

View File

@@ -4,7 +4,6 @@ namespace Orchard.Environment.Extensions.Models {
public static class DefaultExtensionTypes {
public const string Module = "Module";
public const string Theme = "Theme";
public const string Core = "Core";
public static bool IsModule(string extensionType) {
return string.Equals(extensionType, Module, StringComparison.OrdinalIgnoreCase);