mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Log text change. Change try place in the code to cover more.
This commit is contained in:
@@ -37,19 +37,20 @@ namespace Orchard.Alias.Recipes.Executors {
|
|||||||
foreach (var aliasElement in context.RecipeStep.Step.Elements()) {
|
foreach (var aliasElement in context.RecipeStep.Step.Elements()) {
|
||||||
var aliasPath = aliasElement.Attribute("Path").Value;
|
var aliasPath = aliasElement.Attribute("Path").Value;
|
||||||
|
|
||||||
Logger.Information("Processing alias '{0}'.", aliasPath);
|
Logger.Information("Importing alias '{0}'.", aliasPath);
|
||||||
|
|
||||||
var rvd = new RouteValueDictionary();
|
|
||||||
|
|
||||||
var routeValuesElement = aliasElement.Descendants("RouteValues").FirstOrDefault();
|
|
||||||
|
|
||||||
if (routeValuesElement != null) {
|
|
||||||
foreach (var routeValue in routeValuesElement.Descendants("Add")) {
|
|
||||||
rvd.Add(routeValue.Attribute("Key").Value, routeValue.Attribute("Value").Value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
var rvd = new RouteValueDictionary();
|
||||||
|
|
||||||
|
var routeValuesElement = aliasElement.Descendants("RouteValues").FirstOrDefault();
|
||||||
|
|
||||||
|
if (routeValuesElement != null) {
|
||||||
|
foreach (var routeValue in routeValuesElement.Descendants("Add")) {
|
||||||
|
rvd.Add(routeValue.Attribute("Key").Value, routeValue.Attribute("Value").Value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
_aliasService.Set(aliasPath, rvd, "Custom", false);
|
_aliasService.Set(aliasPath, rvd, "Custom", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user