Code spacing and doc

pull/3246/head
Isaac Connor 2021-05-03 15:20:11 -04:00
parent 934c726beb
commit b10b2932ee
1 changed files with 5 additions and 6 deletions

View File

@ -212,7 +212,6 @@ if ( empty($_REQUEST['path']) ) {
$Frame->FrameId('snapshot'); $Frame->FrameId('snapshot');
} # end if found snapshot.jpg } # end if found snapshot.jpg
} else { } else {
$Frame = ZM\Frame::find_one(array('EventId'=>$_REQUEST['eid'], 'FrameId'=>$_REQUEST['fid'])); $Frame = ZM\Frame::find_one(array('EventId'=>$_REQUEST['eid'], 'FrameId'=>$_REQUEST['fid']));
if (!$Frame) { if (!$Frame) {
$previousBulkFrame = dbFetchOne( $previousBulkFrame = dbFetchOne(
@ -230,15 +229,15 @@ if ( empty($_REQUEST['path']) ) {
$percentage = ($Frame->FrameId() - $previousBulkFrame['FrameId']) / ($nextBulkFrame['FrameId'] - $previousBulkFrame['FrameId']); $percentage = ($Frame->FrameId() - $previousBulkFrame['FrameId']) / ($nextBulkFrame['FrameId'] - $previousBulkFrame['FrameId']);
$Frame->Delta($previousBulkFrame['Delta'] + floor( 100* ( $nextBulkFrame['Delta'] - $previousBulkFrame['Delta'] ) * $percentage )/100); $Frame->Delta($previousBulkFrame['Delta'] + floor( 100* ( $nextBulkFrame['Delta'] - $previousBulkFrame['Delta'] ) * $percentage )/100);
ZM\Debug("Got virtual frame from Bulk Frames previous delta: " . $previousBulkFrame['Delta'] . " + nextdelta:" . $nextBulkFrame['Delta'] . ' - ' . $previousBulkFrame['Delta'] . ' * ' . $percentage ); ZM\Debug('Got virtual frame from Bulk Frames previous delta: ' . $previousBulkFrame['Delta'] . ' + nextdelta:' . $nextBulkFrame['Delta'] . ' - ' . $previousBulkFrame['Delta'] . ' * ' . $percentage );
} else { } else {
ZM\Fatal('No Frame found for event('.$_REQUEST['eid'].') and frame id('.$_REQUEST['fid'].')'); ZM\Fatal('No Frame found for event('.$_REQUEST['eid'].') and frame id('.$_REQUEST['fid'].')');
} }
} } # end if !Frame
// Frame can be non-existent. We have Bulk frames. So now we should try to load the bulk frame // Frame can be non-existent. We have Bulk frames. So now we should try to load the bulk frame
$path = $Event->Path().'/'.sprintf('%0'.ZM_EVENT_IMAGE_DIGITS.'d',$Frame->FrameId()).'-'.$show.'.jpg'; $path = $Event->Path().'/'.sprintf('%0'.ZM_EVENT_IMAGE_DIGITS.'d',$Frame->FrameId()).'-'.$show.'.jpg';
ZM\Debug("Path: $path"); ZM\Debug("Path: $path");
} } # if special frame (snapshot, alarm etc) or identified by id
} else { } else {
# If we are only specifying fid, then the fid must be the primary key into the frames table. But when the event is specified, then it is the frame # # If we are only specifying fid, then the fid must be the primary key into the frames table. But when the event is specified, then it is the frame #