From 6111dbb7868a0c712a26544fc8b82e520ff81ade Mon Sep 17 00:00:00 2001 From: Nathan Heskew Date: Mon, 1 Nov 2010 00:01:24 -0700 Subject: [PATCH] Fixing the search page w/ no query --HG-- branch : dev --- .../Modules/Orchard.Search/Controllers/SearchController.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Orchard.Web/Modules/Orchard.Search/Controllers/SearchController.cs b/src/Orchard.Web/Modules/Orchard.Search/Controllers/SearchController.cs index 2383194a6..86f9a1ac8 100644 --- a/src/Orchard.Web/Modules/Orchard.Search/Controllers/SearchController.cs +++ b/src/Orchard.Web/Modules/Orchard.Search/Controllers/SearchController.cs @@ -40,11 +40,10 @@ namespace Orchard.Search.Controllers { protected virtual ISite CurrentSite { get; [UsedImplicitly] private set; } - public ActionResult Index(string q, Pager pager) { + public ActionResult Index(Pager pager, string q = "") { var searchFields = CurrentSite.As().SearchedFields; IPageOfItems searchHits; - if (q.Trim().StartsWith("?") || q.Trim().StartsWith("*")) { searchHits = new PageOfItems(new ISearchHit[] { }); Services.Notifier.Error(T("'*' or '?' not allowed as first character in WildcardQuery"));