// multiple options for a column is stored as ^A{val1}^A{val2}^A
return array(
'mhas' => ts('Is one of'),
+ 'mnot' => ts('Is not one of'),
);
default:
$clause = "{$field['dbAlias']} REGEXP '[[:<:]]" . implode('|', $value) . "[[:>:]]'";
}
break;
+
+ case 'mnot':
+ // mnot == multiple is not one of
+ if ($value !== NULL && count($value) > 0) {
+ $sqlOP = $this->getSQLOperator($op);
+ $clause = "( {$field['dbAlias']} NOT REGEXP '[[:<:]]" . implode('|', $value) . "[[:>:]]' OR {$field['dbAlias']} IS NULL )";
+ }
+ break;
case 'sw':
case 'ew':
$val[$key] = $options[$valIds];
}
}
- $pair[$op] = (count($val) == 1) ? (($op == 'notin') ? ts('Is Not') : ts('Is')) : CRM_Utils_Array::value($op, $pair);
+ $pair[$op] = (count($val) == 1) ? (($op == 'notin' || $op == 'mnot') ? ts('Is Not') : ts('Is')) : CRM_Utils_Array::value($op, $pair);
$val = implode(', ', $val);
$value = "{$pair[$op]} " . $val;
}