From d83349cc7fbe51f6d4753fecd496f12aefb60d50 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 1 Apr 2015 18:42:57 +0200 Subject: [PATCH] fix to display thumbnails when only storing snapshot.jpg --- web/includes/functions.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web/includes/functions.php b/web/includes/functions.php index 5c1b063ff..2be676aaf 100644 --- a/web/includes/functions.php +++ b/web/includes/functions.php @@ -1126,7 +1126,11 @@ function getImageSrc( $event, $frame, $scale=SCALE_BASE, $captureOnly=false, $ov $frame = array( 'FrameId'=>$frame, 'Type'=>'' ); //echo "S:$scale, CO:$captureOnly
"; - $captImage = sprintf( "%0".ZM_EVENT_IMAGE_DIGITS."d-capture.jpg", $frame['FrameId'] ); + $currEvent = dbFetchOne( 'SELECT M.SaveJPEGs FROM Events AS E INNER JOIN Monitors AS M ON E.MonitorId = M.Id WHERE E.Id = '.$event['Id'] ); + if ( $currEvent['SaveJPEGs'] == "4" ) + $captImage = "snapshot.jpg"; + else + $captImage = sprintf( "%0".ZM_EVENT_IMAGE_DIGITS."d-capture.jpg", $frame['FrameId'] ); $captPath = $eventPath.'/'.$captImage; $thumbCaptPath = ZM_DIR_IMAGES.'/'.$event['Id'].'-'.$captImage; //echo "CI:$captImage, CP:$captPath, TCP:$thumbCaptPath
";