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,13 +91,11 @@ namespace Orchard.Autoroute.Handlers {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check for permalink conflict, unless we are trying to set the home page.
|
// Check for permalink conflict, unless we are trying to set the home page.
|
||||||
if (part.DisplayAlias != "/") {
|
var previous = part.Path;
|
||||||
var previous = part.Path;
|
if (!_autorouteService.Value.ProcessPath(part))
|
||||||
if (!_autorouteService.Value.ProcessPath(part))
|
_orchardServices.Notifier.Warning(
|
||||||
_orchardServices.Notifier.Warning(
|
T("Permalinks in conflict. \"{0}\" is already set for a previously created {2} so now it has the slug \"{1}\"",
|
||||||
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));
|
||||||
previous, part.Path, part.ContentItem.ContentType));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RemoveAlias(AutoroutePart part) {
|
void RemoveAlias(AutoroutePart part) {
|
||||||
|
|||||||
Reference in New Issue
Block a user