more quotes

This commit is contained in:
Isaac Connor 2017-06-05 09:40:19 -04:00
parent 837c6ba137
commit a9183a1599
1 changed files with 6 additions and 6 deletions

View File

@ -33,7 +33,7 @@ $eventCounts = array(
'title' => translate('Hour'), 'title' => translate('Hour'),
'filter' => array( 'filter' => array(
'terms' => array( 'terms' => array(
array( 'attr' => "DateTime", 'op' => ">=", 'val' => "-1 hour" ), array( 'attr' => 'DateTime', 'op' => '>=', 'val' => '-1 hour' ),
) )
), ),
), ),
@ -41,7 +41,7 @@ $eventCounts = array(
'title' => translate('Day'), 'title' => translate('Day'),
'filter' => array( 'filter' => array(
'terms' => array( 'terms' => array(
array( 'attr' => "DateTime", 'op' => ">=", 'val' => "-1 day" ), array( 'attr' => "DateTime", 'op' => '>=', 'val' => '-1 day' ),
) )
), ),
), ),
@ -49,7 +49,7 @@ $eventCounts = array(
'title' => translate('Week'), 'title' => translate('Week'),
'filter' => array( 'filter' => array(
'terms' => array( 'terms' => array(
array( 'attr' => "DateTime", 'op' => ">=", 'val' => "-7 day" ), array( 'attr' => "DateTime", 'op' => '>=', 'val' => '-7 day' ),
) )
), ),
), ),
@ -57,7 +57,7 @@ $eventCounts = array(
'title' => translate('Month'), 'title' => translate('Month'),
'filter' => array( 'filter' => array(
'terms' => array( 'terms' => array(
array( 'attr' => "DateTime", 'op' => ">=", 'val' => "-1 month" ), array( 'attr' => "DateTime", 'op' => '>=', 'val' => '-1 month' ),
) )
), ),
), ),
@ -65,7 +65,7 @@ $eventCounts = array(
'title' => translate('Archived'), 'title' => translate('Archived'),
'filter' => array( 'filter' => array(
'terms' => array( 'terms' => array(
array( 'attr' => "Archived", 'op' => "=", 'val' => "1" ), array( 'attr' => "Archived", 'op' => '=', 'val' => '1' ),
) )
), ),
), ),
@ -115,7 +115,7 @@ for ( $i = 0; $i < count($monitors); $i++ ) {
$counts[] = 'count(if(1'.$filter['sql'].",1,NULL)) as EventCount$j"; $counts[] = 'count(if(1'.$filter['sql'].",1,NULL)) as EventCount$j";
$monitors[$i]['eventCounts'][$j]['filter'] = $filter; $monitors[$i]['eventCounts'][$j]['filter'] = $filter;
} }
$sql = 'select '.join($counts,", ").' from Events as E where MonitorId = ?'; $sql = 'SELECT '.join($counts,', ').' FROM Events AS E WHERE MonitorId = ?';
$counts = dbFetchOne( $sql, NULL, array($monitors[$i]['Id']) ); $counts = dbFetchOne( $sql, NULL, array($monitors[$i]['Id']) );
if ( $monitors[$i]['Function'] != 'None' ) { if ( $monitors[$i]['Function'] != 'None' ) {
$cycleCount++; $cycleCount++;