From 4eafc52955a67ed4892e090c5ebf7b5946a2b9cb Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 25 Mar 2019 12:18:01 -0400 Subject: [PATCH] spacing --- web/includes/Event.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/web/includes/Event.php b/web/includes/Event.php index 944e55248..627133659 100644 --- a/web/includes/Event.php +++ b/web/includes/Event.php @@ -427,31 +427,31 @@ class Event { $captPath = $eventPath.'/'.$captImage; if ( ! file_exists($captPath) ) { - Error( "Capture file does not exist at $captPath" ); + Error("Capture file does not exist at $captPath"); } //echo "CI:$captImage, CP:$captPath, TCP:$captPath
"; - $analImage = sprintf( '%0'.ZM_EVENT_IMAGE_DIGITS.'d-analyse.jpg', $frame['FrameId'] ); + $analImage = sprintf('%0'.ZM_EVENT_IMAGE_DIGITS.'d-analyse.jpg', $frame['FrameId']); $analPath = $eventPath.'/'.$analImage; //echo "AI:$analImage, AP:$analPath, TAP:$analPath
"; $alarmFrame = $frame['Type']=='Alarm'; - $hasAnalImage = $alarmFrame && file_exists( $analPath ) && filesize( $analPath ); + $hasAnalImage = $alarmFrame && file_exists($analPath) && filesize($analPath); $isAnalImage = $hasAnalImage && !$captureOnly; - if ( !ZM_WEB_SCALE_THUMBS || $scale >= SCALE_BASE || !function_exists( 'imagecreatefromjpeg' ) ) { - $imagePath = $thumbPath = $isAnalImage?$analPath:$captPath; + if ( !ZM_WEB_SCALE_THUMBS || $scale >= SCALE_BASE || !function_exists('imagecreatefromjpeg') ) { + $imagePath = $thumbPath = $isAnalImage ? $analPath : $captPath; $imageFile = $imagePath; $thumbFile = $thumbPath; } else { if ( version_compare( phpversion(), '4.3.10', '>=') ) - $fraction = sprintf( '%.3F', $scale/SCALE_BASE ); + $fraction = sprintf('%.3F', $scale/SCALE_BASE); else - $fraction = sprintf( '%.3f', $scale/SCALE_BASE ); - $scale = (int)round( $scale ); + $fraction = sprintf('%.3f', $scale/SCALE_BASE); + $scale = (int)round($scale); $thumbCaptPath = preg_replace( '/\.jpg$/', "-$scale.jpg", $captPath ); $thumbAnalPath = preg_replace( '/\.jpg$/', "-$scale.jpg", $analPath );