Advanced search improvements (restore 2018-04-10 revisions : r5643..r5645)

* Support for empty dates
* UNION OQLs don't crash the search
* Better support for 'not empty' searches

SVN:trunk[5634]
This commit is contained in:
Pierre Goiffon
2018-04-12 08:54:36 +00:00
parent 4450d6af2f
commit e15bad7d3b
4 changed files with 111 additions and 40 deletions

View File

@@ -1024,7 +1024,14 @@ class FieldExpression extends UnaryExpression
*/
public function GetCriterion($oSearch, &$aArgs = null, $bRetrofitParams = false, $oAttDef = null)
{
$oAttDef = $this->GetAttDef($oSearch->GetJoinedClasses());
if (method_exists($oSearch, 'GetJoinedClasses'))
{
$oAttDef = $this->GetAttDef($oSearch->GetJoinedClasses());
}
else
{
$oAttDef = $this->GetAttDef($oSearch->GetSelectedClasses());
}
if (!is_null($oAttDef))
{
$sSearchType = $oAttDef->GetSearchType();