fix #1713 - link to home path displays login page
This commit is contained in:
		| @ -240,17 +240,16 @@ | ||||
|                 page = PageState.Page; | ||||
|             } | ||||
|  | ||||
|             // failsafe in case router cannot locate the home page for the site | ||||
|             if (page == null && path == "") | ||||
|             // get the page if the path has changed | ||||
|             if (page == null || page.Path != path) | ||||
|             { | ||||
|                 page = pages.FirstOrDefault(); | ||||
|                 path = page.Path; | ||||
|             } | ||||
|  | ||||
|             // check if page has changed | ||||
|             if (page != null && page.Path != path) | ||||
|             { | ||||
|                 page = pages.Where(item => item.Path == path).FirstOrDefault(); | ||||
|                 page = pages.FirstOrDefault(item => item.Path.Equals(path, StringComparison.OrdinalIgnoreCase)); | ||||
| 				// if the home page path does not exist then use the first page in the collection (a future enhancement would allow the admin to specify a home page) | ||||
| 				if (page == null && path == "") | ||||
| 				{ | ||||
| 					page = pages.FirstOrDefault(); | ||||
| 					path = page.Path; | ||||
| 				} | ||||
|                 editmode = false; | ||||
|             } | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Shaun Walker
					Shaun Walker