fix groups

This commit is contained in:
Isaac Connor 2014-03-21 23:10:13 -04:00
parent 967dda737c
commit bfb52ab9aa
2 changed files with 7 additions and 2 deletions

View File

@ -71,8 +71,12 @@ $eventCounts = array(
$running = daemonCheck();
$status = $running?$SLANG['Running']:$SLANG['Stopped'];
if ( $group = dbFetchOne( 'select * from Groups where Id = ?', NULL, array(empty($_COOKIE['zmGroup'])?0:$_COOKIE['zmGroup'])) )
$groupIds = array_flip(explode( ',', $group['MonitorIds'] ));
$group = NULL;
if ( ! empty($_COOKIE['zmGroup']) ) {
if ( $group = dbFetchOne( 'select * from Groups where Id = ?', NULL, array($_COOKIE['zmGroup'])) )
$groupIds = array_flip(explode( ',', $group['MonitorIds'] ));
}
}
noCacheHeaders();

View File

@ -71,6 +71,7 @@ $eventCounts = array(
$running = daemonCheck();
$status = $running?$SLANG['Running']:$SLANG['Stopped'];
$group = NULL;
if ( ! empty($_COOKIE['zmGroup']) ) {
if ( $group = dbFetchOne( 'SELECT * FROM Groups WHERE Id = ?', NULL, ARRAY($_COOKIE['zmGroup']) ) )
$groupIds = array_flip(explode( ',', $group['MonitorIds'] ));