mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Removing some obsolete install/feature state code
Changing blog/page slug updater to use orchard shell events interface Changing default role/permission to use feature install event Renaming state manager/provider to be consistent with other components --HG-- branch : dev
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
using System.Linq;
|
||||
using JetBrains.Annotations;
|
||||
using Orchard.Blogs.Services;
|
||||
using Orchard.Environment.Extensions;
|
||||
using Orchard.Environment;
|
||||
using Orchard.Tasks;
|
||||
|
||||
namespace Orchard.Blogs.Routing {
|
||||
[UsedImplicitly]
|
||||
public class BlogSlugConstraintUpdator : ExtensionManagerEvents, IBackgroundTask {
|
||||
public class BlogSlugConstraintUpdator : IOrchardShellEvents, IBackgroundTask {
|
||||
private readonly IBlogSlugConstraint _blogSlugConstraint;
|
||||
private readonly IBlogService _blogService;
|
||||
|
||||
@@ -14,14 +14,15 @@ namespace Orchard.Blogs.Routing {
|
||||
_blogSlugConstraint = blogSlugConstraint;
|
||||
_blogService = blogService;
|
||||
}
|
||||
|
||||
public override void Activated(ExtensionEventContext context) {
|
||||
if (context.Extension.Descriptor.Name == "Orchard.Blogs") {
|
||||
Refresh();
|
||||
}
|
||||
|
||||
void IOrchardShellEvents.Activated() {
|
||||
Refresh();
|
||||
}
|
||||
|
||||
public void Sweep() {
|
||||
void IOrchardShellEvents.Terminating() {
|
||||
}
|
||||
|
||||
void IBackgroundTask.Sweep() {
|
||||
Refresh();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user