Skip to content

Commit 77aa7ff

Browse files
committed
Fixed setting of controller variable
Previously, the `controller` key was being set to the `area` variable. This didn't cause any bugs because neither `area` nor `controller` is being actively used. To prevent future bugs, however, am making sure this is set correctly.
1 parent 22bb1c5 commit 77aa7ff

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Ignia.Topics.Web.Mvc/TopicViewEngine.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ public TopicViewEngine(IViewPageActivator viewPageActivator = null) : base(viewP
3333

3434
/*------------------------------------------------------------------------------------------------------------------------
3535
| Define view location
36+
>-------------------------------------------------------------------------------------------------------------------------
37+
| Supports the following replacement tokens: {0} Controller, {1} View, {2} Area, and {3} Content Type.
3638
\-----------------------------------------------------------------------------------------------------------------------*/
3739
var viewLocations = new[] {
3840
"~/Views/{3}/{1}.cshtml",
@@ -174,7 +176,7 @@ private static List<string> GetSearchPaths(ControllerContext controllerContext,
174176
area = routeData.GetRequiredString("area");
175177
}
176178
if (routeData.Values.ContainsKey("controller")) {
177-
area = routeData.GetRequiredString("controller");
179+
controller = routeData.GetRequiredString("controller");
178180
}
179181
if (routeData.Values.ContainsKey("contenttype")) {
180182
routeData.Values.TryGetValue("contenttype", out contentType);

0 commit comments

Comments
 (0)