mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Removed unnecessary check for "/".
The DisplayAlias of a content item will not be set to "" or "/" for the item to become the homepage, so there's no need to check for the display alias to be "/".
This commit is contained in:
@@ -91,14 +91,12 @@ namespace Orchard.Autoroute.Handlers {
|
||||
}
|
||||
|
||||
// Check for permalink conflict, unless we are trying to set the home page.
|
||||
if (part.DisplayAlias != "/") {
|
||||
var previous = part.Path;
|
||||
if (!_autorouteService.Value.ProcessPath(part))
|
||||
_orchardServices.Notifier.Warning(
|
||||
T("Permalinks in conflict. \"{0}\" is already set for a previously created {2} so now it has the slug \"{1}\"",
|
||||
previous, part.Path, part.ContentItem.ContentType));
|
||||
}
|
||||
}
|
||||
|
||||
void RemoveAlias(AutoroutePart part) {
|
||||
var homePageId = _homeAliasService.GetHomePageId();
|
||||
|
||||
Reference in New Issue
Block a user