break;
default:
if ($daoOrBaoName &&
- (array_key_exists('pseudoconstant', $this->_columns[$tableName][$fieldGrp][$fieldName])
- || array_key_exists('enumValues', $this->_columns[$tableName][$fieldGrp][$fieldName]))
- ) {
+ array_key_exists('pseudoconstant', $this->_columns[$tableName][$fieldGrp][$fieldName])) {
// with multiple options operator-type is generally multi-select
$this->_columns[$tableName][$fieldGrp][$fieldName]['operatorType'] = CRM_Report_Form::OP_MULTISELECT;
if (!array_key_exists('options', $this->_columns[$tableName][$fieldGrp][$fieldName])) {
// 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;
}