1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-15 11:14:12 +02:00

Bump version to 3.0.160

This commit is contained in:
Ryan Cramer
2020-06-19 16:56:28 -04:00
parent 7efb9e8a4b
commit 0d1031582a
3 changed files with 8 additions and 6 deletions

View File

@@ -605,15 +605,17 @@ class DatabaseQuerySelectFulltext extends Wire {
foreach($words as $word) { foreach($words as $word) {
$w = $this->escapeAGAINST($word); $w = $this->escapeAGAINST($word);
$pregWord = preg_quote($w); $pregWord = preg_quote($w, '!');
if(stripos($value, "+$word*")) { if(stripos($value, "+$word*")) {
$booleanValues[] = "+$w*"; $booleanValues[] = "+$w*";
} else if(stripos($value, "+$word") && preg_match('!\+' . $pregWord . '\b!i', $value)) { } else if(stripos($value, "+$word") && preg_match('!\+' . $pregWord . '\b!i', $value)) {
$booleanValues[] = "+$w"; $booleanValues[] = "+$w";
} else if(stripos($value, "-$word*")) { } else if(stripos($value, "-$word*")) {
$booleanValues[] = "-$w*"; $booleanValues[] = "-$w*";
} else if(stripos($value, "-$word") && preg_match('!-' . $pregWord . '\b!i', $value)) { } 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 { } else {
$booleanValues[] = $w; // optional $booleanValues[] = $w; // optional
} }

View File

@@ -77,7 +77,7 @@ class ProcessWire extends Wire {
* Reversion revision number * Reversion revision number
* *
*/ */
const versionRevision = 159; const versionRevision = 160;
/** /**
* Version suffix string (when applicable) * Version suffix string (when applicable)

View File

@@ -59,7 +59,7 @@
* - `SelectorContainsExpand` (3.0.160) * - `SelectorContainsExpand` (3.0.160)
* - `SelectorContainsMatch` (3.0.160) * - `SelectorContainsMatch` (3.0.160)
* - `SelectorContainsMatchExpand` (3.0.160) * - `SelectorContainsMatchExpand` (3.0.160)
* - `SelectorContainsAdvance3d` (3.0.160) * - `SelectorContainsAdvanced` (3.0.160)
* - `SelectorStarts` * - `SelectorStarts`
* - `SelectorStartsLike` * - `SelectorStartsLike`
* - `SelectorEnds` * - `SelectorEnds`
@@ -1017,7 +1017,7 @@ class SelectorContainsAdvanced extends SelectorContains {
public static function getLabel() { return __('Advanced text search', __FILE__); } public static function getLabel() { return __('Advanced text search', __FILE__); }
public static function getDescription() { public static function getDescription() {
return 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.') . ' ' . __('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".'); __('Use quotes to match phrases: +"Must Match", -"Must Not Match", or "May Match".');
} }