Merge branch 'MDL-61839-master' of git://github.com/mihailges/moodle
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Tue, 7 Aug 2018 21:52:08 +0000 (23:52 +0200)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Tue, 7 Aug 2018 21:52:08 +0000 (23:52 +0200)
mod/glossary/lib.php

index 98756d7..84055d4 100644 (file)
@@ -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]);
         }
     }