diff --git a/WebCms/Controllers/ResultsController.cs b/WebCms/Controllers/ResultsController.cs index 7ab30c1..eaf98aa 100644 --- a/WebCms/Controllers/ResultsController.cs +++ b/WebCms/Controllers/ResultsController.cs @@ -14,6 +14,9 @@ namespace LeafWeb.WebCms.Controllers [MemberAuthorize(AllowGroup = "Authenticated")] public ActionResult Index(LeafDataQuery query) { + if (!query.HasParameters && !TempData.ContainsKey("Posted")) + query.usr = true; + var resultItems = DataService.GetLeafInputsOrdered(); @@ -39,6 +42,8 @@ namespace LeafWeb.WebCms.Controllers return CurrentUmbracoPage(); } + TempData["Posted"] = true; + return RedirectToCurrentUmbracoPage(query.GetNameValueCollection()); } diff --git a/WebCms/Models/LeafDataQuery.cs b/WebCms/Models/LeafDataQuery.cs index ce10f47..e5e4f89 100644 --- a/WebCms/Models/LeafDataQuery.cs +++ b/WebCms/Models/LeafDataQuery.cs @@ -76,5 +76,10 @@ namespace LeafWeb.WebCms.Models && string.IsNullOrEmpty(phips2) && !compl ); + + public bool HasParameters => + HasExtendedParameters + || !string.IsNullOrEmpty(q) + || usr; } } \ No newline at end of file