mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 00:42:54 +02:00
MDL-61839 glossary: One letter search in glossary returns all entries
This commit is contained in:
parent
6e020b161a
commit
9d98033ff9
@ -3820,10 +3820,10 @@ function glossary_get_entries_by_search($glossary, $context, $query, $fullsearch
|
||||
$options = array()) {
|
||||
global $DB, $USER;
|
||||
|
||||
// Remove too little terms.
|
||||
// Clean terms.
|
||||
$terms = explode(' ', $query);
|
||||
foreach ($terms as $key => $term) {
|
||||
if (strlen(trim($term, '+-')) < 2) {
|
||||
if (strlen(trim($term, '+-')) < 1) {
|
||||
unset($terms[$key]);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user