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:
Sipke Schoorstra
2015-07-26 17:16:41 +01:00
parent 8aa2a9f070
commit 805de7d563

View File

@@ -91,13 +91,11 @@ 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));
}
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) {