Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- commit d95d8146126d429c2887b790426a4ad10c510628
- Author: Kfir Itzhak <mastertheknife@gmail.com>
- Date: Sat Feb 5 16:46:19 2011 +0200
- Fixed: Signal detection sometimes returns signal detected when there is no signal - http://www.zoneminder.com/forums/viewtopic.php?t=17158
- diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp
- index 1dddd91..9bcb6af 100644
- --- a/src/zm_monitor.cpp
- +++ b/src/zm_monitor.cpp
- @@ -1022,9 +1022,9 @@ bool Monitor::CheckSignal( const Image *image )
- index = (int)(((long long)rand()*(long long)(pixels-1))/RAND_MAX);
- if ( !config.timestamp_on_capture || !label_format[0] )
- break;
- +
- // Avoid sampling the rows with timestamp in
- - int y = index / (width * colours);
- - if ( y < label_coord.Y() || y <= label_coord.Y()+Image::LINE_HEIGHT )
- + if ( index < (label_coord.Y()*width) || index >= (label_coord.Y()+Image::LINE_HEIGHT)*width )
- break;
- }
- const unsigned char *ptr = buffer+(index*colours);
- commit 15d274ac8b139c914f05ed88b28a9d63aeb7bcfb
- Author: Kfir Itzhak <mastertheknife@gmail.com>
- Date: Sat Feb 5 11:42:36 2011 +0200
- Fixed: Exporting hangs forever - http://www.zoneminder.com/forums/viewtopic.php?t=17144
- diff --git a/web/skins/classic/includes/export_functions.php b/web/skins/classic/includes/export_functions.php
- index 557d242..5f4d5e3 100644
- --- a/web/skins/classic/includes/export_functions.php
- +++ b/web/skins/classic/includes/export_functions.php
- @@ -1,4 +1,4 @@
- -<?php
- +<?php
- //
- // ZoneMinder web export function library, $Date$, $Revision$
- // Copyright (C) 2001-2008 Philip Coombes
- commit a33afacc1388d3586423e073b787f40aa4d7d6fe
- Author: Kfir Itzhak <mastertheknife@gmail.com>
- Date: Sat Feb 5 09:37:01 2011 +0200
- Fixed: Generated video download filename ends with .html or wrong filename for firefox users - http://www.zoneminder.com/forums/viewtopic.php?t=16901
- diff --git a/web/skins/classic/views/video.php b/web/skins/classic/views/video.php
- index 263b5ea..1f3ea50 100644
- --- a/web/skins/classic/views/video.php
- +++ b/web/skins/classic/views/video.php
- @@ -88,7 +88,15 @@ if ( isset($_REQUEST['deleteIndex']) )
- if ( isset($_REQUEST['downloadIndex']) )
- {
- $downloadIndex = validInt($_REQUEST['downloadIndex']);
- - header( "Content-disposition: attachment; filename=".$videoFiles[$downloadIndex]."; size=".filesize($videoFiles[$downloadIndex]) );
- + header("Pragma: public");
- + header("Expires: 0");
- + header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
- + header("Cache-Control: private",false); // required by certain browsers
- + header("Content-Description: File Transfer");
- + header('Content-Disposition: attachment; filename="'.basename($videoFiles[$downloadIndex]).'"'); // basename is required because the video index contains the path and firefox doesn't strip the path but simply replaces the slashes with an underscore.
- + header("Content-Transfer-Encoding: binary");
- + header("Content-Type: application/force-download");
- + header("Content-Length: ".filesize($videoFiles[$downloadIndex]));
- readfile( $videoFiles[$downloadIndex] );
- exit;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement