Previous fix breaks not-equals-multiselects

beta
Vitaliy Filippov 2018-10-04 16:36:35 +03:00
parent 935805170e
commit 7c13c5e36e
1 changed files with 1 additions and 16 deletions

View File

@ -914,7 +914,6 @@ sub CHANGEDFROMTO_FIELDS
# Search operators
use constant OPERATORS => {
equals => \&_equals,
notequals => \&_notequals,
casesubstring => \&_casesubstring,
substring => \&_substring,
substr => \&_substring,
@ -3124,21 +3123,7 @@ sub _equals
}
else
{
$self->{term} = "$self->{fieldsql} = $self->{quoted}";
}
}
sub _notequals
{
my $self = shift;
if ($self->{value} eq '')
{
$self->{term} = "($self->{fieldsql} != $self->{quoted} AND $self->{fieldsql} IS NOT NULL)";
}
else
{
$self->{allow_null} = 1;
$self->{term} = "($self->{fieldsql} != $self->{quoted} OR $self->{fieldsql} IS NULL)";
$self->{term} = "($self->{fieldsql} = $self->{quoted} AND $self->{fieldsql} IS NOT NULL)";
}
}