Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
c6698cf5
Commit
c6698cf5
authored
Jun 05, 2013
by
alexpott
Browse files
Issue
#2003470
by sillygwailo: Rename Views method op_word() to opContainsWord().
parent
486b8b87
Changes
1
Hide whitespace changes
Inline
Side-by-side
core/modules/views/lib/Drupal/views/Plugin/views/filter/String.php
View file @
c6698cf5
...
...
@@ -59,13 +59,13 @@ function operators() {
'word'
=>
array
(
'title'
=>
t
(
'Contains any word'
),
'short'
=>
t
(
'has word'
),
'method'
=>
'op
_w
ord'
,
'method'
=>
'op
ContainsW
ord'
,
'values'
=>
1
,
),
'allwords'
=>
array
(
'title'
=>
t
(
'Contains all words'
),
'short'
=>
t
(
'has all'
),
'method'
=>
'op
_w
ord'
,
'method'
=>
'op
ContainsW
ord'
,
'values'
=>
1
,
),
'starts'
=>
array
(
...
...
@@ -268,7 +268,7 @@ protected function opContains($field) {
$this
->
query
->
add_where
(
$this
->
options
[
'group'
],
$field
,
'%'
.
db_like
(
$this
->
value
)
.
'%'
,
'LIKE'
);
}
function
op
_w
ord
(
$field
)
{
protected
function
op
ContainsW
ord
(
$field
)
{
$where
=
$this
->
operator
==
'word'
?
db_or
()
:
db_and
();
// Don't filter on empty strings.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment