Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
views
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
views
Commits
e5efe236
Commit
e5efe236
authored
Mar 3, 2007
by
Earl Miles
Browse files
Options
Downloads
Patches
Plain Diff
#111936
: Allow search keyword to be optional.
parent
9645668a
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.txt
+1
-0
1 addition, 0 deletions
CHANGELOG.txt
modules/views_search.inc
+0
-2
0 additions, 2 deletions
modules/views_search.inc
with
1 addition
and
2 deletions
CHANGELOG.txt
+
1
−
0
View file @
e5efe236
...
@@ -131,6 +131,7 @@ Views --dev
...
@@ -131,6 +131,7 @@ Views --dev
o #103649: Documentation fix fix for date granularity
o #103649: Documentation fix fix for date granularity
o #115519: Restrict width of select items in UI.
o #115519: Restrict width of select items in UI.
o #119742: Improved handling of DISTINCT; allow DISTINCT to not kill summaries.
o #119742: Improved handling of DISTINCT; allow DISTINCT to not kill summaries.
o #111936: Allow search keyword to be optional.
New features:
New features:
o #105620: (Attempt 2) allow modules to alter views tables + arguments
o #105620: (Attempt 2) allow modules to alter views tables + arguments
...
...
This diff is collapsed.
Click to expand it.
modules/views_search.inc
+
0
−
2
View file @
e5efe236
...
@@ -30,7 +30,6 @@ function search_views_handler_search_index($op, $filter, $filterdata, &$query) {
...
@@ -30,7 +30,6 @@ function search_views_handler_search_index($op, $filter, $filterdata, &$query) {
$select2
=
'i.relevance AS score'
;
$select2
=
'i.relevance AS score'
;
$search
=
search_parse_query
(
$filter
[
'value'
]);
$search
=
search_parse_query
(
$filter
[
'value'
]);
if
(
$search
===
NULL
||
$search
[
0
]
==
''
||
$search
[
2
]
==
''
)
{
if
(
$search
===
NULL
||
$search
[
0
]
==
''
||
$search
[
2
]
==
''
)
{
$query
->
add_where
(
"0"
);
return
;
return
;
}
}
...
@@ -41,7 +40,6 @@ function search_views_handler_search_index($op, $filter, $filterdata, &$query) {
...
@@ -41,7 +40,6 @@ function search_views_handler_search_index($op, $filter, $filterdata, &$query) {
// Calculate maximum relevance, to normalize it
// Calculate maximum relevance, to normalize it
$normalize
=
db_result
(
db_query
(
'SELECT MAX(relevance) FROM temp_search_sids'
));
$normalize
=
db_result
(
db_query
(
'SELECT MAX(relevance) FROM temp_search_sids'
));
if
(
!
$normalize
)
{
if
(
!
$normalize
)
{
$query
->
add_where
(
"0"
);
return
;
return
;
}
}
$select2
=
str_replace
(
'i.relevance'
,
'('
.
(
1.0
/
$normalize
)
.
' * i.relevance)'
,
$select2
);
$select2
=
str_replace
(
'i.relevance'
,
'('
.
(
1.0
/
$normalize
)
.
' * i.relevance)'
,
$select2
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment