mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 10:54:50 +08:00
Fixing the search page w/ no query
--HG-- branch : dev
This commit is contained in:
@@ -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<SearchSettingsPart>().SearchedFields;
|
||||
|
||||
IPageOfItems<ISearchHit> searchHits;
|
||||
|
||||
if (q.Trim().StartsWith("?") || q.Trim().StartsWith("*")) {
|
||||
searchHits = new PageOfItems<ISearchHit>(new ISearchHit[] { });
|
||||
Services.Notifier.Error(T("'*' or '?' not allowed as first character in WildcardQuery"));
|
||||
|
Reference in New Issue
Block a user