add the missing case for ServerId in Filter processing.

pull/1504/head
Isaac Connor 2016-10-18 10:14:19 -04:00
parent b385ba7bf4
commit aaf8f6c98b
1 changed files with 10 additions and 0 deletions

View File

@ -1196,6 +1196,9 @@ function parseFilter( &$filter, $saveToSession=false, $querySep='&' ) {
case 'MonitorName': case 'MonitorName':
$filter['sql'] .= 'M.'.preg_replace( '/^Monitor/', '', $filter['terms'][$i]['attr'] ); $filter['sql'] .= 'M.'.preg_replace( '/^Monitor/', '', $filter['terms'][$i]['attr'] );
break; break;
case 'ServerId':
$filter['sql'] .= 'M.ServerId';
break;
case 'DateTime': case 'DateTime':
$filter['sql'] .= "E.StartTime"; $filter['sql'] .= "E.StartTime";
break; break;
@ -1241,6 +1244,13 @@ function parseFilter( &$filter, $saveToSession=false, $querySep='&' ) {
case 'Notes': case 'Notes':
$value = dbEscape($value); $value = dbEscape($value);
break; break;
case 'ServerId':
if ( $value == 'ZM_SERVER_ID' ) {
$value = ZM_SERVER_ID;
} else {
$value = dbEscape($value);
}
break;
case 'DateTime': case 'DateTime':
$value = "'".strftime( STRF_FMT_DATETIME_DB, strtotime( $value ) )."'"; $value = "'".strftime( STRF_FMT_DATETIME_DB, strtotime( $value ) )."'";
break; break;