Advertisement
Guest User

Untitled

a guest
Feb 5th, 2011
381
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 3.23 KB | None | 0 0
  1. commit d95d8146126d429c2887b790426a4ad10c510628
  2. Author: Kfir Itzhak <mastertheknife@gmail.com>
  3. Date:   Sat Feb 5 16:46:19 2011 +0200
  4.  
  5.     Fixed: Signal detection sometimes returns signal detected when there is no signal - http://www.zoneminder.com/forums/viewtopic.php?t=17158
  6.  
  7. diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp
  8. index 1dddd91..9bcb6af 100644
  9. --- a/src/zm_monitor.cpp
  10. +++ b/src/zm_monitor.cpp
  11. @@ -1022,9 +1022,9 @@ bool Monitor::CheckSignal( const Image *image )
  12.                  index = (int)(((long long)rand()*(long long)(pixels-1))/RAND_MAX);
  13.                  if ( !config.timestamp_on_capture || !label_format[0] )
  14.                      break;
  15. +
  16.                  // Avoid sampling the rows with timestamp in
  17. -                int y = index / (width * colours);
  18. -                if ( y < label_coord.Y() || y <= label_coord.Y()+Image::LINE_HEIGHT )
  19. +                if ( index < (label_coord.Y()*width) || index >= (label_coord.Y()+Image::LINE_HEIGHT)*width )
  20.                      break;
  21.              }
  22.              const unsigned char *ptr = buffer+(index*colours);
  23.  
  24. commit 15d274ac8b139c914f05ed88b28a9d63aeb7bcfb
  25. Author: Kfir Itzhak <mastertheknife@gmail.com>
  26. Date:   Sat Feb 5 11:42:36 2011 +0200
  27.  
  28.     Fixed: Exporting hangs forever - http://www.zoneminder.com/forums/viewtopic.php?t=17144
  29.  
  30. diff --git a/web/skins/classic/includes/export_functions.php b/web/skins/classic/includes/export_functions.php
  31. index 557d242..5f4d5e3 100644
  32. --- a/web/skins/classic/includes/export_functions.php
  33. +++ b/web/skins/classic/includes/export_functions.php
  34. @@ -1,4 +1,4 @@
  35. -<?php
  36. +<?php
  37.  //
  38.  // ZoneMinder web export function library, $Date$, $Revision$
  39.  // Copyright (C) 2001-2008 Philip Coombes
  40.  
  41. commit a33afacc1388d3586423e073b787f40aa4d7d6fe
  42. Author: Kfir Itzhak <mastertheknife@gmail.com>
  43. Date:   Sat Feb 5 09:37:01 2011 +0200
  44.  
  45.     Fixed: Generated video download filename ends with .html or wrong filename for firefox users - http://www.zoneminder.com/forums/viewtopic.php?t=16901
  46.  
  47. diff --git a/web/skins/classic/views/video.php b/web/skins/classic/views/video.php
  48. index 263b5ea..1f3ea50 100644
  49. --- a/web/skins/classic/views/video.php
  50. +++ b/web/skins/classic/views/video.php
  51. @@ -88,7 +88,15 @@ if ( isset($_REQUEST['deleteIndex']) )
  52.  if ( isset($_REQUEST['downloadIndex']) )
  53.  {
  54.      $downloadIndex = validInt($_REQUEST['downloadIndex']);
  55. -    header( "Content-disposition: attachment; filename=".$videoFiles[$downloadIndex]."; size=".filesize($videoFiles[$downloadIndex]) );
  56. +    header("Pragma: public");
  57. +    header("Expires: 0");
  58. +    header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
  59. +    header("Cache-Control: private",false); // required by certain browsers
  60. +    header("Content-Description: File Transfer");
  61. +    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.
  62. +    header("Content-Transfer-Encoding: binary");
  63. +    header("Content-Type: application/force-download");
  64. +    header("Content-Length: ".filesize($videoFiles[$downloadIndex]));
  65.      readfile( $videoFiles[$downloadIndex] );
  66.      exit;
  67.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement