Add LIKE and NOT LIKE to filter options
This is useful for filtering notes. EG filtering detected objects from zmeventnofification; WHERE notes LIKE %detect% WHERE notes NOT LIKE %car%
This commit is contained in:
parent
8940ca420c
commit
7479d3f1f1
|
@ -1275,6 +1275,8 @@ function parseFilter(&$filter, $saveToSession=false, $querySep='&') {
|
||||||
case '>' :
|
case '>' :
|
||||||
case '<' :
|
case '<' :
|
||||||
case '<=' :
|
case '<=' :
|
||||||
|
case 'LIKE' :
|
||||||
|
case 'NOT LIKE':
|
||||||
$filter['sql'] .= ' '.$term['op'].' '. $value;
|
$filter['sql'] .= ' '.$term['op'].' '. $value;
|
||||||
break;
|
break;
|
||||||
case '=~' :
|
case '=~' :
|
||||||
|
|
|
@ -579,6 +579,8 @@ $SLANG = array(
|
||||||
'OpNotMatches' => 'does not match',
|
'OpNotMatches' => 'does not match',
|
||||||
'OpIs' => 'is',
|
'OpIs' => 'is',
|
||||||
'OpIsNot' => 'is not',
|
'OpIsNot' => 'is not',
|
||||||
|
'OpLike' => 'like',
|
||||||
|
'OpNotLike' => 'not like',
|
||||||
'OptionalEncoderParam' => 'Optional Encoder Parameters',
|
'OptionalEncoderParam' => 'Optional Encoder Parameters',
|
||||||
'OptionHelp' => 'Option Help',
|
'OptionHelp' => 'Option Help',
|
||||||
'OptionRestartWarning' => 'These changes may not come into effect fully\nwhile the system is running. When you have\nfinished making your changes please ensure that\nyou restart ZoneMinder.',
|
'OptionRestartWarning' => 'These changes may not come into effect fully\nwhile the system is running. When you have\nfinished making your changes please ensure that\nyou restart ZoneMinder.',
|
||||||
|
|
|
@ -115,6 +115,8 @@ $opTypes = array(
|
||||||
'![]' => translate('OpNotIn'),
|
'![]' => translate('OpNotIn'),
|
||||||
'IS' => translate('OpIs'),
|
'IS' => translate('OpIs'),
|
||||||
'IS NOT' => translate('OpIsNot'),
|
'IS NOT' => translate('OpIsNot'),
|
||||||
|
'LIKE' => translate('OpLike'),
|
||||||
|
'NOT LIKE' => translate('OpNotLike'),
|
||||||
);
|
);
|
||||||
|
|
||||||
$archiveTypes = array(
|
$archiveTypes = array(
|
||||||
|
|
Loading…
Reference in New Issue