From c19b71975c0821ef17caaa03263e70adc65cacce Mon Sep 17 00:00:00 2001 From: stan Date: Sun, 6 Feb 2011 16:11:56 +0000 Subject: [PATCH] Fixed issue with deleteing current monitor grouyp - http://www.zoneminder.com/forums/viewtopic.php?t=15278 git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@3284 e3e1d417-86f3-4887-817a-d78f3d33393f --- web/includes/actions.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/web/includes/actions.php b/web/includes/actions.php index 507aa79f0..0a3f1d8d8 100644 --- a/web/includes/actions.php +++ b/web/includes/actions.php @@ -840,11 +840,14 @@ if ( !empty($action) ) if ( !empty($_REQUEST['gid']) ) { dbQuery( "delete from Groups where Id = '".dbEscape($_REQUEST['gid'])."'" ); - if ( $_REQUEST['gid'] == $_COOKIE['zmGroup'] ) + if ( isset($_COOKIE['zmGroup']) ) { - unset( $_COOKIE['zmGroup'] ); - setcookie( "zmGroup", "", time()-3600*24*2 ); - $refreshParent = true; + if ( $_REQUEST['gid'] == $_COOKIE['zmGroup'] ) + { + unset( $_COOKIE['zmGroup'] ); + setcookie( "zmGroup", "", time()-3600*24*2 ); + $refreshParent = true; + } } } }