Fixed and closed #509 : the search is performed also if query is empty.

This commit is contained in:
Matteo Tomasini 2010-03-25 16:51:35 +00:00
parent 3f999db114
commit 3daa4af3e5
2 changed files with 9 additions and 10 deletions

View file

@ -16,5 +16,5 @@ using System.Reflection;
// //
// You can specify all the values or you can default the Revision and Build Numbers // You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
[assembly: AssemblyVersion("3.0.2.514")] [assembly: AssemblyVersion("3.0.2.515")]
[assembly: AssemblyFileVersion("3.0.2.514")] [assembly: AssemblyFileVersion("3.0.2.515")]

View file

@ -109,14 +109,13 @@ namespace ScrewTurn.Wiki {
protected void btnGo_Click(object sender, EventArgs e) { protected void btnGo_Click(object sender, EventArgs e) {
// Redirect firing the search // Redirect firing the search
string query = ScrewTurn.Wiki.SearchEngine.Tools.RemoveDiacriticsAndPunctuation(txtQuery.Text, false); string query = ScrewTurn.Wiki.SearchEngine.Tools.RemoveDiacriticsAndPunctuation(txtQuery.Text, false);
if(query.Length > 0) {
UrlTools.Redirect(UrlTools.BuildUrl("Search.aspx?Query=", Tools.UrlEncode(txtQuery.Text), UrlTools.Redirect(UrlTools.BuildUrl("Search.aspx?Query=", Tools.UrlEncode(txtQuery.Text),
"&SearchUncategorized=", chkUncategorizedPages.Checked ? "1" : "0", "&SearchUncategorized=", chkUncategorizedPages.Checked ? "1" : "0",
"&Categories=", GetCategories(), "&Categories=", GetCategories(),
"&Mode=", GetMode(), "&Mode=", GetMode(),
chkAllNamespaces.Checked ? "&AllNamespaces=1" : "", chkAllNamespaces.Checked ? "&AllNamespaces=1" : "",
chkFilesAndAttachments.Checked ? "&FilesAndAttachments=1" : "")); chkFilesAndAttachments.Checked ? "&FilesAndAttachments=1" : ""));
}
} }
/// <summary> /// <summary>