2
0
forked from Wavyzz/dolibarr
* fix #2810

* Fix #29292
This commit is contained in:
hansemschnokeloch
2024-08-23 15:27:10 +02:00
committed by GitHub
parent 6d1d41bb9d
commit cfb44ce196
2 changed files with 2 additions and 2 deletions

View File

@@ -13604,7 +13604,7 @@ function dolForgeCriteriaCallback($matches)
if (empty($matches[1])) { if (empty($matches[1])) {
return ''; return '';
} }
$tmp = explode(':', $matches[1]); $tmp = explode(':', $matches[1], 3);
if (count($tmp) < 3) { if (count($tmp) < 3) {
return ''; return '';
} }

View File

@@ -239,7 +239,7 @@ class FunctionsLibTest extends CommonClassTest
// A real search string // A real search string
$filter = "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.date_creation:<:'2016-01-01 12:30:00') or (t.nature:is:NULL)"; $filter = "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.date_creation:<:'2016-01-01 12:30:00') or (t.nature:is:NULL)";
$sql = forgeSQLFromUniversalSearchCriteria($filter); $sql = forgeSQLFromUniversalSearchCriteria($filter);
$this->assertEquals(" AND ((t.ref LIKE 'SO-%') or (t.date_creation < '20160101') or (t.date_creation < 0) or (t.nature IS NULL))", $sql); $this->assertEquals(" AND ((t.ref LIKE 'SO-%') or (t.date_creation < '20160101') or (t.date_creation < '2016-01-01 12:30:00') or (t.nature IS NULL))", $sql);
// A real search string // A real search string
$filter = "(t.fieldstring:=:'aaa ttt')"; $filter = "(t.fieldstring:=:'aaa ttt')";