mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Remove autoroute handler from tags service
--HG-- branch : autoroute
This commit is contained in:
@@ -20,20 +20,17 @@ namespace Orchard.Tags.Services {
|
|||||||
private readonly INotifier _notifier;
|
private readonly INotifier _notifier;
|
||||||
private readonly IAuthorizationService _authorizationService;
|
private readonly IAuthorizationService _authorizationService;
|
||||||
private readonly IOrchardServices _orchardServices;
|
private readonly IOrchardServices _orchardServices;
|
||||||
private readonly IRoutePatternManager _routePatternManager;
|
|
||||||
|
|
||||||
public TagService(IRepository<TagRecord> tagRepository,
|
public TagService(IRepository<TagRecord> tagRepository,
|
||||||
IRepository<ContentTagRecord> contentTagRepository,
|
IRepository<ContentTagRecord> contentTagRepository,
|
||||||
INotifier notifier,
|
INotifier notifier,
|
||||||
IAuthorizationService authorizationService,
|
IAuthorizationService authorizationService,
|
||||||
IOrchardServices orchardServices,
|
IOrchardServices orchardServices) {
|
||||||
IRoutePatternManager routePatternManager) {
|
|
||||||
_tagRepository = tagRepository;
|
_tagRepository = tagRepository;
|
||||||
_contentTagRepository = contentTagRepository;
|
_contentTagRepository = contentTagRepository;
|
||||||
_notifier = notifier;
|
_notifier = notifier;
|
||||||
_authorizationService = authorizationService;
|
_authorizationService = authorizationService;
|
||||||
_orchardServices = orchardServices;
|
_orchardServices = orchardServices;
|
||||||
_routePatternManager = routePatternManager;
|
|
||||||
Logger = NullLogger.Instance;
|
Logger = NullLogger.Instance;
|
||||||
T = NullLocalizer.Instance;
|
T = NullLocalizer.Instance;
|
||||||
}
|
}
|
||||||
@@ -64,7 +61,6 @@ namespace Orchard.Tags.Services {
|
|||||||
result = new TagRecord { TagName = tagName };
|
result = new TagRecord { TagName = tagName };
|
||||||
_tagRepository.Create(result);
|
_tagRepository.Create(result);
|
||||||
}
|
}
|
||||||
_routePatternManager.Generate(result, "Tags");
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -120,7 +116,6 @@ namespace Orchard.Tags.Services {
|
|||||||
// Create new tag
|
// Create new tag
|
||||||
tagRecord = _tagRepository.Get(tagId);
|
tagRecord = _tagRepository.Get(tagId);
|
||||||
tagRecord.TagName = tagName;
|
tagRecord.TagName = tagName;
|
||||||
_routePatternManager.Generate(tagRecord, "Tags");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<IContent> GetTaggedContentItems(int tagId) {
|
public IEnumerable<IContent> GetTaggedContentItems(int tagId) {
|
||||||
@@ -203,8 +198,4 @@ namespace Orchard.Tags.Services {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IRoutePatternManager : IEventHandler {
|
|
||||||
void Generate(TagRecord item, string scope);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user