Merge branch 'master' into storageareas
This commit is contained in:
commit
5060358870
|
@ -162,9 +162,6 @@ set(ZM_WEB_GROUP "" CACHE STRING
|
|||
Leave empty to be the same as the web user")
|
||||
set(ZM_DIR_EVENTS "${ZM_CONTENTDIR}/events" CACHE PATH
|
||||
"Location where events are recorded to, default: ZM_CONTENTDIR/events")
|
||||
set(ZM_DIR_IMAGES "${ZM_CONTENTDIR}/images" CACHE PATH
|
||||
"Location where images, not directly associated with events,
|
||||
are recorded to, default: ZM_CONTENTDIR/images")
|
||||
set(ZM_DIR_SOUNDS "sounds" CACHE PATH
|
||||
"Location to look for optional sound files, default: sounds")
|
||||
set(ZM_PATH_ZMS "/cgi-bin/nph-zms" CACHE PATH
|
||||
|
@ -225,7 +222,6 @@ if((ZM_TARGET_DISTRO MATCHES "^el") OR (ZM_TARGET_DISTRO MATCHES "^fc"))
|
|||
set(ZM_WEBDIR "/usr/share/zoneminder/www")
|
||||
set(ZM_CGIDIR "/usr/libexec/zoneminder/cgi-bin")
|
||||
set(ZM_DIR_EVENTS "/var/lib/zoneminder/events")
|
||||
set(ZM_DIR_IMAGES "/var/lib/zoneminder/images")
|
||||
set(ZM_PATH_ZMS "/cgi-bin-zm/nph-zms")
|
||||
elseif(ZM_TARGET_DISTRO STREQUAL "OS13")
|
||||
set(ZM_RUNDIR "/var/run/zoneminder")
|
||||
|
|
5
INSTALL
5
INSTALL
|
@ -51,7 +51,6 @@ Possible configuration options:
|
|||
ZM_WEB_USER The user apache or the local web server runs on. Leave empty for automatic detection. If that fails, you can use this variable to force
|
||||
ZM_WEB_GROUP The group apache or the local web server runs on, Leave empty to be the same as the web user
|
||||
ZM_DIR_EVENTS Location where events are recorded to, default: ZM_CONTENTDIR/events
|
||||
ZM_DIR_IMAGES Location where images, not directly associated with events, are recorded to, default: ZM_CONTENTDIR/images
|
||||
ZM_DIR_SOUNDS Location to look for optional sound files, default: sounds
|
||||
ZM_PATH_ZMS Web url to zms streaming server, default: /cgi-bin/nph-zms
|
||||
Advanced:
|
||||
|
@ -129,8 +128,8 @@ cmake -C zm_conf.cmake [extra options] .
|
|||
|
||||
2) Run "make" to compile ZoneMinder
|
||||
3) Run "make install" (as root, or use sudo) to install ZoneMinder to your system.
|
||||
4) Depending on your configuration: If the DIR_EVENTS and DIR_IMAGES options are set to default (pointing to web directory/events and web directory/images), You will need to update the symlinks in the web directory to the correct folders. e.g. web directory/events should point to the real events directory, and likewise for the images directory.
|
||||
You can use the zmlinkcontent.sh script for this. For example, if /var/lib/zoneminder is the folder that contains the "images" and "events" directories, you can use:
|
||||
4) Depending on your configuration: If DIR_EVENTS is set to default, You will need to update the symlinks in the web directory to the correct folders. e.g. web directory/events should point to the real events directory.
|
||||
You can use the zmlinkcontent.sh script for this. For example, if /var/lib/zoneminder is the folder that contains the "events" directory, you can use:
|
||||
./zmlinkcontent.sh /var/lib/zoneminder
|
||||
By default, the content directory for new installations is /var/lib/zoneminder. This can be overridden in cmake with the ZM_CONTENTDIR option. e.g. cmake -DZM_CONTENTDIR="/some/big/storage/zm" .
|
||||
|
||||
|
|
|
@ -16,11 +16,6 @@
|
|||
# The web account user must have full read/write permission to this folder.
|
||||
ZM_DIR_EVENTS=@ZM_DIR_EVENTS@
|
||||
|
||||
# Full path to the folder images, not directly associated with events,
|
||||
# are recorded to.
|
||||
# The web account user must have full read/write permission to this folder.
|
||||
ZM_DIR_IMAGES=@ZM_DIR_IMAGES@
|
||||
|
||||
# Foldername under the webroot where ZoneMinder looks for optional sound files
|
||||
# to play when an alarm is detected.
|
||||
ZM_DIR_SOUNDS=@ZM_DIR_SOUNDS@
|
||||
|
|
|
@ -24,7 +24,6 @@ override_dh_auto_configure:
|
|||
-DZM_CONFIG_SUBDIR="/etc/zm/conf.d" \
|
||||
-DZM_CONFIG_DIR="/etc/zm" \
|
||||
-DZM_DIR_EVENTS="/var/cache/zoneminder/events" \
|
||||
-DZM_DIR_IMAGES="/var/cache/zoneminder/images" \
|
||||
-DZM_PATH_ZMS="/zm/cgi-bin/nph-zms"
|
||||
|
||||
override_dh_auto_install:
|
||||
|
|
|
@ -21,7 +21,7 @@ endif(ZM_TARGET_DISTRO MATCHES "^el")
|
|||
# Configure the common zoneminder files
|
||||
configure_file(common/zoneminder.logrotate.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.logrotate @ONLY)
|
||||
configure_file(common/zoneminder.service.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.service @ONLY)
|
||||
file(MAKE_DIRECTORY sock swap zoneminder zoneminder-upload events images temp)
|
||||
file(MAKE_DIRECTORY sock swap zoneminder zoneminder-upload events temp)
|
||||
|
||||
# Configure the Apache zoneminder files
|
||||
configure_file(httpd/zm-httpd.conf.in ${CMAKE_CURRENT_SOURCE_DIR}/zm-httpd.conf @ONLY)
|
||||
|
@ -52,7 +52,7 @@ install(DIRECTORY zoneminder DESTINATION /var/log DIRECTORY_PERMISSIONS OWNER_WR
|
|||
install(DIRECTORY zoneminder DESTINATION /var/run DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
install(DIRECTORY zoneminder DESTINATION /var/cache DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
install(DIRECTORY zoneminder-upload DESTINATION /var/spool DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
install(DIRECTORY events images temp DESTINATION /var/lib/zoneminder DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
install(DIRECTORY events temp DESTINATION /var/lib/zoneminder DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
|
||||
# Install the Apache zoneminder files
|
||||
install(FILES zm-httpd.conf DESTINATION /usr/lib/systemd/system/zoneminder.service.d PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
|
||||
|
|
|
@ -2,5 +2,4 @@ D @ZM_TMPDIR@ 0755 @WEB_USER@ @WEB_GROUP@
|
|||
D @ZM_SOCKDIR@ 0755 @WEB_USER@ @WEB_GROUP@
|
||||
D @ZM_CACHEDIR@ 0755 @WEB_USER@ @WEB_GROUP@
|
||||
d @ZM_DIR_EVENTS@ 0755 @WEB_USER@ @WEB_GROUP@
|
||||
D @ZM_DIR_IMAGES@ 0755 @WEB_USER@ @WEB_GROUP@
|
||||
|
||||
|
|
|
@ -2,5 +2,4 @@ D @ZM_TMPDIR@ 0755 nginx nginx
|
|||
D @ZM_SOCKDIR@ 0755 nginx nginx
|
||||
D @ZM_CACHEDIR@ 0755 nginx nginx
|
||||
d @ZM_DIR_EVENTS@ 0755 nginx nginx
|
||||
D @ZM_DIR_IMAGES@ 0755 nginx nginx
|
||||
|
||||
|
|
|
@ -377,7 +377,6 @@ EOF
|
|||
%{_tmpfilesdir}/zoneminder.httpd.tmpfiles.conf
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_sharedstatedir}/zoneminder
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_sharedstatedir}/zoneminder/events
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_sharedstatedir}/zoneminder/images
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_sharedstatedir}/zoneminder/sock
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_sharedstatedir}/zoneminder/swap
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_sharedstatedir}/zoneminder/temp
|
||||
|
@ -402,7 +401,6 @@ EOF
|
|||
%{_tmpfilesdir}/zoneminder.nginx.tmpfiles.conf
|
||||
%dir %attr(755,nginx,nginx) %{_sharedstatedir}/zoneminder
|
||||
%dir %attr(755,nginx,nginx) %{_sharedstatedir}/zoneminder/events
|
||||
%dir %attr(755,nginx,nginx) %{_sharedstatedir}/zoneminder/images
|
||||
%dir %attr(755,nginx,nginx) %{_sharedstatedir}/zoneminder/sock
|
||||
%dir %attr(755,nginx,nginx) %{_sharedstatedir}/zoneminder/swap
|
||||
%dir %attr(755,nginx,nginx) %{_sharedstatedir}/zoneminder/temp
|
||||
|
|
|
@ -27,7 +27,6 @@ override_dh_auto_configure:
|
|||
-DZM_CGIDIR="/usr/lib/zoneminder/cgi-bin" \
|
||||
-DZM_CACHEDIR="/var/cache/zoneminder/cache" \
|
||||
-DZM_DIR_EVENTS="/var/cache/zoneminder/events" \
|
||||
-DZM_DIR_IMAGES="/var/cache/zoneminder/images" \
|
||||
-DZM_PATH_ZMS="/zm/cgi-bin/nph-zms"
|
||||
|
||||
override_dh_clean:
|
||||
|
|
|
@ -64,7 +64,6 @@ override_dh_auto_configure:
|
|||
-DZM_CONFIG_SUBDIR="/etc/zm/conf.d" \
|
||||
-DZM_CONFIG_DIR="/etc/zm" \
|
||||
-DZM_DIR_EVENTS="/var/cache/zoneminder/events" \
|
||||
-DZM_DIR_IMAGES="/var/cache/zoneminder/images" \
|
||||
-DZM_PATH_ZMS="/zm/cgi-bin/nph-zms"
|
||||
|
||||
override_dh_auto_test:
|
||||
|
|
|
@ -27,7 +27,6 @@ override_dh_auto_configure:
|
|||
-DZM_CGIDIR="/usr/lib/zoneminder/cgi-bin" \
|
||||
-DZM_CACHEDIR="/var/cache/zoneminder/cache" \
|
||||
-DZM_DIR_EVENTS="/var/cache/zoneminder/events" \
|
||||
-DZM_DIR_IMAGES="/var/cache/zoneminder/images" \
|
||||
-DZM_PATH_ZMS="/zm/cgi-bin/nph-zms"
|
||||
|
||||
override_dh_clean:
|
||||
|
|
|
@ -31,7 +31,6 @@ Add the following content to the file and save your changes:
|
|||
::
|
||||
|
||||
ZM_DIR_EVENTS=/full/path/to/the/events/folder
|
||||
ZM_DIR_IMAGES=/full/path/to/the/images/folder
|
||||
|
||||
**Step 5:** Start ZoneMinder and inspect the ZoneMinder log files for errors.
|
||||
::
|
||||
|
|
|
@ -29,7 +29,7 @@ Type
|
|||
Triggers an alarm when motion is detected within it, as long as no alarms have already been triggered in an Active zone. This is the most specialized of the zone types. For instance in the camera covering my garden I keep watch for a hedgehog that visits most nights and scoffs the food out of my cats bowls. By creating a sensitive Exclusive zone in that area I can ensure that a hedgehog alarm will only trigger if there is activity in that small area. If something much bigger occurs, like someone walking by it will trigger a regular alarm and not one from the Exclusive zone. Thus I can ensure I get alarms for big events and also special small events but not the noise in between.
|
||||
|
||||
* Preclusive
|
||||
This zone type is relatively recent. It is called a Preclusive zone because if it is triggered it actually precludes an alarm being generated for that image frame. So motion or other changes that occur in a Preclusive zone will have the effect of ensuring that no alarm occurs at all. The application for this zone type is primarily as a shortcut for detecting general large-scale lighting or other changes. Generally this may be achieved by limiting the maximum number of alarm pixels or other measure in an Active zone. However in some cases that zone may cover an area where the area of variable illumination occurs in different places as the sun and/or shadows move and it thus may be difficult to come up with general values. Additionally, if the sun comes out rapidly then although the initial change may be ignored in this way as the reference image catches up an alarm may ultimately be triggered as the image becomes less different. Using one or more Preclusive zones offers a different approach. Preclusive zones are designed to be fairly small, even just a few pixels across, with quite low alarm thresholds. They should be situated in areas of the image that are less likely to have motion occur such as high on a wall or in a corner. Should a general illumination change occur they would be triggered at least as early as any Active zones and prevent any other zones from generating an alarm. Obviously careful placement is required to ensure that they do not cancel any genuine alarms or that they are not so close together that any motion just hops from one Preclusive zone to another. Preclusive zones may also be used to reduce processing time by situating one over an Active zone. The Preclusive zone is processed first; if it is small, and is triggered, the rest of the zone/image will not be processed.
|
||||
This zone type is relatively recent. It is called a Preclusive zone because if it is triggered it actually precludes an alarm being generated for that image frame. So motion or other changes that occur in a Preclusive zone will have the effect of ensuring that no alarm occurs at all. The application for this zone type is primarily as a shortcut for detecting general large-scale lighting or other changes. Generally this may be achieved by limiting the maximum number of alarm pixels or other measure in an Active zone. However in some cases that zone may cover an area where the area of variable illumination occurs in different places as the sun and/or shadows move and it thus may be difficult to come up with general values. Additionally, if the sun comes out rapidly then although the initial change may be ignored in this way as the reference image catches up an alarm may ultimately be triggered as the image becomes less different. Using one or more Preclusive zones offers a different approach. Preclusive zones are designed to be fairly small, even just a few pixels across, with quite low alarm thresholds. They should be situated in areas of the image that are less likely to have motion occur such as high on a wall or in a corner. Should a general illumination change occur they would be triggered at least as early as any Active zones and prevent any other zones from generating an alarm. Obviously careful placement is required to ensure that they do not cancel any genuine alarms or that they are not so close together that any motion just hops from one Preclusive zone to another. Preclusive zones may also be used to reduce processing time by situating one over an Active zone. The Preclusive zone is processed first; if it is small, and is triggered, the rest of the zone/image will not be processed. See Extend Alarm Frame Count below for a way to hold the preclusive zone active for an extended period.
|
||||
|
||||
* Inactive
|
||||
Suppresses the detection of motion within it. This can be layered on top of any other zone type, preventing motion within the Inactive zone from being effective for any other zone type. Use inactive zones to cover areas in which nothing notable will ever happen or where you get false alarms that don't relate to what you are trying to monitor. Inactive zones may be overlaid on other zones to blank out areas, and are processed first (with the exception of Privacy zones, see below). As a general practice, you should try and make zones abut each other instead of overlapping to avoid repeated duplicate processing of the same area.
|
||||
|
@ -104,6 +104,9 @@ Overload Frame Ignore Count
|
|||
* Number of Blobs > Max Blobs
|
||||
The idea is that after a change like a light going on that is considered too big to count as an alarm, it could take a couple of frames for things to settle down again.
|
||||
|
||||
Extend Alarm Frame Count
|
||||
This field applies to Preclusive Zones only. Placing a value in this field holds the Preclusive zone active for the specified number of frames after the initial triggering event. This is useful in cases where a sudden change in light level triggers the Preclusive zone, but the zone needs to be held active for a few frames as the camera itself adjusts to that change in light level.
|
||||
|
||||
Other information
|
||||
-----------------
|
||||
Refer to `this <http://www.zoneminder.com/wiki/index.php/Understanding_ZoneMinder%27s_Zoning_system_for_Dummies>`__ user contributed Zone guide for additional information will illustrations if you are new to zones and need more help.
|
||||
|
|
|
@ -7,8 +7,6 @@ ZM_DIR_EVENTS - This is the path to the events directory where all the event ima
|
|||
|
||||
USE_DEEP_STORAGE - Traditionally ZoneMinder stores all events for a monitor in one directory for that monitor. This is simple and efficient except when you have very large amounts of events. Some filesystems are unable to store more than 32k files in one directory and even without this limitation, large numbers of files in a directory can slow creation and deletion of files. This option allows you to select an alternate method of storing events by year/month/day/hour/min/second which has the effect of separating events out into more directories, resulting in less per directory, and also making it easier to manually navigate to any events that may have happened at a particular time or date.
|
||||
|
||||
DIR_IMAGES - ZoneMinder generates a myriad of images, mostly of which are associated with events. For those that aren't this is where they go. CAUTION: The directory you specify here cannot be outside the web root. This is a common mistake. Most users should never change this value. If you intend to save images to a second disk or network share, then you should mount the drive or share directly to the ZoneMinder images folder or follow the instructions in the ZoneMinder Wiki titled Using a dedicated Hard Drive.
|
||||
|
||||
DIR_SOUNDS - ZoneMinder can optionally play a sound file when an alarm is detected. This indicates where to look for this file. CAUTION: The directory you specify here cannot be outside the web root. Most users should never change this value.
|
||||
|
||||
PATH_ZMS - The ZoneMinder streaming server is required to send streamed images to your browser. It will be installed into the cgi-bin path given at configuration time. This option determines what the web path to the server is rather than the local path on your machine. Ordinarily the streaming server runs in parser-header mode however if you experience problems with streaming you can change this to non-parsed-header (nph) mode by changing 'zms' to 'nph-zms'.
|
||||
|
|
|
@ -48,7 +48,6 @@ use Time::HiRes qw/gettimeofday/;
|
|||
use Getopt::Long;
|
||||
use autouse 'Pod::Usage'=>qw(pod2usage);
|
||||
|
||||
use constant IMAGE_PATH => $Config{ZM_PATH_WEB}.'/'.$Config{ZM_DIR_IMAGES};
|
||||
use constant EVENT_PATH => ($Config{ZM_DIR_EVENTS}=~m|/|)
|
||||
? $Config{ZM_DIR_EVENTS}
|
||||
: ($Config{ZM_PATH_WEB}.'/'.$Config{ZM_DIR_EVENTS})
|
||||
|
@ -144,7 +143,8 @@ require ZoneMinder::Event;
|
|||
|
||||
my $max_image_age = 6/24; # 6 hours
|
||||
my $max_swap_age = 24/24; # 24 hours
|
||||
my $image_path = IMAGE_PATH;
|
||||
# images now live under the event path
|
||||
my $image_path = EVENT_PATH;
|
||||
|
||||
my $loop = 1;
|
||||
my $cleaned = 0;
|
||||
|
|
|
@ -176,8 +176,6 @@ void process_configfile( char* configFile) {
|
|||
staticConfig.SERVER_ID = atoi(val_ptr);
|
||||
else if ( strcasecmp( name_ptr, "ZM_DIR_EVENTS" ) == 0 )
|
||||
staticConfig.DIR_EVENTS = std::string(val_ptr);
|
||||
else if ( strcasecmp( name_ptr, "ZM_DIR_IMAGES" ) == 0 )
|
||||
staticConfig.DIR_IMAGES = std::string(val_ptr);
|
||||
else if ( strcasecmp( name_ptr, "ZM_DIR_SOUNDS" ) == 0 )
|
||||
staticConfig.DIR_SOUNDS = std::string(val_ptr);
|
||||
else if ( strcasecmp( name_ptr, "ZM_DIR_EXPORTS" ) == 0 )
|
||||
|
|
|
@ -76,7 +76,6 @@ struct StaticConfig {
|
|||
std::string SERVER_NAME;
|
||||
unsigned int SERVER_ID;
|
||||
std::string DIR_EVENTS;
|
||||
std::string DIR_IMAGES;
|
||||
std::string DIR_SOUNDS;
|
||||
std::string DIR_EXPORTS;
|
||||
std::string PATH_ZMS;
|
||||
|
|
|
@ -2646,7 +2646,7 @@ unsigned int Monitor::DetectMotion( const Image &comp_image, Event::StringSet &z
|
|||
} else {
|
||||
// check if end of alarm
|
||||
if (old_zone_alarmed) {
|
||||
Debug(3, "Preclusive Zone %s alarm Ends. Prevíous score: %d", zone->Label(), old_zone_score);
|
||||
Debug(3, "Preclusive Zone %s alarm Ends. Previous score: %d", zone->Label(), old_zone_score);
|
||||
if (old_zone_score > 0) {
|
||||
zone->SetExtendAlarmCount(zone->GetExtendAlarmFrames());
|
||||
}
|
||||
|
|
|
@ -9,37 +9,6 @@ elseif ( !isset($_REQUEST['zid']) )
|
|||
ajaxError( 'No zone id(s) supplied' );
|
||||
}
|
||||
|
||||
if ( canView( 'Monitors' ) )
|
||||
{
|
||||
switch ( $_REQUEST['action'] )
|
||||
{
|
||||
case "zoneImage" :
|
||||
{
|
||||
$wd = getcwd();
|
||||
chdir( ZM_DIR_IMAGES );
|
||||
$hiColor = '0x00ff00';
|
||||
|
||||
$command = getZmuCommand( " -m ".$_REQUEST['mid']." -z" );
|
||||
if ( !isset($_REQUEST['zid']) )
|
||||
$_REQUEST['zid'] = 0;
|
||||
$command .= "'".$_REQUEST['zid'].' '.$hiColor.' '.$_REQUEST['coords']."'";
|
||||
$status = exec( escapeshellcmd($command) );
|
||||
chdir( $wd );
|
||||
|
||||
$monitor = dbFetchOne( 'SELECT * FROM Monitors WHERE Id = ?', NULL, array($_REQUEST['mid']) );
|
||||
$points = coordsToPoints( $_REQUEST['coords'] );
|
||||
|
||||
ajaxResponse( array(
|
||||
'zoneImage' => ZM_DIR_IMAGES.'/Zones'.$monitor['Id'].'.jpg?'.time(),
|
||||
'selfIntersecting' => isSelfIntersecting( $points ),
|
||||
'area' => getPolyArea( $points )
|
||||
) );
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ajaxError( 'Unrecognised action or insufficient permissions' );
|
||||
|
||||
?>
|
||||
|
|
|
@ -7,12 +7,10 @@ class ImageComponent extends Component {
|
|||
|
||||
$captImage = sprintf( "%0".$config['ZM_EVENT_IMAGE_DIGITS']."d-capture.jpg", $frame['Frame']['FrameId'] );
|
||||
$captPath = $eventPath.'/'.$captImage;
|
||||
$thumbCaptPath = $config['ZM_DIR_IMAGES'].'/'.$event['Event']['Id'].'-'.$captImage;
|
||||
|
||||
$analImage = sprintf( "%0".$config['ZM_EVENT_IMAGE_DIGITS']."d-analyse.jpg", $frame['Frame']['FrameId'] );
|
||||
$analPath = $eventPath.'/'.$analImage;
|
||||
$analFile = $config['ZM_DIR_EVENTS']."/".$analPath;
|
||||
$thumbAnalPath = $config['ZM_DIR_IMAGES'].'/'.$event['Event']['Id'].'-'.$analImage;
|
||||
|
||||
$alarmFrame = $frame['Frame']['Type']=='Alarm';
|
||||
|
||||
|
@ -31,8 +29,8 @@ class ImageComponent extends Component {
|
|||
$fraction = sprintf( "%.3f", $scale/100 );
|
||||
$scale = (int)round( $scale );
|
||||
|
||||
$thumbCaptPath = preg_replace( "/\.jpg$/", "-$scale.jpg", $thumbCaptPath );
|
||||
$thumbAnalPath = preg_replace( "/\.jpg$/", "-$scale.jpg", $thumbAnalPath );
|
||||
$thumbCaptPath = preg_replace( "/\.jpg$/", "-$scale.jpg", $captPath );
|
||||
$thumbAnalPath = preg_replace( "/\.jpg$/", "-$scale.jpg", $analPath );
|
||||
|
||||
if ( $isAnalImage )
|
||||
{
|
||||
|
|
|
@ -318,7 +318,6 @@ class EventsController extends AppController {
|
|||
'ZM_WEB_LIST_THUMB_WIDTH',
|
||||
'ZM_WEB_LIST_THUMB_HEIGHT',
|
||||
'ZM_EVENT_IMAGE_DIGITS',
|
||||
'ZM_DIR_IMAGES',
|
||||
$thumbs,
|
||||
'ZM_DIR_EVENTS'
|
||||
)
|
||||
|
|
|
@ -137,33 +137,4 @@ class ZonesController extends AppController {
|
|||
return $this->flash(__('The zone could not be deleted. Please, try again.'), array('action' => 'index'));
|
||||
}
|
||||
}
|
||||
|
||||
public function createZoneImage($id = null) {
|
||||
$this->loadModel('Monitor');
|
||||
$this->Monitor->id = $id;
|
||||
if ( !$this->Monitor->exists() ) {
|
||||
throw new NotFoundException(__('Invalid zone'));
|
||||
}
|
||||
|
||||
$this->loadModel('Config');
|
||||
$zm_dir_images = $this->Config->find('list', array(
|
||||
'conditions' => array('Name' => 'ZM_DIR_IMAGES'),
|
||||
'fields' => array('Name', 'Value')
|
||||
));
|
||||
|
||||
$zm_dir_images = $zm_dir_images['ZM_DIR_IMAGES'];
|
||||
$zm_path_web = Configure::read('ZM_PATH_WEB');
|
||||
$zm_path_bin = Configure::read('ZM_PATH_BIN');
|
||||
$images_path = "$zm_path_web/$zm_dir_images";
|
||||
|
||||
chdir($images_path);
|
||||
|
||||
$command = escapeshellcmd("$zm_path_bin/zmu -z -m $id");
|
||||
system($command, $status);
|
||||
|
||||
$this->set(array(
|
||||
'status' => $status,
|
||||
'_serialize' => array('status')
|
||||
));
|
||||
}
|
||||
} // end class
|
||||
|
|
|
@ -288,7 +288,13 @@ if ( !empty($_REQUEST['mid']) && canEdit('Monitors', $_REQUEST['mid']) ) {
|
|||
}
|
||||
|
||||
unset( $_REQUEST['newZone']['Points'] );
|
||||
$types = array();
|
||||
|
||||
# convert these fields to integer e.g. NULL -> 0
|
||||
$types = array(
|
||||
'OverloadFrames' => 'integer',
|
||||
'ExtendAlarmFrames' => 'integer',
|
||||
);
|
||||
|
||||
$changes = getFormChanges($zone, $_REQUEST['newZone'], $types);
|
||||
|
||||
if ( count($changes) ) {
|
||||
|
|
|
@ -608,6 +608,11 @@ function getFormChanges( $values, $newValues, $types=false, $columns=false ) {
|
|||
}
|
||||
}
|
||||
break;
|
||||
case 'integer' :
|
||||
if ( (!isset($values[$key])) or $values[$key] != $value ) {
|
||||
$changes[$key] = $key . ' = '.intval($value);
|
||||
}
|
||||
break;
|
||||
default :
|
||||
{
|
||||
if ( !isset($values[$key]) || ($values[$key] != $value) ) {
|
||||
|
|
|
@ -164,8 +164,8 @@ $running = null;
|
|||
CORSHeaders();
|
||||
|
||||
// Check for valid content dirs
|
||||
if ( !is_writable(ZM_DIR_EVENTS) || !is_writable(ZM_DIR_IMAGES) ) {
|
||||
Warning("Cannot write to content dirs('".ZM_DIR_EVENTS."','".ZM_DIR_IMAGES."'). Check that these exist and are owned by the web account user");
|
||||
if ( !is_writable(ZM_DIR_EVENTS) ) {
|
||||
Warning("Cannot write to event folder ".ZM_DIR_EVENTS.". Check that it exists and is owned by the web account user.");
|
||||
}
|
||||
|
||||
# Globals
|
||||
|
|
|
@ -882,10 +882,6 @@ $OLANG = array(
|
|||
'Prompt' => "Directorul în care sunt stocate evenimentele",
|
||||
'Help' => "Acesta este subdirectorul în care sunt salvate imaginile generate de evenimente şi alte fişiere. Implicit este un subdirector al directorului rădăcina zoneminder; dacă spaţiul nu vă permite puteţi să stocaţi imaginile pe altă partiţie, caz în care ar trebui să faceţi un link la subdirectorul implicit."
|
||||
),
|
||||
'DIR_IMAGES' => array(
|
||||
'Prompt' => "Directorul în care sunt stocate imaginile",
|
||||
'Help' => "ZoneMinder generează multe imagini, majoritate asociate cu evenimente. În acest director vor fi stocate imaginile neasociate evenimentelor."
|
||||
),
|
||||
'DIR_SOUNDS' => array(
|
||||
'Prompt' => "Directorul cu sunetele care pot fi folosite de ZoneMinder",
|
||||
'Help' => "ZoneMinder poate rula un sunet atunci când este detectată o alarmă. Acesta este directorul în care este stocat sunetul care va fi rulat."
|
||||
|
|
Loading…
Reference in New Issue