mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-20 02:37:55 +08:00
Moving default patterns to migrations. Custom patterns can still be defined
in recipes. --HG-- branch : 1.x
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
74eb74be6abec40d498a24a767c48181bf4487cf src/Orchard.Web/Modules/Orchard.Autoroute
|
63605157ddfcc24043bf97245f109a56cf81e2a9 src/Orchard.Web/Modules/Orchard.Autoroute
|
||||||
c54cb640d6bc14c51b9fb9bd78231bb0facec067 src/Orchard.Web/Modules/Orchard.Forms
|
c54cb640d6bc14c51b9fb9bd78231bb0facec067 src/Orchard.Web/Modules/Orchard.Forms
|
||||||
204bdef384f41bb5e463bed6b98a056945a7d839 src/Orchard.Web/Modules/Orchard.Rules
|
204bdef384f41bb5e463bed6b98a056945a7d839 src/Orchard.Web/Modules/Orchard.Rules
|
||||||
ce578373f907c0a55fd91229a344f0755f290174 src/Orchard.Web/Modules/Orchard.TaskLease
|
ce578373f907c0a55fd91229a344f0755f290174 src/Orchard.Web/Modules/Orchard.TaskLease
|
||||||
|
@@ -11,11 +11,11 @@ namespace Orchard.Pages {
|
|||||||
.WithSetting("DateEditorSettings.ShowDateEditor", "true"))
|
.WithSetting("DateEditorSettings.ShowDateEditor", "true"))
|
||||||
.WithPart("PublishLaterPart")
|
.WithPart("PublishLaterPart")
|
||||||
.WithPart("TitlePart")
|
.WithPart("TitlePart")
|
||||||
.WithPart("AutoroutePart", builder => builder
|
.WithPart("AutoroutePart", builder => builder
|
||||||
.WithSetting("AutorouteSettings.AllowCustomPattern", "true")
|
.WithSetting("AutorouteSettings.AllowCustomPattern", "true")
|
||||||
.WithSetting("AutorouteSettings.AutomaticAdjustmentOnEdit", "false")
|
.WithSetting("AutorouteSettings.AutomaticAdjustmentOnEdit", "false")
|
||||||
.WithSetting("AutorouteSettings.PatternDefinitions", "[{Name:'Title', Pattern: '{Content.Slug}', Description: 'my-page'}]")
|
.WithSetting("AutorouteSettings.PatternDefinitions", "[{Name:'Title', Pattern: '{Content.Slug}', Description: 'my-page'}]")
|
||||||
.WithSetting("AutorouteSettings.DefaultPatternIndex", "0"))
|
.WithSetting("AutorouteSettings.DefaultPatternIndex", "0"))
|
||||||
.WithPart("BodyPart")
|
.WithPart("BodyPart")
|
||||||
.Creatable());
|
.Creatable());
|
||||||
|
|
||||||
|
@@ -147,7 +147,7 @@ namespace Orchard.Roles.Services {
|
|||||||
public IEnumerable<string> GetPermissionsForRoleByName(string name) {
|
public IEnumerable<string> GetPermissionsForRoleByName(string name) {
|
||||||
return _cacheManager.Get(name, ctx => {
|
return _cacheManager.Get(name, ctx => {
|
||||||
MonitorSignal(ctx);
|
MonitorSignal(ctx);
|
||||||
return GetPermissionsForRoleByNameInner(name);
|
return GetPermissionsForRoleByNameInner(name).ToList();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -7,6 +7,7 @@ using Orchard.Environment.Extensions;
|
|||||||
using Orchard.Environment.Extensions.Models;
|
using Orchard.Environment.Extensions.Models;
|
||||||
using Orchard.Logging;
|
using Orchard.Logging;
|
||||||
using Orchard.Utility;
|
using Orchard.Utility;
|
||||||
|
using Orchard.Utility.Extensions;
|
||||||
|
|
||||||
namespace Orchard.DisplayManagement.Descriptors {
|
namespace Orchard.DisplayManagement.Descriptors {
|
||||||
|
|
||||||
@@ -41,7 +42,7 @@ namespace Orchard.DisplayManagement.Descriptors {
|
|||||||
|
|
||||||
var builder = new ShapeTableBuilder(strategyDefaultFeature);
|
var builder = new ShapeTableBuilder(strategyDefaultFeature);
|
||||||
bindingStrategy.Value.Discover(builder);
|
bindingStrategy.Value.Discover(builder);
|
||||||
return builder.BuildAlterations().ToList();
|
return builder.BuildAlterations().ToReadOnlyCollection();
|
||||||
});
|
});
|
||||||
|
|
||||||
var alterations = alterationSets
|
var alterations = alterationSets
|
||||||
|
@@ -13,6 +13,7 @@ using Orchard.Environment.Extensions;
|
|||||||
using Orchard.Environment.Extensions.Models;
|
using Orchard.Environment.Extensions.Models;
|
||||||
using Orchard.FileSystems.VirtualPath;
|
using Orchard.FileSystems.VirtualPath;
|
||||||
using Orchard.Logging;
|
using Orchard.Logging;
|
||||||
|
using Orchard.Utility.Extensions;
|
||||||
|
|
||||||
namespace Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy {
|
namespace Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy {
|
||||||
public class ShapeTemplateBindingStrategy : IShapeTableProvider {
|
public class ShapeTemplateBindingStrategy : IShapeTableProvider {
|
||||||
@@ -70,7 +71,7 @@ namespace Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy {
|
|||||||
var virtualPath = Path.Combine(basePath, subPath).Replace(Path.DirectorySeparatorChar, '/');
|
var virtualPath = Path.Combine(basePath, subPath).Replace(Path.DirectorySeparatorChar, '/');
|
||||||
var fileNames = _cacheManager.Get(virtualPath, ctx => {
|
var fileNames = _cacheManager.Get(virtualPath, ctx => {
|
||||||
ctx.Monitor(_virtualPathMonitor.WhenPathChanges(virtualPath));
|
ctx.Monitor(_virtualPathMonitor.WhenPathChanges(virtualPath));
|
||||||
return _virtualPathProvider.ListFiles(virtualPath).Select(Path.GetFileName);
|
return _virtualPathProvider.ListFiles(virtualPath).Select(Path.GetFileName).ToReadOnlyCollection();
|
||||||
});
|
});
|
||||||
return new { harvesterInfo.harvester, basePath, subPath, virtualPath, fileNames };
|
return new { harvesterInfo.harvester, basePath, subPath, virtualPath, fileNames };
|
||||||
})).ToList();
|
})).ToList();
|
||||||
|
@@ -55,7 +55,7 @@ namespace Orchard.Environment.Extensions.Folders {
|
|||||||
|
|
||||||
return _cacheManager.Get(key, ctx => {
|
return _cacheManager.Get(key, ctx => {
|
||||||
ctx.Monitor(_webSiteFolder.WhenPathChanges(path));
|
ctx.Monitor(_webSiteFolder.WhenPathChanges(path));
|
||||||
return AvailableExtensionsInFolder(path, extensionType, manifestName, manifestIsOptional);
|
return AvailableExtensionsInFolder(path, extensionType, manifestName, manifestIsOptional).ToReadOnlyCollection();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -5,6 +5,7 @@ using System.Xml.Linq;
|
|||||||
using Orchard.Caching;
|
using Orchard.Caching;
|
||||||
using Orchard.FileSystems.AppData;
|
using Orchard.FileSystems.AppData;
|
||||||
using Orchard.Localization;
|
using Orchard.Localization;
|
||||||
|
using Orchard.Utility.Extensions;
|
||||||
|
|
||||||
namespace Orchard.FileSystems.Dependencies {
|
namespace Orchard.FileSystems.Dependencies {
|
||||||
public class DefaultDependenciesFolder : IDependenciesFolder {
|
public class DefaultDependenciesFolder : IDependenciesFolder {
|
||||||
@@ -40,7 +41,7 @@ namespace Orchard.FileSystems.Dependencies {
|
|||||||
_writeThroughToken.IsCurrent = true;
|
_writeThroughToken.IsCurrent = true;
|
||||||
ctx.Monitor(_writeThroughToken);
|
ctx.Monitor(_writeThroughToken);
|
||||||
|
|
||||||
return ReadDependencies(ctx.Key).ToList();
|
return ReadDependencies(ctx.Key).ToReadOnlyCollection();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user