From 0d1031582aedece59c440630f0cfcd00c2b150ef Mon Sep 17 00:00:00 2001 From: Ryan Cramer Date: Fri, 19 Jun 2020 16:56:28 -0400 Subject: [PATCH] Bump version to 3.0.160 --- wire/core/DatabaseQuerySelectFulltext.php | 8 +++++--- wire/core/ProcessWire.php | 2 +- wire/core/Selector.php | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/wire/core/DatabaseQuerySelectFulltext.php b/wire/core/DatabaseQuerySelectFulltext.php index b9738a54..ef187034 100644 --- a/wire/core/DatabaseQuerySelectFulltext.php +++ b/wire/core/DatabaseQuerySelectFulltext.php @@ -605,15 +605,17 @@ class DatabaseQuerySelectFulltext extends Wire { foreach($words as $word) { $w = $this->escapeAGAINST($word); - $pregWord = preg_quote($w); + $pregWord = preg_quote($w, '!'); if(stripos($value, "+$word*")) { - $booleanValues[] = "+$w*"; + $booleanValues[] = "+$w*"; } else if(stripos($value, "+$word") && preg_match('!\+' . $pregWord . '\b!i', $value)) { $booleanValues[] = "+$w"; } else if(stripos($value, "-$word*")) { $booleanValues[] = "-$w*"; } else if(stripos($value, "-$word") && preg_match('!-' . $pregWord . '\b!i', $value)) { - $booleanValues[] = "-$w"; + $booleanValues[] = "-$w"; + } else if(stripos($value, "$word*") && preg_match('!\b' . $pregWord . '\*!i', $value)) { + $booleanValues[] = "$w*"; } else { $booleanValues[] = $w; // optional } diff --git a/wire/core/ProcessWire.php b/wire/core/ProcessWire.php index fb11a8cd..df8c8a7b 100644 --- a/wire/core/ProcessWire.php +++ b/wire/core/ProcessWire.php @@ -77,7 +77,7 @@ class ProcessWire extends Wire { * Reversion revision number * */ - const versionRevision = 159; + const versionRevision = 160; /** * Version suffix string (when applicable) diff --git a/wire/core/Selector.php b/wire/core/Selector.php index 21e1916f..5c5e2645 100644 --- a/wire/core/Selector.php +++ b/wire/core/Selector.php @@ -59,7 +59,7 @@ * - `SelectorContainsExpand` (3.0.160) * - `SelectorContainsMatch` (3.0.160) * - `SelectorContainsMatchExpand` (3.0.160) - * - `SelectorContainsAdvance3d` (3.0.160) + * - `SelectorContainsAdvanced` (3.0.160) * - `SelectorStarts` * - `SelectorStartsLike` * - `SelectorEnds` @@ -1017,7 +1017,7 @@ class SelectorContainsAdvanced extends SelectorContains { public static function getLabel() { return __('Advanced text search', __FILE__); } public static function getDescription() { return - __('Match values with commands: +Word MUST appear, -Word MUST NOT appear, and unprefixed Word MAY appear (at least one matches).', __FILE__) . ' ' . + __('Match values with commands: +Word MUST appear, -Word MUST NOT appear, and unprefixed Word may appear.', __FILE__) . ' ' . __('Add asterisk for partial match: Bar* or +Bar* matches bar, barn, barge; while -Bar* prevents matching them.') . ' ' . __('Use quotes to match phrases: +"Must Match", -"Must Not Match", or "May Match".'); }