Mercurial > hg > isophonics-drupal-site
comparison core/modules/search/src/SearchQuery.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 7a779792577d |
children | af1871eacc83 |
comparison
equal
deleted
inserted
replaced
16:c2387f117808 | 17:129ea1e6d783 |
---|---|
1 <?php | 1 <?php |
2 | 2 |
3 namespace Drupal\search; | 3 namespace Drupal\search; |
4 | 4 |
5 use Drupal\Core\Database\Query\Condition; | 5 use Drupal\Core\Database\Query\Condition; |
6 use Drupal\Component\Utility\Unicode; | |
7 use Drupal\Core\Database\Query\SelectExtender; | 6 use Drupal\Core\Database\Query\SelectExtender; |
8 use Drupal\Core\Database\Query\SelectInterface; | 7 use Drupal\Core\Database\Query\SelectInterface; |
9 | 8 |
10 /** | 9 /** |
11 * Search query extender and helper functions. | 10 * Search query extender and helper functions. |
362 | 361 |
363 // Determine the scorewords of this word/phrase. | 362 // Determine the scorewords of this word/phrase. |
364 $split = explode(' ', $word); | 363 $split = explode(' ', $word); |
365 foreach ($split as $s) { | 364 foreach ($split as $s) { |
366 $num = is_numeric($s); | 365 $num = is_numeric($s); |
367 if ($num || Unicode::strlen($s) >= \Drupal::config('search.settings')->get('index.minimum_word_size')) { | 366 if ($num || mb_strlen($s) >= \Drupal::config('search.settings')->get('index.minimum_word_size')) { |
368 if (!isset($this->words[$s])) { | 367 if (!isset($this->words[$s])) { |
369 $this->words[$s] = $s; | 368 $this->words[$s] = $s; |
370 $num_new_scores++; | 369 $num_new_scores++; |
371 } | 370 } |
372 $num_valid_words++; | 371 $num_valid_words++; |