Skip to main content
1 of 3
Andy
  • 5k
  • 24
  • 37

Completely untested, just what I thought made sense by checking out add_where and set_where_group.

$new_group = $this->query->set_where_group('OR', NULL, 'where');
$not_in = ($this->operator != '=');
$value = vms_get_current_mlid();
$this->query->add_where(
  $new_group,
  $this->real_field,
  $value,
  $this->operator = $not_in ? 'NOT IN' : 'IN'
);

if ($not_in) {
  $this->query->add_where(
    $new_group,
    $this->real_field,
    $value,
    'IS NULL'
  );
}
Andy
  • 5k
  • 24
  • 37