Commit e5efe236 authored by merlinofchaos's avatar merlinofchaos
Browse files

#111936: Allow search keyword to be optional.

parent 9645668a
......@@ -131,6 +131,7 @@ Views --dev
o #103649: Documentation fix fix for date granularity
o #115519: Restrict width of select items in UI.
o #119742: Improved handling of DISTINCT; allow DISTINCT to not kill summaries.
o #111936: Allow search keyword to be optional.
New features:
o #105620: (Attempt 2) allow modules to alter views tables + arguments
......
......@@ -30,7 +30,6 @@ function search_views_handler_search_index($op, $filter, $filterdata, &$query) {
$select2 = 'i.relevance AS score';
$search = search_parse_query($filter['value']);
if ($search === NULL || $search[0] == '' || $search[2] == '') {
$query->add_where("0");
return;
}
......@@ -41,7 +40,6 @@ function search_views_handler_search_index($op, $filter, $filterdata, &$query) {
// Calculate maximum relevance, to normalize it
$normalize = db_result(db_query('SELECT MAX(relevance) FROM temp_search_sids'));
if (!$normalize) {
$query->add_where("0");
return;
}
$select2 = str_replace('i.relevance', '('. (1.0 / $normalize) .' * i.relevance)', $select2);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment