mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 00:42:54 +02:00
Merge branch 'MDL-74419-master' of https://github.com/sarjona/moodle
This commit is contained in:
commit
384f6712bb
@ -346,12 +346,16 @@ class engine extends \core_search\engine {
|
||||
$DB->sql_like('description1', '?', false, false) . ' OR ' .
|
||||
$DB->sql_like('description2', '?', false, false) .
|
||||
')';
|
||||
$params = array(
|
||||
|
||||
// Remove quotes from the query.
|
||||
$q = str_replace('"', '', $q);
|
||||
$params = [
|
||||
'%' . $q . '%',
|
||||
'%' . $q . '%',
|
||||
'%' . $q . '%',
|
||||
'%' . $q . '%'
|
||||
);
|
||||
];
|
||||
|
||||
return array($sql, $params);
|
||||
}
|
||||
|
||||
|
@ -44,6 +44,21 @@ Feature: Use global search interface
|
||||
And I follow "ForumName1"
|
||||
And I should see "ForumName1" in the ".breadcrumb" "css_element"
|
||||
|
||||
@javascript
|
||||
Scenario: Search from search page with quotes
|
||||
Given I search for "zombies" using the header global search box
|
||||
And I should see "No results"
|
||||
When I set the field "id_q" to "\"amphibians\""
|
||||
# You cannot press "Search" because there's a fieldset with the same name that gets in the way.
|
||||
And I press "id_submitbutton"
|
||||
Then I should see "ForumName1"
|
||||
And I should see "ForumDesc1"
|
||||
And I should see "PageName1"
|
||||
And I should see "PageDesc1"
|
||||
# Check the link works.
|
||||
And I follow "ForumName1"
|
||||
And I should see "ForumName1" in the ".breadcrumb" "css_element"
|
||||
|
||||
@javascript
|
||||
Scenario: Search starting from site context (no within option)
|
||||
When I search for "frogs" using the header global search box
|
||||
|
Loading…
x
Reference in New Issue
Block a user