diff --git a/web/includes/config.php.in b/web/includes/config.php.in
index a7679f5b4..f50a0e2d7 100644
--- a/web/includes/config.php.in
+++ b/web/includes/config.php.in
@@ -114,7 +114,7 @@ $GLOBALS['defaultUser'] = array(
"Devices" => 'Edit',
"System" => 'Edit',
"MaxBandwidth" => "",
- "MonitorIds" => "",
+ "MonitorIds" => false
);
function loadConfig( $defineConsts=true )
diff --git a/web/includes/functions.php b/web/includes/functions.php
index 3a1bedb3d..bcb45180c 100644
--- a/web/includes/functions.php
+++ b/web/includes/functions.php
@@ -1085,7 +1085,9 @@ function getImageSrc( $event, $frame, $scale, $captureOnly=false, $overwrite=fal
function createListThumbnail( $event, $overwrite=false )
{
$sql = "select * from Frames where EventId = '".$event['Id']."' and Score = '".$event['MaxScore']."' order by FrameId limit 0,1";
- $frame = dbFetchOne( $sql );
+ if ( !($frame = dbFetchOne( $sql )) )
+ return( false );
+
$frameId = $frame['FrameId'];
if ( ZM_WEB_LIST_THUMB_WIDTH )
diff --git a/web/skins/classic/views/events.php b/web/skins/classic/views/events.php
index f72f51d16..4e847e326 100644
--- a/web/skins/classic/views/events.php
+++ b/web/skins/classic/views/events.php
@@ -30,7 +30,7 @@ if ( !empty($_REQUEST['execute']) )
}
$countSql = "select count(E.Id) as EventCount from Monitors as M inner join Events as E on (M.Id = E.MonitorId) where";
-$eventsSql = "select E.Id,E.MonitorId,M.Name As MonitorName,M.Width,M.Height,M.DefaultScale,E.Name,E.Cause,E.StartTime,E.Length,E.Frames,E.AlarmFrames,E.TotScore,E.AvgScore,E.MaxScore,E.Archived from Monitors as M inner join Events as E on (M.Id = E.MonitorId) where";
+$eventsSql = "select E.Id,E.MonitorId,M.Name As MonitorName,M.Width,M.Height,M.DefaultScale,E.Name,E.Cause,E.Notes,E.StartTime,E.Length,E.Frames,E.AlarmFrames,E.TotScore,E.AvgScore,E.MaxScore,E.Archived from Monitors as M inner join Events as E on (M.Id = E.MonitorId) where";
if ( $user['MonitorIds'] )
{
$countSql .= " M.Id in (".join( ",", preg_split( '/["\'\s]*,["\'\s]*/', $user['MonitorIds'] ) ).")";
@@ -210,7 +210,7 @@ foreach ( $events as $event )
= makePopupLink( '?view=event&eid='.$event['Id'].$filterQuery.$sortQuery.'&page=1', 'zmEvent', array( 'event', reScale( $event['Width'], $scale ), reScale( $event['Height'], $scale ) ), $event['Id'].($event['Archived']?'*':'') ) ?> |
= makePopupLink( '?view=event&eid='.$event['Id'].$filterQuery.$sortQuery.'&page=1', 'zmEvent', array( 'event', reScale( $event['Width'], $event['DefaultScale'], ZM_WEB_DEFAULT_SCALE ), reScale( $event['Height'], $event['DefaultScale'], ZM_WEB_DEFAULT_SCALE ) ), validHtmlStr($event['Name']).($event['Archived']?'*':'' ) ) ?> |
= $event['MonitorName'] ?> |
- = makePopupLink( '?view=eventdetail&eid='.$event['Id'], 'zmEventDetail', 'eventdetail', validHtmlStr($event['Cause']), canEdit( 'Events' ) ) ?> |
+ = makePopupLink( '?view=eventdetail&eid='.$event['Id'], 'zmEventDetail', 'eventdetail', validHtmlStr($event['Cause']), canEdit( 'Events' ), 'title="'.htmlspecialchars($event['Notes']).'"' ) ?> |
= strftime( STRF_FMT_DATETIME_SHORTER, strtotime($event['StartTime']) ) ?> |
= $event['Length'] ?> |
= makePopupLink( '?view=frames&eid='.$event['Id'], 'zmFrames', 'frames', $event['Frames'] ) ?> |
@@ -221,10 +221,18 @@ foreach ( $events as $event )
= makePopupLink( '?view=frame&eid='.$event['Id'].'&fid='.$thumbData['FrameId'], 'zmImage', array( 'image', reScale( $event['Width'], $scale ), reScale( $event['Height'], $scale ) ), '' ) ?> |
+ |
+
disabled="disabled"/> |
diff --git a/web/skins/classic/views/js/watch.js.php b/web/skins/classic/views/js/watch.js.php
index ed05f9c19..557986312 100644
--- a/web/skins/classic/views/js/watch.js.php
+++ b/web/skins/classic/views/js/watch.js.php
@@ -39,7 +39,7 @@ var SOUND_ON_ALARM = = ZM_WEB_SOUND_ON_ALARM ?>;
var POPUP_ON_ALARM = = ZM_WEB_POPUP_ON_ALARM ?>;
var streamMode = "= $streamMode ?>";
-var showMode = "= ($showControls && $_REQUEST['control'])?"control":"events" ?>";
+var showMode = "= ($showControls && !empty($_REQUEST['control']))?"control":"events" ?>";
var connKey = '= $connkey ?>';
var maxDisplayEvents = = 2 * MAX_EVENTS ?>;
diff --git a/web/skins/classic/views/montage.php b/web/skins/classic/views/montage.php
index f6a714bff..505b73bcf 100644
--- a/web/skins/classic/views/montage.php
+++ b/web/skins/classic/views/montage.php
@@ -103,13 +103,6 @@ foreach ( $monitors as $monitor )
?>