diff --git a/distros/ubuntu1604/control b/distros/ubuntu1604/control index a860ce6f5..1adea5494 100644 --- a/distros/ubuntu1604/control +++ b/distros/ubuntu1604/control @@ -5,29 +5,23 @@ Maintainer: Dmitry Smirnov Uploaders: Vagrant Cascadian Build-Depends: debhelper (>= 9), dh-systemd, python-sphinx | python3-sphinx, apache2-dev, dh-linktree ,cmake -<<<<<<< HEAD ,libx264-dev, libmp4v2-dev - ,libavcodec-dev, libavformat-dev, libswscale-dev - ,libavutil-dev, libavdevice-dev, libavresample-dev - ,libboost-dev -======= ,libboost-dev ,libavdevice-dev (>= 6:10~) ,libavcodec-dev (>= 6:10~) ,libavformat-dev (>= 6:10~) ,libavutil-dev (>= 6:10~) ,libswscale-dev (>= 6:10~) ->>>>>>> dragndrop_monitor_sorting ,libbz2-dev ,libgcrypt-dev ,libcurl4-gnutls-dev ,libgnutls-openssl-dev - , libjpeg8-dev | libjpeg9-dev | libjpeg62-turbo-dev + ,libjpeg8-dev | libjpeg9-dev | libjpeg62-turbo-dev ,libmysqlclient-dev ,libpcre3-dev ,libpolkit-gobject-1-dev ,libv4l-dev (>= 0.8.3) [!hurd-any] - ,libvlc-dev, + ,libvlc-dev ,libdate-manip-perl ,libdbd-mysql-perl ,libphp-serialization-perl diff --git a/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in b/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in index 849f20ab6..e39cb0ef6 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in +++ b/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in @@ -94,7 +94,7 @@ our %types = ( hint => 'yes|no', pattern => qr|^([yn])|i, check => q( $1 ), - format => q( ($1 =~ /^y/) ? 'yes' : 'no') + format => q( ($1 =~ /^y/) ? 'yes' : 'no' ) }, integer => { db_type => 'integer', @@ -117,8 +117,8 @@ our %types = ( tristate => { db_type => 'string', hint => 'auto|yes|no', - pattern => qr|^([ayn])|i, check=> q( $1 ), - format => q( ($1 =~ /^y/) ? 'yes' : ($1 =~ /^n/ ? 'no' : 'auto' )) + pattern => qr|^([ayn])|i, check=>q( $1 ), + format => q( ($1 =~ /^y/) ? 'yes' : ($1 =~ /^n/ ? 'no' : 'auto' ) ) }, abs_path => { db_type => 'string', @@ -158,7 +158,7 @@ our %types = ( }, email => { db_type => 'string', - hint => 'your.name\@your.domain', + hint => 'your.name@your.domain', pattern => qr|^([a-zA-Z0-9_.-]+)\@([a-zA-Z0-9_.-]+)$|, format => q( $1\@$2 ) }, @@ -238,7 +238,7 @@ our @options = ( supplied user without additional authentication provided such a user is configured ion ZoneMinder. `, - requires => [ { name=> 'ZM_OPT_USE_AUTH', value=>'yes' } ], + requires => [ { name=>'ZM_OPT_USE_AUTH', value=>'yes' } ], type => { db_type => 'string', hint => 'builtin|remote', @@ -263,7 +263,7 @@ our @options = ( external access. You can also switch off authentication relaying if your system is isolated in other ways. `, - requires => [ { name=> 'ZM_OPT_USE_AUTH', value=>'yes' } ], + requires => [ { name=>'ZM_OPT_USE_AUTH', value=>'yes' } ], type => { db_type => 'string', hint => 'hashed|plain|none', @@ -284,8 +284,8 @@ our @options = ( secret increases security substantially. `, requires => [ - { name=> 'ZM_OPT_USE_AUTH', value=>'yes' }, - { name=> 'ZM_AUTH_RELAY', value=>'hashed' } + { name=>'ZM_OPT_USE_AUTH', value=>'yes' }, + { name=>'ZM_AUTH_RELAY', value=>'hashed' } ], type => $types{string}, category => 'system', @@ -307,8 +307,8 @@ our @options = ( authentication, switching this option off may help. `, requires => [ - { name=> 'ZM_OPT_USE_AUTH', value=>'yes' }, - { name=> 'ZM_AUTH_RELAY', value=>'hashed' } + { name=>'ZM_OPT_USE_AUTH', value=>'yes' }, + { name=>'ZM_AUTH_RELAY', value=>'hashed' } ], type => $types{boolean}, category => 'system', @@ -320,7 +320,7 @@ our @options = ( help => q` The default has traditionally been 2 hours. A new hash will automatically be regenerated at half this value. - `, + `, requires => [ { name=>'ZM_OPT_USE_AUTH', value=>'yes' }, { name=>'ZM_AUTH_RELAY', value=>'hashed' } @@ -348,8 +348,8 @@ our @options = ( ZM_AUTH_HASH_SECRET to something unique to your system. `, requires => [ - { name=> 'ZM_OPT_USE_AUTH', value=>'yes' }, - { name=> 'ZM_AUTH_RELAY', value=>'hashed' } + { name=>'ZM_OPT_USE_AUTH', value=>'yes' }, + { name=>'ZM_AUTH_RELAY', value=>'hashed' } ], type => $types{boolean}, category => 'system', @@ -370,7 +370,7 @@ our @options = ( If you find a false positive and can document how to reproduce it, then please report it. This feature defaults to OFF currently due to its experimental nature. - `, + `, type => $types{boolean}, category => 'system', }, @@ -380,7 +380,7 @@ our @options = ( description => 'Enable ZoneMinder APIs', help => q` ZoneMinder now features a new API using which 3rd party - applications can interact with ZoneMinder data. It is + applications can interact with ZoneMinder data. It is STRONGLY recommended that you enable authentication along with APIs. Note that the APIs return sensitive data like Monitor access details which are configured as JSON objects. @@ -392,13 +392,13 @@ our @options = ( }, # PP - Google reCaptcha settings { - name => 'ZM_OPT_USE_GOOG_RECAPTCHA', - default => 'no', - description => 'Add Google reCaptcha to login page', - help => q` - This option allows you to include a google + name => 'ZM_OPT_USE_GOOG_RECAPTCHA', + default => 'no', + description => 'Add Google reCaptcha to login page', + help => q` + This option allows you to include a google reCaptcha validation at login. This means in addition to providing - a valid usernane and password, you will also have to + a valid usernane and password, you will also have to pass the reCaptcha test. Please note that enabling this option results in the zoneminder login page reach out to google servers for captcha validation. Also please note @@ -406,41 +406,41 @@ our @options = ( like zmNinja and zmView as they also need to login to ZoneMinder and they will fail the reCaptcha test. `, - requires => [ - {name=> 'ZM_OPT_USE_AUTH', value=>'yes'} - ], - type => $types{boolean}, - category => 'system', + requires => [ + {name=>'ZM_OPT_USE_AUTH', value=>'yes'} + ], + type => $types{boolean}, + category => 'system', }, { - name => 'ZM_OPT_GOOG_RECAPTCHA_SITEKEY', - default => '...Insert your recaptcha site-key here...', - description => 'Your recaptcha site-key', - help => q`You need to generate your keys from - the Google reCaptcha website. - Please refer to https://www.google.com/recaptcha/ + name => 'ZM_OPT_GOOG_RECAPTCHA_SITEKEY', + default => '...Insert your recaptcha site-key here...', + description => 'Your recaptcha site-key', + help => q`You need to generate your keys from + the Google reCaptcha website. + Please refer to https://www.google.com/recaptcha/ for more details. `, - requires => [ - {name=> 'ZM_OPT_USE_GOOG_RECAPTCHA', value=>'yes'} - ], - type => $types{string}, - category => 'system', + requires => [ + {name=>'ZM_OPT_USE_GOOG_RECAPTCHA', value=>'yes'} + ], + type => $types{string}, + category => 'system', }, { - name => 'ZM_OPT_GOOG_RECAPTCHA_SECRETKEY', - default => '...Insert your recaptcha secret-key here...', - description => 'Your recaptcha secret-key', - help => q`You need to generate your keys from - the Google reCaptcha website. - Please refer to https://www.google.com/recaptcha/ + name => 'ZM_OPT_GOOG_RECAPTCHA_SECRETKEY', + default => '...Insert your recaptcha secret-key here...', + description => 'Your recaptcha secret-key', + help => q`You need to generate your keys from + the Google reCaptcha website. + Please refer to https://www.google.com/recaptcha/ for more details. `, - requires => [ - {name=> 'ZM_OPT_USE_GOOG_RECAPTCHA', value=>'yes'} - ], - type => $types{string}, - category => 'system', + requires => [ + {name=>'ZM_OPT_USE_GOOG_RECAPTCHA', value=>'yes'} + ], + type => $types{string}, + category => 'system', }, { name => 'ZM_DIR_EVENTS', @@ -473,7 +473,7 @@ our @options = ( than 32k files in a single folder inherent in some filesystems. It is important to note that you cannot simply change this option. You must stop zoneminder, enable USE_DEEP_STORAGE, and - then run 'sudo zmupdate.pl --migrate-events'. FAILURE TO DO + then run "sudo zmupdate.pl --migrate-events". FAILURE TO DO SO WILL RESULT IN LOSS OF YOUR DATA! Consult the ZoneMinder WiKi for further details. `, @@ -521,7 +521,7 @@ our @options = ( ZoneMinder's temp folder, which often sits in ram. Since exported archives can potentially become large, it is a good idea to move this folder to some other location on machines with low memory. - `, + `, type => $types{directory}, category => 'paths', }, @@ -751,7 +751,7 @@ our @options = ( installed in the same directory as the ZoneMinder web client files. `, - requires => [ { name=> 'ZM_OPT_CAMBOZOLA', value=>'yes' } ], + requires => [ { name=>'ZM_OPT_CAMBOZOLA', value=>'yes' } ], type => $types{rel_path}, category => 'images', }, @@ -1017,7 +1017,7 @@ our @options = ( default => '@PATH_FFMPEG@', description => 'Path to (optional) ffmpeg mpeg encoder', help => 'This path should point to where ffmpeg has been installed.', - requires => [ { name=> 'ZM_OPT_FFMPEG', value=>'yes' } ], + requires => [ { name=>'ZM_OPT_FFMPEG', value=>'yes' } ], type => $types{abs_path}, category => 'images', }, @@ -1031,8 +1031,8 @@ our @options = ( your own set that apply to the input to ffmpeg (options that are given before the -i option). Check the ffmpeg documentation for a full list of options which may be used here. - `, - requires => [ { name=> 'ZM_OPT_FFMPEG', value=>'yes' } ], + `, + requires => [ { name=>'ZM_OPT_FFMPEG', value=>'yes' } ], type => $types{string}, category => 'images', }, @@ -1048,8 +1048,8 @@ our @options = ( for a full list of options which may be used here. The most common one will often be to force an output frame rate supported by the video encoder. - `, - requires => [ { name=> 'ZM_OPT_FFMPEG', value=>'yes' } ], + `, + requires => [ { name=>'ZM_OPT_FFMPEG', value=>'yes' } ], type => $types{string}, category => 'images', }, @@ -1058,15 +1058,15 @@ our @options = ( default => 'mpg mpeg wmv asf avi* mov swf 3gp**', description => 'Formats to allow for ffmpeg video generation', help => q` - Ffmpeg can generate video in many different formats. This - option allows you to list the ones you want to be able to - select. As new formats are supported by ffmpeg you can add them - here and be able to use them immediately. Adding a '*' after a - format indicates that this will be the default format used for - web video, adding '**' defines the default format for phone - video. - `, - requires => [ { name=> 'ZM_OPT_FFMPEG', value=>'yes' } ], + Ffmpeg can generate video in many different formats. This + option allows you to list the ones you want to be able to + select. As new formats are supported by ffmpeg you can add them + here and be able to use them immediately. Adding a '*' after a + format indicates that this will be the default format used for + web video, adding '**' defines the default format for phone + video. + `, + requires => [ { name=>'ZM_OPT_FFMPEG', value=>'yes' } ], type => $types{string}, category => 'images', }, @@ -1075,13 +1075,13 @@ our @options = ( default => '10', description => 'Timeout in seconds when opening a stream.', help => q` - When Ffmpeg is opening a stream, it can take a long time before - failing; certain circumstances even seem to be able to lock - indefinitely. This option allows you to set a maximum time in - seconds to pass before closing the stream and trying to reopen - it again. - `, - requires => [ { name=> 'ZM_OPT_FFMPEG', value=>'yes' } ], + When Ffmpeg is opening a stream, it can take a long time before + failing; certain circumstances even seem to be able to lock + indefinitely. This option allows you to set a maximum time in + seconds to pass before closing the stream and trying to reopen + it again. + `, + requires => [ { name=>'ZM_OPT_FFMPEG', value=>'yes' } ], type => $types{integer}, category => 'images', }, @@ -1090,20 +1090,20 @@ our @options = ( default => '0', description => 'Save logging output to the system log', help => q` - ZoneMinder logging is now more more integrated between - components and allows you to specify the destination for - logging output and the individual levels for each. This option - lets you control the level of logging output that goes to the - system log. ZoneMinder binaries have always logged to the - system log but now scripts and web logging is also included. To - preserve the previous behaviour you should ensure this value is - set to Info or Warning. This option controls the maximum level - of logging that will be written, so Info includes Warnings and - Errors etc. To disable entirely, set this option to None. You - should use caution when setting this option to Debug as it can - affect severely affect system performance. If you want debug - you will also need to set a level and component below - `, + ZoneMinder logging is now more more integrated between + components and allows you to specify the destination for + logging output and the individual levels for each. This option + lets you control the level of logging output that goes to the + system log. ZoneMinder binaries have always logged to the + system log but now scripts and web logging is also included. To + preserve the previous behaviour you should ensure this value is + set to Info or Warning. This option controls the maximum level + of logging that will be written, so Info includes Warnings and + Errors etc. To disable entirely, set this option to None. You + should use caution when setting this option to Debug as it can + affect severely affect system performance. If you want debug + you will also need to set a level and component below + `, type => { db_type => 'integer', hint => 'None=-5|Panic=-4|Fatal=-3|Error=-2|Warning=-1|Info=0|Debug=1', @@ -1117,23 +1117,23 @@ our @options = ( default => '-5', description => 'Save logging output to component files', help => q` - ZoneMinder logging is now more more integrated between - components and allows you to specify the destination for - logging output and the individual levels for each. This option - lets you control the level of logging output that goes to - individual log files written by specific components. This is - how logging worked previously and although useful for tracking - down issues in specific components it also resulted in many - disparate log files. To preserve this behaviour you should - ensure this value is set to Info or Warning. This option - controls the maximum level of logging that will be written, so - Info includes Warnings and Errors etc. To disable entirely, set - this option to None. You should use caution when setting this - option to Debug as it can affect severely affect system - performance though file output has less impact than the other - options. If you want debug you will also need to set a level - and component below - `, + ZoneMinder logging is now more more integrated between + components and allows you to specify the destination for + logging output and the individual levels for each. This option + lets you control the level of logging output that goes to + individual log files written by specific components. This is + how logging worked previously and although useful for tracking + down issues in specific components it also resulted in many + disparate log files. To preserve this behaviour you should + ensure this value is set to Info or Warning. This option + controls the maximum level of logging that will be written, so + Info includes Warnings and Errors etc. To disable entirely, set + this option to None. You should use caution when setting this + option to Debug as it can affect severely affect system + performance though file output has less impact than the other + options. If you want debug you will also need to set a level + and component below + `, type => { db_type => 'integer', hint => 'None=-5|Panic=-4|Fatal=-3|Error=-2|Warning=-1|Info=0|Debug=1', @@ -1147,20 +1147,20 @@ our @options = ( default => '-5', description => 'Save logging output to the weblog', help => q` - ZoneMinder logging is now more more integrated between - components and allows you to specify the destination for - logging output and the individual levels for each. This option - lets you control the level of logging output from the web - interface that goes to the httpd error log. Note that only web - logging from PHP and JavaScript files is included and so this - option is really only useful for investigating specific issues - with those components. This option controls the maximum level - of logging that will be written, so Info includes Warnings and - Errors etc. To disable entirely, set this option to None. You - should use caution when setting this option to Debug as it can - affect severely affect system performance. If you want debug - you will also need to set a level and component below - `, + ZoneMinder logging is now more more integrated between + components and allows you to specify the destination for + logging output and the individual levels for each. This option + lets you control the level of logging output from the web + interface that goes to the httpd error log. Note that only web + logging from PHP and JavaScript files is included and so this + option is really only useful for investigating specific issues + with those components. This option controls the maximum level + of logging that will be written, so Info includes Warnings and + Errors etc. To disable entirely, set this option to None. You + should use caution when setting this option to Debug as it can + affect severely affect system performance. If you want debug + you will also need to set a level and component below + `, type => { db_type => 'integer', hint => 'None=-5|Panic=-4|Fatal=-3|Error=-2|Warning=-1|Info=0|Debug=1', @@ -1174,24 +1174,24 @@ our @options = ( default => '0', description => 'Save logging output to the database', help => q` - ZoneMinder logging is now more more integrated between - components and allows you to specify the destination for - logging output and the individual levels for each. This option - lets you control the level of logging output that is written to - the database. This is a new option which can make viewing - logging output easier and more intuitive and also makes it - easier to get an overall impression of how the system is - performing. If you have a large or very busy system then it is - possible that use of this option may slow your system down if - the table becomes very large. Ensure you use the - LOG_DATABASE_LIMIT option to keep the table to a manageable - size. This option controls the maximum level of logging that - will be written, so Info includes Warnings and Errors etc. To - disable entirely, set this option to None. You should use - caution when setting this option to Debug as it can affect - severely affect system performance. If you want debug you will - also need to set a level and component below - `, + ZoneMinder logging is now more more integrated between + components and allows you to specify the destination for + logging output and the individual levels for each. This option + lets you control the level of logging output that is written to + the database. This is a new option which can make viewing + logging output easier and more intuitive and also makes it + easier to get an overall impression of how the system is + performing. If you have a large or very busy system then it is + possible that use of this option may slow your system down if + the table becomes very large. Ensure you use the + LOG_DATABASE_LIMIT option to keep the table to a manageable + size. This option controls the maximum level of logging that + will be written, so Info includes Warnings and Errors etc. To + disable entirely, set this option to None. You should use + caution when setting this option to Debug as it can affect + severely affect system performance. If you want debug you will + also need to set a level and component below + `, type => { db_type => 'integer', hint => 'None=-5|Panic=-4|Fatal=-3|Error=-2|Warning=-1|Info=0|Debug=1', @@ -1205,20 +1205,20 @@ our @options = ( default => '7 day', description => 'Maximum number of log entries to retain', help => q` - If you are using database logging then it is possible to - quickly build up a large number of entries in the Logs table. - This option allows you to specify how many of these entries are - kept. If you set this option to a number greater than zero then - that number is used to determine the maximum number of rows, - less than or equal to zero indicates no limit and is not - recommended. You can also set this value to time values such as - ' day' which will limit the log entries to those newer than - that time. You can specify 'hour', 'day', 'week', 'month' and - 'year', note that the values should be singular (no 's' at the - end). The Logs table is pruned periodically so it is possible - for more than the expected number of rows to be present briefly - in the meantime. - `, + If you are using database logging then it is possible to + quickly build up a large number of entries in the Logs table. + This option allows you to specify how many of these entries are + kept. If you set this option to a number greater than zero then + that number is used to determine the maximum number of rows, + less than or equal to zero indicates no limit and is not + recommended. You can also set this value to time values such as + ' day' which will limit the log entries to those newer than + that time. You can specify 'hour', 'day', 'week', 'month' and + 'year', note that the values should be singular (no 's' at the + end). The Logs table is pruned periodically so it is possible + for more than the expected number of rows to be present briefly + in the meantime. + `, type => $types{string}, category => 'logging', }, @@ -1227,15 +1227,15 @@ our @options = ( default => 'no', description => 'Switch debugging on', help => q` - ZoneMinder components usually support debug logging available - to help with diagnosing problems. Binary components have - several levels of debug whereas more other components have only - one. Normally this is disabled to minimise performance - penalties and avoid filling logs too quickly. This option lets - you switch on other options that allow you to configure - additional debug information to be output. Components will pick - up this instruction when they are restarted. - `, + ZoneMinder components usually support debug logging available + to help with diagnosing problems. Binary components have + several levels of debug whereas more other components have only + one. Normally this is disabled to minimise performance + penalties and avoid filling logs too quickly. This option lets + you switch on other options that allow you to configure + additional debug information to be output. Components will pick + up this instruction when they are restarted. + `, type => $types{boolean}, category => 'logging', }, @@ -1244,17 +1244,17 @@ our @options = ( default => '', description => 'What components should have extra debug enabled', help => q` - There are three scopes of debug available. Leaving this option - blank means that all components will use extra debug (not - recommended). Setting this option to '_', e.g. _zmc, - will limit extra debug to that component only. Setting this - option to '__', e.g. '_zmc_m1' will limit - extra debug to that instance of the component only. This is - ordinarily what you probably want to do. To debug scripts use - their names without the .pl extension, e.g. '_zmvideo' and to - debug issues with the web interface use '_web'. You can specify - multiple targets by separating them with '|' characters. - `, + There are three scopes of debug available. Leaving this option + blank means that all components will use extra debug (not + recommended). Setting this option to '_', e.g. _zmc, + will limit extra debug to that component only. Setting this + option to '__', e.g. '_zmc_m1' will limit + extra debug to that instance of the component only. This is + ordinarily what you probably want to do. To debug scripts use + their names without the .pl extension, e.g. '_zmvideo' and to + debug issues with the web interface use '_web'. You can specify + multiple targets by separating them with '|' characters. + `, requires => [ { name => 'ZM_LOG_DEBUG', value => 'yes' } ], type => $types{string}, category => 'logging', @@ -1264,16 +1264,16 @@ our @options = ( default => 1, description => 'What level of extra debug should be enabled', help => q` - There are 9 levels of debug available, with higher numbers - being more debug and level 0 being no debug. However not all - levels are used by all components. Also if there is debug at a - high level it is usually likely to be output at such a volume - that it may obstruct normal operation. For this reason you - should set the level carefully and cautiously until the degree - of debug you wish to see is present. Scripts and the web - interface only have one level so this is an on/off type option - for them. - `, + There are 9 levels of debug available, with higher numbers + being more debug and level 0 being no debug. However not all + levels are used by all components. Also if there is debug at a + high level it is usually likely to be output at such a volume + that it may obstruct normal operation. For this reason you + should set the level carefully and cautiously until the degree + of debug you wish to see is present. Scripts and the web + interface only have one level so this is an on/off type option + for them. + `, requires => [ { name => 'ZM_LOG_DEBUG', value => 'yes' } ], type => { db_type => 'integer', @@ -1288,22 +1288,22 @@ our @options = ( default => '@ZM_LOGDIR@/zm_debug.log+', description => 'Where extra debug is output to', help => q` - This option allows you to specify a different target for debug - output. All components have a default log file which will - norally be in /tmp or /var/log and this is where debug will be - written to if this value is empty. Adding a path here will - temporarily redirect debug, and other logging output, to this - file. This option is a simple filename and you are debugging - several components then they will all try and write to the same - file with undesirable consequences. Appending a '+' to the - filename will cause the file to be created with a '.' - suffix containing your process id. In this way debug from each - run of a component is kept separate. This is the recommended - setting as it will also prevent subsequent runs from - overwriting the same log. You should ensure that permissions - are set up to allow writing to the file and directory specified - here. - `, + This option allows you to specify a different target for debug + output. All components have a default log file which will + norally be in /tmp or /var/log and this is where debug will be + written to if this value is empty. Adding a path here will + temporarily redirect debug, and other logging output, to this + file. This option is a simple filename and you are debugging + several components then they will all try and write to the same + file with undesirable consequences. Appending a '+' to the + filename will cause the file to be created with a '.' + suffix containing your process id. In this way debug from each + run of a component is kept separate. This is the recommended + setting as it will also prevent subsequent runs from + overwriting the same log. You should ensure that permissions + are set up to allow writing to the file and directory specified + here. + `, requires => [ { name => 'ZM_LOG_DEBUG', value => 'yes' } ], type => $types{string}, category => 'logging', @@ -1313,13 +1313,13 @@ our @options = ( default => '900', description => 'Time period used when calculating overall system health', help => q` - When ZoneMinder is logging events to the database it can - retrospectively examine the number of warnings and errors that - have occurred to calculate an overall state of system health. - This option allows you to indicate what period of historical - events are used in this calculation. This value is expressed in - seconds and is ignored if LOG_LEVEL_DATABASE is set to None. - `, + When ZoneMinder is logging events to the database it can + retrospectively examine the number of warnings and errors that + have occurred to calculate an overall state of system health. + This option allows you to indicate what period of historical + events are used in this calculation. This value is expressed in + seconds and is ignored if LOG_LEVEL_DATABASE is set to None. + `, type => $types{integer}, category => 'logging', }, @@ -1328,15 +1328,15 @@ our @options = ( default => '1', description => 'Number of warnings indicating system alert state', help => q` - When ZoneMinder is logging events to the database it can - retrospectively examine the number of warnings and errors that - have occurred to calculate an overall state of system health. - This option allows you to specify how many warnings must have - occurred within the defined time period to generate an overall - system alert state. A value of zero means warnings are not - considered. This value is ignored if LOG_LEVEL_DATABASE is set - to None. - `, + When ZoneMinder is logging events to the database it can + retrospectively examine the number of warnings and errors that + have occurred to calculate an overall state of system health. + This option allows you to specify how many warnings must have + occurred within the defined time period to generate an overall + system alert state. A value of zero means warnings are not + considered. This value is ignored if LOG_LEVEL_DATABASE is set + to None. + `, type => $types{integer}, category => 'logging', }, @@ -1345,15 +1345,15 @@ our @options = ( default => '1', description => 'Number of errors indicating system alert state', help => q` - When ZoneMinder is logging events to the database it can - retrospectively examine the number of warnings and errors that - have occurred to calculate an overall state of system health. - This option allows you to specify how many errors must have - occurred within the defined time period to generate an overall - system alert state. A value of zero means errors are not - considered. This value is ignored if LOG_LEVEL_DATABASE is set - to None. - `, + When ZoneMinder is logging events to the database it can + retrospectively examine the number of warnings and errors that + have occurred to calculate an overall state of system health. + This option allows you to specify how many errors must have + occurred within the defined time period to generate an overall + system alert state. A value of zero means errors are not + considered. This value is ignored if LOG_LEVEL_DATABASE is set + to None. + `, type => $types{integer}, category => 'logging', }, @@ -1362,15 +1362,15 @@ our @options = ( default => '0', description => 'Number of fatal error indicating system alert state', help => q` - When ZoneMinder is logging events to the database it can - retrospectively examine the number of warnings and errors that - have occurred to calculate an overall state of system health. - This option allows you to specify how many fatal errors - (including panics) must have occurred within the defined time - period to generate an overall system alert state. A value of - zero means fatal errors are not considered. This value is - ignored if LOG_LEVEL_DATABASE is set to None. - `, + When ZoneMinder is logging events to the database it can + retrospectively examine the number of warnings and errors that + have occurred to calculate an overall state of system health. + This option allows you to specify how many fatal errors + (including panics) must have occurred within the defined time + period to generate an overall system alert state. A value of + zero means fatal errors are not considered. This value is + ignored if LOG_LEVEL_DATABASE is set to None. + `, type => $types{integer}, category => 'logging', }, @@ -1379,15 +1379,15 @@ our @options = ( default => '100', description => 'Number of warnings indicating system alarm state', help => q` - When ZoneMinder is logging events to the database it can - retrospectively examine the number of warnings and errors that - have occurred to calculate an overall state of system health. - This option allows you to specify how many warnings must have - occurred within the defined time period to generate an overall - system alarm state. A value of zero means warnings are not - considered. This value is ignored if LOG_LEVEL_DATABASE is set - to None. - `, + When ZoneMinder is logging events to the database it can + retrospectively examine the number of warnings and errors that + have occurred to calculate an overall state of system health. + This option allows you to specify how many warnings must have + occurred within the defined time period to generate an overall + system alarm state. A value of zero means warnings are not + considered. This value is ignored if LOG_LEVEL_DATABASE is set + to None. + `, type => $types{integer}, category => 'logging', }, @@ -1396,15 +1396,15 @@ our @options = ( default => '10', description => 'Number of errors indicating system alarm state', help => q` - When ZoneMinder is logging events to the database it can - retrospectively examine the number of warnings and errors that - have occurred to calculate an overall state of system health. - This option allows you to specify how many errors must have - occurred within the defined time period to generate an overall - system alarm state. A value of zero means errors are not - considered. This value is ignored if LOG_LEVEL_DATABASE is set - to None. - `, + When ZoneMinder is logging events to the database it can + retrospectively examine the number of warnings and errors that + have occurred to calculate an overall state of system health. + This option allows you to specify how many errors must have + occurred within the defined time period to generate an overall + system alarm state. A value of zero means errors are not + considered. This value is ignored if LOG_LEVEL_DATABASE is set + to None. + `, type => $types{integer}, category => 'logging', }, @@ -1413,15 +1413,15 @@ our @options = ( default => '1', description => 'Number of fatal error indicating system alarm state', help => q` - When ZoneMinder is logging events to the database it can - retrospectively examine the number of warnings and errors that - have occurred to calculate an overall state of system health. - This option allows you to specify how many fatal errors - (including panics) must have occurred within the defined time - period to generate an overall system alarm state. A value of - zero means fatal errors are not considered. This value is - ignored if LOG_LEVEL_DATABASE is set to None. - `, + When ZoneMinder is logging events to the database it can + retrospectively examine the number of warnings and errors that + have occurred to calculate an overall state of system health. + This option allows you to specify how many fatal errors + (including panics) must have occurred within the defined time + period to generate an overall system alarm state. A value of + zero means fatal errors are not considered. This value is + ignored if LOG_LEVEL_DATABASE is set to None. + `, type => $types{integer}, category => 'logging', }, @@ -1430,16 +1430,16 @@ our @options = ( default => 'yes', description => 'Record event statistical information, switch off if too slow', help => q` - This version of ZoneMinder records detailed information about - events in the Stats table. This can help in profiling what the - optimum settings are for Zones though this is tricky at - present. However in future releases this will be done more - easily and intuitively, especially with a large sample of - events. The default option of 'yes' allows this information to - be collected now in readiness for this but if you are concerned - about performance you can switch this off in which case no - Stats information will be saved. - `, + This version of ZoneMinder records detailed information about + events in the Stats table. This can help in profiling what the + optimum settings are for Zones though this is tricky at + present. However in future releases this will be done more + easily and intuitively, especially with a large sample of + events. The default option of 'yes' allows this information to + be collected now in readiness for this but if you are concerned + about performance you can switch this off in which case no + Stats information will be saved. + `, type => $types{boolean}, category => 'logging', }, @@ -1448,16 +1448,16 @@ our @options = ( default => 'no', description => 'Record intermediate alarm diagnostic images, can be very slow', help => q` - In addition to recording event statistics you can also record - the intermediate diagnostic images that display the results of - the various checks and processing that occur when trying to - determine if an alarm event has taken place. There are several - of these images generated for each frame and zone for each - alarm or alert frame so this can have a massive impact on - performance. Only switch this setting on for debug or analysis - purposes and remember to switch it off again once no longer - required. - `, + In addition to recording event statistics you can also record + the intermediate diagnostic images that display the results of + the various checks and processing that occur when trying to + determine if an alarm event has taken place. There are several + of these images generated for each frame and zone for each + alarm or alert frame so this can have a massive impact on + performance. Only switch this setting on for debug or analysis + purposes and remember to switch it off again once no longer + required. + `, type => $types{boolean}, category => 'logging', }, @@ -1466,23 +1466,23 @@ our @options = ( default => 'no', description => 'Create core files on unexpected process failure.', help => q` - When an unrecoverable error occurs in a ZoneMinder binary - process is has traditionally been trapped and the details - written to logs to aid in remote analysis. However in some - cases it is easier to diagnose the error if a core file, which - is a memory dump of the process at the time of the error, is - created. This can be interactively analysed in the debugger and - may reveal more or better information than that available from - the logs. This option is recommended for advanced users only - otherwise leave at the default. Note using this option to - trigger core files will mean that there will be no indication - in the binary logs that a process has died, they will just - stop, however the zmdc log will still contain an entry. Also - note that you may have to explicitly enable core file creation - on your system via the 'ulimit -c' command or other means - otherwise no file will be created regardless of the value of - this option. - `, + When an unrecoverable error occurs in a ZoneMinder binary + process is has traditionally been trapped and the details + written to logs to aid in remote analysis. However in some + cases it is easier to diagnose the error if a core file, which + is a memory dump of the process at the time of the error, is + created. This can be interactively analysed in the debugger and + may reveal more or better information than that available from + the logs. This option is recommended for advanced users only + otherwise leave at the default. Note using this option to + trigger core files will mean that there will be no indication + in the binary logs that a process has died, they will just + stop, however the zmdc log will still contain an entry. Also + note that you may have to explicitly enable core file creation + on your system via the 'ulimit -c' command or other means + otherwise no file will be created regardless of the value of + this option. + `, type => $types{boolean}, category => 'logging', }, @@ -1491,19 +1491,19 @@ our @options = ( default => '/dev/shm', description => 'Path to the mapped memory files that that ZoneMinder can use', help => q` - ZoneMinder has historically used IPC shared memory for shared - data between processes. This has it's advantages and - limitations. This version of ZoneMinder can use an alternate - method, mapped memory, instead with can be enabled with the - --enable--mmap directive to configure. This requires less - system configuration and is generally more flexible. However it - requires each shared data segment to map onto a filesystem - file. This option indicates where those mapped files go. You - should ensure that this location has sufficient space for these - files and for the best performance it should be a tmpfs file - system or ramdisk otherwise disk access may render this method - slower than the regular shared memory one. - `, + ZoneMinder has historically used IPC shared memory for shared + data between processes. This has it's advantages and + limitations. This version of ZoneMinder can use an alternate + method, mapped memory, instead with can be enabled with the + --enable--mmap directive to configure. This requires less + system configuration and is generally more flexible. However it + requires each shared data segment to map onto a filesystem + file. This option indicates where those mapped files go. You + should ensure that this location has sufficient space for these + files and for the best performance it should be a tmpfs file + system or ramdisk otherwise disk access may render this method + slower than the regular shared memory one. + `, type => $types{abs_path}, category => 'paths', }, @@ -1512,12 +1512,12 @@ our @options = ( default => '@ZM_SOCKDIR@', description => 'Path to the various Unix domain socket files that ZoneMinder uses', help => q` - ZoneMinder generally uses Unix domain sockets where possible. - This reduces the need for port assignments and prevents - external applications from possibly compromising the daemons. - However each Unix socket requires a .sock file to be created. - This option indicates where those socket files go. - `, + ZoneMinder generally uses Unix domain sockets where possible. + This reduces the need for port assignments and prevents + external applications from possibly compromising the daemons. + However each Unix socket requires a .sock file to be created. + This option indicates where those socket files go. + `, type => $types{abs_path}, category => 'paths', }, @@ -1526,11 +1526,11 @@ our @options = ( default => '@ZM_LOGDIR@', description => 'Path to the various logs that the ZoneMinder daemons generate', help => q` - There are various daemons that are used by ZoneMinder to - perform various tasks. Most generate helpful log files and this - is where they go. They can be deleted if not required for - debugging. - `, + There are various daemons that are used by ZoneMinder to + perform various tasks. Most generate helpful log files and this + is where they go. They can be deleted if not required for + debugging. + `, type => $types{abs_path}, category => 'paths', }, @@ -1539,12 +1539,12 @@ our @options = ( default => '@ZM_TMPDIR@', description => 'Path to location for temporary swap images used in streaming', help => q` - Buffered playback requires temporary swap images to be stored - for each instance of the streaming daemons. This option - determines where these images will be stored. The images will - actually be stored in sub directories beneath this location and - will be automatically cleaned up after a period of time. - `, + Buffered playback requires temporary swap images to be stored + for each instance of the streaming daemons. This option + determines where these images will be stored. The images will + actually be stored in sub directories beneath this location and + will be automatically cleaned up after a period of time. + `, type => $types{abs_path}, category => 'paths', }, @@ -1553,13 +1553,13 @@ our @options = ( default => '', description => 'Path to a supported ARP tool', help => q` - The camera probe function uses Address Resolution Protocol in - order to find known devices on the network. Optionally supply - the full path to 'ip neigh', 'arp -a', or any other tool on - your system that returns ip/mac address pairs. If this field is - left empty, ZoneMinder will search for the command 'arp' and - attempt to use that. - `, + The camera probe function uses Address Resolution Protocol in + order to find known devices on the network. Optionally supply + the full path to \"ip neigh\", \"arp -a\", or any other tool on + your system that returns ip/mac address pairs. If this field is + left empty, ZoneMinder will search for the command \"arp\" and + attempt to use that. + `, type => $types{abs_path}, category => 'paths', }, @@ -1568,11 +1568,11 @@ our @options = ( default => 'ZM', description => 'The title prefix displayed on each window', help => q` - If you have more than one installation of ZoneMinder it can be - helpful to display different titles for each one. Changing this - option allows you to customise the window titles to include - further information to aid identification. - `, + If you have more than one installation of ZoneMinder it can be + helpful to display different titles for each one. Changing this + option allows you to customise the window titles to include + further information to aid identification. + `, type => $types{string}, category => 'web', }, @@ -1581,12 +1581,12 @@ our @options = ( default => '', description => 'Arbitrary text message near the top of the console', help => q` - Allows the administrator to place an arbitrary text message - near the top of the web console. This is useful for the developers - to display a message which indicates the running instance of - ZoneMinder is a development snapshot, but it can also be used for - any other purpose as well. - `, + Allows the administrator to place an arbitrary text message + near the top of the web console. This is useful for the developers + to display a message which indicates the running instance of + ZoneMinder is a development snapshot, but it can also be used for + any other purpose as well. + `, type => $types{string}, category => 'web', }, @@ -1594,13 +1594,12 @@ our @options = ( name => 'ZM_WEB_EVENT_DISK_SPACE', default => 'no', description => 'Whether to show disk space used by each event.', - help => q` - Adds another column to the listing of events - showing the disk space used by the event. This will impart a small - overhead as it will call du on the event directory. In practice - this overhead is fairly small but may be noticeable on IO-constrained - systems. - `, + help => q`Adds another column to the listing of events + showing the disk space used by the event. This will impart a small + overhead as it will call du on the event directory. In practice + this overhead is fairly small but may be noticeable on IO-constrained + systems. + `, type => $types{string}, category => 'web', }, @@ -1609,14 +1608,14 @@ our @options = ( default => 'yes', description => 'Should the console window resize itself to fit', help => q` - Traditionally the main ZoneMinder web console window has - resized itself to shrink to a size small enough to list only - the monitors that are actually present. This is intended to - make the window more unobtrusize but may not be to everyones - tastes, especially if opened in a tab in browsers which support - this kind if layout. Switch this option off to have the console - window size left to the users preference - `, + Traditionally the main ZoneMinder web console window has + resized itself to shrink to a size small enough to list only + the monitors that are actually present. This is intended to + make the window more unobtrusize but may not be to everyones + tastes, especially if opened in a tab in browsers which support + this kind if layout. Switch this option off to have the console + window size left to the users preference + `, type => $types{boolean}, category => 'web', }, @@ -1624,9 +1623,10 @@ our @options = ( name => 'ZM_WEB_ID_ON_CONSOLE', default => 'no', description => 'Should the console list the monitor id', - help => q`Some find it useful to have the id always visible - on the console. This option will add a column listing it. - `, + help => q` + Some find it useful to have the id always visible + on the console. This option will add a column listing it. + `, type => $types{boolean}, category => 'web', }, @@ -1635,12 +1635,12 @@ our @options = ( default => 'yes', description => 'Should the monitor window jump to the top if an alarm occurs', help => q` - When viewing a live monitor stream you can specify whether you - want the window to pop to the front if an alarm occurs when the - window is minimised or behind another window. This is most - useful if your monitors are over doors for example when they - can pop up if someone comes to the doorway. - `, + When viewing a live monitor stream you can specify whether you + want the window to pop to the front if an alarm occurs when the + window is minimised or behind another window. This is most + useful if your monitors are over doors for example when they + can pop up if someone comes to the doorway. + `, type => $types{boolean}, category => 'web', }, @@ -1649,12 +1649,12 @@ our @options = ( default => 'no', description => 'Support interfacing with X10 devices', help => q` - If you have an X10 Home Automation setup in your home you can - use ZoneMinder to initiate or react to X10 signals if your - computer has the appropriate interface controller. This option - indicates whether X10 options will be available in the browser - client. - `, + If you have an X10 Home Automation setup in your home you can + use ZoneMinder to initiate or react to X10 signals if your + computer has the appropriate interface controller. This option + indicates whether X10 options will be available in the browser + client. + `, type => $types{boolean}, category => 'x10', }, @@ -1664,10 +1664,10 @@ our @options = ( description => 'What device is your X10 controller connected on', requires => [ { name => 'ZM_OPT_X10', value => 'yes' } ], help => q` - If you have an X10 controller device (e.g. XM10U) connected to - your computer this option details which port it is connected on, - the default of /dev/ttyS0 maps to serial or com port 1. - `, + If you have an X10 controller device (e.g. XM10U) connected to + your computer this option details which port it is connected on, + the default of /dev/ttyS0 maps to serial or com port 1. + `, type => $types{abs_path}, category => 'x10', }, @@ -1677,11 +1677,11 @@ our @options = ( description => 'What X10 house code should be used', requires => [ { name => 'ZM_OPT_X10', value => 'yes' } ], help => q` - X10 devices are grouped together by identifying them as all - belonging to one House Code. This option details what that is. - It should be a single letter between A and P. - `, - type => { db_type=> 'string', hint=>'A-P', pattern=> qr|^([A-P])|i, format=> q( uc($1) ) }, + X10 devices are grouped together by identifying them as all + belonging to one House Code. This option details what that is. + It should be a single letter between A and P. + `, + type => { db_type=>'string', hint=>'A-P', pattern=>qr|^([A-P])|i, format=>q( uc($1) ) }, category => 'x10', }, { @@ -1690,11 +1690,11 @@ our @options = ( description => 'How often (in seconds) the X10 daemon reloads the monitors from the database', requires => [ { name => 'ZM_OPT_X10', value => 'yes' } ], help => q` - The zmx10 daemon periodically checks the database to find out - what X10 events trigger, or result from, alarms. This option - determines how frequently this check occurs, unless you change - this area frequently this can be a fairly large value. - `, + The zmx10 daemon periodically checks the database to find out + what X10 events trigger, or result from, alarms. This option + determines how frequently this check occurs, unless you change + this area frequently this can be a fairly large value. + `, type => $types{integer}, category => 'x10', }, @@ -1703,10 +1703,10 @@ our @options = ( default => 'no', description => 'Should the monitor window play a sound if an alarm occurs', help => q` - When viewing a live monitor stream you can specify whether you - want the window to play a sound to alert you if an alarm - occurs. - `, + When viewing a live monitor stream you can specify whether you + want the window to play a sound to alert you if an alarm + occurs. + `, type => $types{boolean}, category => 'web', }, @@ -1715,12 +1715,12 @@ our @options = ( default => '', description => 'The sound to play on alarm, put this in the sounds directory', help => q` - You can specify a sound file to play if an alarm occurs whilst - you are watching a live monitor stream. So long as your browser - understands the format it does not need to be any particular - type. This file should be placed in the sounds directory - defined earlier. - `, + You can specify a sound file to play if an alarm occurs whilst + you are watching a live monitor stream. So long as your browser + understands the format it does not need to be any particular + type. This file should be placed in the sounds directory + defined earlier. + `, type => $types{file}, requires => [ { name => 'ZM_WEB_SOUND_ON_ALARM', value => 'yes' } ], category => 'web', @@ -1730,13 +1730,13 @@ our @options = ( default => 'no', description => 'Compact the montage view by removing extra detail', help => q` - The montage view shows the output of all of your active - monitors in one window. This include a small menu and status - information for each one. This can increase the web traffic and - make the window larger than may be desired. Setting this option - on removes all this extraneous information and just displays - the images. - `, + The montage view shows the output of all of your active + monitors in one window. This include a small menu and status + information for each one. This can increase the web traffic and + make the window larger than may be desired. Setting this option + on removes all this extraneous information and just displays + the images. + `, type => $types{boolean}, category => 'web', }, @@ -1745,17 +1745,17 @@ our @options = ( default => 'no', description => 'Delete only event database records for speed', help => q` - Normally an event created as the result of an alarm consists of - entries in one or more database tables plus the various files - associated with it. When deleting events in the browser it can - take a long time to remove all of this if your are trying to do - a lot of events at once. It is recommended that you set this - option which means that the browser client only deletes the key - entries in the events table, which means the events will no - longer appear in the listing, and leaves the zmaudit daemon to - clear up the rest later. Note that this feature is less relevant - with modern hardware. Recommend this feature be left off. - `, + Normally an event created as the result of an alarm consists of + entries in one or more database tables plus the various files + associated with it. When deleting events in the browser it can + take a long time to remove all of this if your are trying to do + a lot of events at once. It is recommended that you set this + option which means that the browser client only deletes the key + entries in the events table, which means the events will no + longer appear in the listing, and leaves the zmaudit daemon to + clear up the rest later. Note that this feature is less relevant + with modern hardware. Recommend this feature be left off. + `, type => $types{boolean}, category => 'system', }, @@ -1764,26 +1764,28 @@ our @options = ( default => 'yes', description => 'Allow errors in setting video config to be fatal', help => q` - With some video devices errors can be reported in setting the - various video attributes when in fact the operation was - successful. Switching this option off will still allow these - errors to be reported but will not cause them to kill the video - capture daemon. Note however that doing this will cause all - errors to be ignored including those which are genuine and - which may cause the video capture to not function correctly. - Use this option with caution. - `, + With some video devices errors can be reported in setting the + various video attributes when in fact the operation was + successful. Switching this option off will still allow these + errors to be reported but will not cause them to kill the video + capture daemon. Note however that doing this will cause all + errors to be ignored including those which are genuine and + which may cause the video capture to not function correctly. + Use this option with caution. + `, type => $types{boolean}, category => 'config', }, { name => 'ZM_LD_PRELOAD', default => '', - description => 'Path to library to preload before launching daemons', - help => q`Some older cameras require the use of the v4l1 compat - library. This setting allows the setting of the path - to the library, so that it can be loaded by zmdc.pl - before launching zmc.`, + description => "Path to library to preload before launching daemons", + help => q` + Some older cameras require the use of the v4l1 compat + library. This setting allows the setting of the path + to the library, so that it can be loaded by zmdc.pl + before launching zmc. + `, type => $types{abs_path}, category => 'config', }, @@ -1792,18 +1794,18 @@ our @options = ( default => '10', description => 'How many points in a captured image to check for signal loss', help => q` - For locally attached video cameras ZoneMinder can check for - signal loss by looking at a number of random points on each - captured image. If all of these points are set to the same - fixed colour then the camera is assumed to have lost signal. - When this happens any open events are closed and a short one - frame signal loss event is generated, as is another when the - signal returns. This option defines how many points on each - image to check. Note that this is a maximum, any points found - to not have the check colour will abort any further checks so - in most cases on a couple of points will actually be checked. - Network and file based cameras are never checked. - `, + For locally attached video cameras ZoneMinder can check for + signal loss by looking at a number of random points on each + captured image. If all of these points are set to the same + fixed colour then the camera is assumed to have lost signal. + When this happens any open events are closed and a short one + frame signal loss event is generated, as is another when the + signal returns. This option defines how many points on each + image to check. Note that this is a maximum, any points found + to not have the check colour will abort any further checks so + in most cases on a couple of points will actually be checked. + Network and file based cameras are never checked. + `, type => $types{integer}, category => 'config', }, @@ -1812,21 +1814,21 @@ our @options = ( default => 'yes', description => 'Use more than one buffer for Video 4 Linux devices', help => q` - Performance when using Video 4 Linux devices is usually best if - multiple buffers are used allowing the next image to be - captured while the previous one is being processed. If you have - multiple devices on a card sharing one input that requires - switching then this approach can sometimes cause frames from - one source to be mixed up with frames from another. Switching - this option off prevents multi buffering resulting in slower - but more stable image capture. This option is ignored for - non-local cameras or if only one input is present on a capture - chip. This option addresses a similar problem to the - ZM_CAPTURES_PER_FRAME option and you should normally change the - value of only one of the options at a time. If you have - different capture cards that need different values you can - ovveride them in each individual monitor on the source page. - `, + Performance when using Video 4 Linux devices is usually best if + multiple buffers are used allowing the next image to be + captured while the previous one is being processed. If you have + multiple devices on a card sharing one input that requires + switching then this approach can sometimes cause frames from + one source to be mixed up with frames from another. Switching + this option off prevents multi buffering resulting in slower + but more stable image capture. This option is ignored for + non-local cameras or if only one input is present on a capture + chip. This option addresses a similar problem to the + ZM_CAPTURES_PER_FRAME option and you should normally change the + value of only one of the options at a time. If you have + different capture cards that need different values you can + override them in each individual monitor on the source page. + `, type => $types{boolean}, category => 'config', }, @@ -1835,22 +1837,22 @@ our @options = ( default => '1', description => 'How many images are captured per returned frame, for shared local cameras', help => q` - If you are using cameras attached to a video capture card which - forces multiple inputs to share one capture chip, it can - sometimes produce images with interlaced frames reversed - resulting in poor image quality and a distinctive comb edge - appearance. Increasing this setting allows you to force - additional image captures before one is selected as the - captured frame. This allows the capture hardware to 'settle - down' and produce better quality images at the price of lesser - capture rates. This option has no effect on (a) network - cameras, or (b) where multiple inputs do not share a capture - chip. This option addresses a similar problem to the - ZM_V4L_MULTI_BUFFER option and you should normally change the - value of only one of the options at a time. If you have - different capture cards that need different values you can - ovveride them in each individual monitor on the source page. - `, + If you are using cameras attached to a video capture card which + forces multiple inputs to share one capture chip, it can + sometimes produce images with interlaced frames reversed + resulting in poor image quality and a distinctive comb edge + appearance. Increasing this setting allows you to force + additional image captures before one is selected as the + captured frame. This allows the capture hardware to 'settle + down' and produce better quality images at the price of lesser + capture rates. This option has no effect on (a) network + cameras, or (b) where multiple inputs do not share a capture + chip. This option addresses a similar problem to the + ZM_V4L_MULTI_BUFFER option and you should normally change the + value of only one of the options at a time. If you have + different capture cards that need different values you can + override them in each individual monitor on the source page. + `, type => $types{integer}, category => 'config', }, @@ -1859,14 +1861,14 @@ our @options = ( default => '300', description => 'How often (in seconds) filters are reloaded in zmfilter', help => q` - ZoneMinder allows you to save filters to the database which - allow events that match certain criteria to be emailed, deleted - or uploaded to a remote machine etc. The zmfilter daemon loads - these and does the actual operation. This option determines how - often the filters are reloaded from the database to get the - latest versions or new filters. If you don't change filters - very often this value can be set to a large value. - `, + ZoneMinder allows you to save filters to the database which + allow events that match certain criteria to be emailed, deleted + or uploaded to a remote machine etc. The zmfilter daemon loads + these and does the actual operation. This option determines how + often the filters are reloaded from the database to get the + latest versions or new filters. If you don't change filters + very often this value can be set to a large value. + `, type => $types{integer}, category => 'system', }, @@ -1875,16 +1877,16 @@ our @options = ( default => '60', description => 'How often (in seconds) to run automatic saved filters', help => q` - ZoneMinder allows you to save filters to the database which - allow events that match certain criteria to be emailed, deleted - or uploaded to a remote machine etc. The zmfilter daemon loads - these and does the actual operation. This option determines how - often the filters are executed on the saved event in the - database. If you want a rapid response to new events this - should be a smaller value, however this may increase the - overall load on the system and affect performance of other - elements. - `, + ZoneMinder allows you to save filters to the database which + allow events that match certain criteria to be emailed, deleted + or uploaded to a remote machine etc. The zmfilter daemon loads + these and does the actual operation. This option determines how + often the filters are executed on the saved event in the + database. If you want a rapid response to new events this + should be a smaller value, however this may increase the + overall load on the system and affect performance of other + elements. + `, type => $types{integer}, category => 'system', }, @@ -1893,11 +1895,11 @@ our @options = ( default => 'no', description => 'Should ZoneMinder support uploading events from filters', help => q` - In ZoneMinder you can create event filters that specify whether - events that match certain criteria should be uploaded to a - remote server for archiving. This option specifies whether this - functionality should be available - `, + In ZoneMinder you can create event filters that specify whether + events that match certain criteria should be uploaded to a + remote server for archiving. This option specifies whether this + functionality should be available + `, type => $types{boolean}, category => 'upload', }, @@ -1907,16 +1909,16 @@ our @options = ( description => 'What format the uploaded events should be created in.', requires => [ { name => 'ZM_OPT_UPLOAD', value => 'yes' } ], help => q` - Uploaded events may be stored in either .tar or .zip format, - this option specifies which. Note that to use this you will - need to have the Archive::Tar and/or Archive::Zip perl modules - installed. - `, + Uploaded events may be stored in either .tar or .zip format, + this option specifies which. Note that to use this you will + need to have the Archive::Tar and/or Archive::Zip perl modules + installed. + `, type => { - db_type => 'string', - hint => 'tar|zip', - pattern => qr|^([tz])|i, - format => q( $1 =~ /^t/ ? 'tar' : 'zip' ) + db_type =>'string', + hint =>'tar|zip', + pattern =>qr|^([tz])|i, + format =>q( $1 =~ /^t/ ? 'tar' : 'zip' ) }, category => 'upload', }, @@ -1925,12 +1927,12 @@ our @options = ( default => 'no', description => 'Should archive files be compressed', help => q` - When the archive files are created they can be compressed. - However in general since the images are compressed already this - saves only a minimal amount of space versus utilising more CPU - in their creation. Only enable if you have CPU to waste and are - limited in disk space on your remote server or bandwidth. - `, + When the archive files are created they can be compressed. + However in general since the images are compressed already this + saves only a minimal amount of space versus utilising more CPU + in their creation. Only enable if you have CPU to waste and are + limited in disk space on your remote server or bandwidth. + `, requires => [ { name => 'ZM_OPT_UPLOAD', value => 'yes' } ], type => $types{boolean}, category => 'upload', @@ -1940,15 +1942,15 @@ our @options = ( default => 'no', description => 'Include the analysis files in the archive', help => q` - When the archive files are created they can contain either just - the captured frames or both the captured frames and, for frames - that caused an alarm, the analysed image with the changed area - highlighted. This option controls files are included. Only - include analysed frames if you have a high bandwidth connection - to the remote server or if you need help in figuring out what - caused an alarm in the first place as archives with these files - in can be considerably larger. - `, + When the archive files are created they can contain either just + the captured frames or both the captured frames and, for frames + that caused an alarm, the analysed image with the changed area + highlighted. This option controls files are included. Only + include analysed frames if you have a high bandwidth connection + to the remote server or if you need help in figuring out what + caused an alarm in the first place as archives with these files + in can be considerably larger. + `, requires => [ { name => 'ZM_OPT_UPLOAD', value => 'yes' } ], type => $types{boolean}, category => 'upload', @@ -1959,19 +1961,19 @@ our @options = ( description => 'What protocol to use to upload events', requires => [ { name => 'ZM_OPT_UPLOAD', value => 'yes' } ], help => q` - ZoneMinder can upload events to a remote server using either - FTP or SFTP. Regular FTP is widely supported but not - necessarily very secure whereas SFTP (Secure FTP) runs over an - ssh connection and so is encrypted and uses regular ssh ports. - Note that to use this you will need to have the appropriate - perl module, either Net::FTP or Net::SFTP installed depending - on your choice. - `, + ZoneMinder can upload events to a remote server using either + FTP or SFTP. Regular FTP is widely supported but not + necessarily very secure whereas SFTP (Secure FTP) runs over an + ssh connection and so is encrypted and uses regular ssh ports. + Note that to use this you will need to have the appropriate + perl module, either Net::FTP or Net::SFTP installed depending + on your choice. + `, type => { - db_type => 'string', - hint => 'ftp|sftp', - pattern => qr|^([tz])|i, - format => q( $1 =~ /^f/ ? 'ftp' : 'sftp' ) + db_type =>'string', + hint =>'ftp|sftp', + pattern =>qr|^([tz])|i, + format =>q( $1 =~ /^f/ ? 'ftp' : 'sftp' ) }, category => 'upload', }, @@ -1980,10 +1982,10 @@ our @options = ( default => '', description => 'The remote server to upload to', help => q` - You can use filters to instruct ZoneMinder to upload events to - a remote ftp server. This option indicates the name, or ip - address, of the server to use. - `, + You can use filters to instruct ZoneMinder to upload events to + a remote ftp server. This option indicates the name, or ip + address, of the server to use. + `, requires => [ { name => 'ZM_OPT_UPLOAD', value => 'yes' } ], type => $types{hostname}, category => 'hidden', @@ -1993,10 +1995,10 @@ our @options = ( default => '', description => 'The remote server to upload events to', help => q` - You can use filters to instruct ZoneMinder to upload events to - a remote server. This option indicates the name, or ip address, - of the server to use. - `, + You can use filters to instruct ZoneMinder to upload events to + a remote server. This option indicates the name, or ip address, + of the server to use. + `, requires => [ { name => 'ZM_OPT_UPLOAD', value => 'yes' } ], type => $types{hostname}, category => 'upload', @@ -2006,12 +2008,12 @@ our @options = ( default => '', description => 'The port on the remote upload server, if not the default (SFTP only)', help => q` - You can use filters to instruct ZoneMinder to upload events to - a remote server. If you are using the SFTP protocol then this - option allows you to specify a particular port to use for - connection. If this option is left blank then the default, port - 22, is used. This option is ignored for FTP uploads. - `, + You can use filters to instruct ZoneMinder to upload events to + a remote server. If you are using the SFTP protocol then this + option allows you to specify a particular port to use for + connection. If this option is left blank then the default, port + 22, is used. This option is ignored for FTP uploads. + `, requires => [ { name => 'ZM_OPT_UPLOAD', value => 'yes' } ], type => $types{integer}, category => 'upload', @@ -2021,10 +2023,10 @@ our @options = ( default => '', description => 'Your ftp username', help => q` - You can use filters to instruct ZoneMinder to upload events to - a remote ftp server. This option indicates the username that - ZoneMinder should use to log in for ftp transfer. - `, + You can use filters to instruct ZoneMinder to upload events to + a remote ftp server. This option indicates the username that + ZoneMinder should use to log in for ftp transfer. + `, requires => [ { name => 'ZM_OPT_UPLOAD', value => 'yes' } ], type => $types{alphanum}, category => 'hidden', @@ -2034,10 +2036,10 @@ our @options = ( default => '', description => 'Remote server username', help => q` - You can use filters to instruct ZoneMinder to upload events to - a remote server. This option indicates the username that - ZoneMinder should use to log in for transfer. - `, + You can use filters to instruct ZoneMinder to upload events to + a remote server. This option indicates the username that + ZoneMinder should use to log in for transfer. + `, requires => [ { name => 'ZM_OPT_UPLOAD', value => 'yes' } ], type => $types{alphanum}, category => 'upload', @@ -2047,10 +2049,10 @@ our @options = ( default => '', description => 'Your ftp password', help => q` - You can use filters to instruct ZoneMinder to upload events to - a remote ftp server. This option indicates the password that - ZoneMinder should use to log in for ftp transfer. - `, + You can use filters to instruct ZoneMinder to upload events to + a remote ftp server. This option indicates the password that + ZoneMinder should use to log in for ftp transfer. + `, requires => [ { name => 'ZM_OPT_UPLOAD', value => 'yes' } ], type => $types{string}, category => 'hidden', @@ -2060,12 +2062,12 @@ our @options = ( default => '', description => 'Remote server password', help => q` - You can use filters to instruct ZoneMinder to upload events to - a remote server. This option indicates the password that - ZoneMinder should use to log in for transfer. If you are using - certificate based logins for SFTP servers you can leave this - option blank. - `, + You can use filters to instruct ZoneMinder to upload events to + a remote server. This option indicates the password that + ZoneMinder should use to log in for transfer. If you are using + certificate based logins for SFTP servers you can leave this + option blank. + `, requires => [ { name => 'ZM_OPT_UPLOAD', value => 'yes' } ], type => $types{string}, category => 'upload', @@ -2075,12 +2077,12 @@ our @options = ( default => '@ZM_TMPDIR@', description => 'The local directory in which to create upload files', help => q` - You can use filters to instruct ZoneMinder to upload events to - a remote ftp server. This option indicates the local directory - that ZoneMinder should use for temporary upload files. These - are files that are created from events, uploaded and then - deleted. - `, + You can use filters to instruct ZoneMinder to upload events to + a remote ftp server. This option indicates the local directory + that ZoneMinder should use for temporary upload files. These + are files that are created from events, uploaded and then + deleted. + `, requires => [ { name => 'ZM_OPT_UPLOAD', value => 'yes' } ], type => $types{abs_path}, category => 'hidden', @@ -2090,11 +2092,11 @@ our @options = ( default => '@ZM_TMPDIR@', description => 'The local directory in which to create upload files', help => q` - You can use filters to instruct ZoneMinder to upload events to - a remote server. This option indicates the local directory that - ZoneMinder should use for temporary upload files. These are - files that are created from events, uploaded and then deleted. - `, + You can use filters to instruct ZoneMinder to upload events to + a remote server. This option indicates the local directory that + ZoneMinder should use for temporary upload files. These are + files that are created from events, uploaded and then deleted. + `, requires => [ { name => 'ZM_OPT_UPLOAD', value => 'yes' } ], type => $types{abs_path}, category => 'upload', @@ -2104,11 +2106,10 @@ our @options = ( default => '', description => 'The remote directory to upload to', help => q` - You can use filters to instruct ZoneMinder to upload events to - a remote ftp server. This option indicates the remote directory - that ZoneMinder should use to upload event files to. - `, - requires => [ { name => 'ZM_OPT_UPLOAD', value => 'yes' } ], + You can use filters to instruct ZoneMinder to upload events to + a remote ftp server. This option indicates the remote directory + that ZoneMinder should use to upload event files to. + `, type => $types{rel_path}, category => 'hidden', }, @@ -2117,10 +2118,10 @@ our @options = ( default => '', description => 'The remote directory to upload to', help => q` - You can use filters to instruct ZoneMinder to upload events to - a remote server. This option indicates the remote directory - that ZoneMinder should use to upload event files to. - `, + You can use filters to instruct ZoneMinder to upload events to + a remote server. This option indicates the remote directory + that ZoneMinder should use to upload event files to. + `, requires => [ { name => 'ZM_OPT_UPLOAD', value => 'yes' } ], type => $types{rel_path}, category => 'upload', @@ -2130,12 +2131,12 @@ our @options = ( default => '120', description => 'How long to allow the transfer to take for each file', help => q` - You can use filters to instruct ZoneMinder to upload events to - a remote ftp server. This option indicates the maximum ftp - inactivity timeout (in seconds) that should be tolerated before - ZoneMinder determines that the transfer has failed and closes - down the connection. - `, + You can use filters to instruct ZoneMinder to upload events to + a remote ftp server. This option indicates the maximum ftp + inactivity timeout (in seconds) that should be tolerated before + ZoneMinder determines that the transfer has failed and closes + down the connection. + `, requires => [ { name => 'ZM_OPT_UPLOAD', value => 'yes' } ], type => $types{integer}, category => 'hidden', @@ -2145,12 +2146,12 @@ our @options = ( default => '120', description => 'How long to allow the transfer to take for each file', help => q` - You can use filters to instruct ZoneMinder to upload events to - a remote server. This option indicates the maximum inactivity - timeout (in seconds) that should be tolerated before ZoneMinder - determines that the transfer has failed and closes down the - connection. - `, + You can use filters to instruct ZoneMinder to upload events to + a remote server. This option indicates the maximum inactivity + timeout (in seconds) that should be tolerated before ZoneMinder + determines that the transfer has failed and closes down the + connection. + `, requires => [ { name => 'ZM_OPT_UPLOAD', value => 'yes' } ], type => $types{integer}, category => 'upload', @@ -2160,12 +2161,12 @@ our @options = ( default => 'no', description => 'Require strict host key checking for SFTP uploads', help => q` - You can require SFTP uploads to verify the host key of the remote server - for protection against man-in-the-middle attacks. You will need to add the - server's key to the known_hosts file. On most systems, this will be - ~/.ssh/known_hosts, where ~ is the home directory of the web server running - ZoneMinder. - `, + You can require SFTP uploads to verify the host key of the remote server + for protection against man-in-the-middle attacks. You will need to add the + server's key to the known_hosts file. On most systems, this will be + ~/.ssh/known_hosts, where ~ is the home directory of the web server running + ZoneMinder. + `, requires => [ { name => 'ZM_OPT_UPLOAD', value => 'yes' } ], type => $types{boolean}, category => 'upload', @@ -2175,20 +2176,20 @@ our @options = ( default => 'yes', description => 'Use passive ftp when uploading', help => q` - You can use filters to instruct ZoneMinder to upload events to - a remote ftp server. This option indicates that ftp transfers - should be done in passive mode. This uses a single connection - for all ftp activity and, whilst slower than active transfers, - is more robust and likely to work from behind filewalls. This - option is ignored for SFTP transfers. - `, + You can use filters to instruct ZoneMinder to upload events to + a remote ftp server. This option indicates that ftp transfers + should be done in passive mode. This uses a single connection + for all ftp activity and, whilst slower than active transfers, + is more robust and likely to work from behind filewalls. This + option is ignored for SFTP transfers. + `, requires => [ { name => 'ZM_OPT_UPLOAD', value => 'yes' } ], help => q` - If your computer is behind a firewall or proxy you may need to - set FTP to passive mode. In fact for simple transfers it makes - little sense to do otherwise anyway but you can set this to - 'No' if you wish. - `, + If your computer is behind a firewall or proxy you may need to + set FTP to passive mode. In fact for simple transfers it makes + little sense to do otherwise anyway but you can set this to + 'No' if you wish. + `, type => $types{boolean}, category => 'upload', }, @@ -2197,11 +2198,11 @@ our @options = ( default => 'no', description => 'Switch ftp debugging on', help => q` - You can use filters to instruct ZoneMinder to upload events to - a remote ftp server. If you are having (or expecting) troubles - with uploading events then setting this to 'yes' permits - additional information to be included in the zmfilter log file. - `, + You can use filters to instruct ZoneMinder to upload events to + a remote ftp server. If you are having (or expecting) troubles + with uploading events then setting this to 'yes' permits + additional information to be included in the zmfilter log file. + `, requires => [ { name => 'ZM_OPT_UPLOAD', value => 'yes' } ], type => $types{boolean}, category => 'hidden', @@ -2211,12 +2212,12 @@ our @options = ( default => 'no', description => 'Switch upload debugging on', help => q` - You can use filters to instruct ZoneMinder to upload events to - a remote server. If you are having (or expecting) troubles with - uploading events then setting this to 'yes' permits additional - information to be generated by the underlying transfer modules - and included in the logs. - `, + You can use filters to instruct ZoneMinder to upload events to + a remote server. If you are having (or expecting) troubles with + uploading events then setting this to 'yes' permits additional + information to be generated by the underlying transfer modules + and included in the logs. + `, requires => [ { name => 'ZM_OPT_UPLOAD', value => 'yes' } ], type => $types{boolean}, category => 'upload', @@ -2226,15 +2227,15 @@ our @options = ( default => 'no', description => 'Should ZoneMinder email you details of events that match corresponding filters', help => q` - In ZoneMinder you can create event filters that specify whether - events that match certain criteria should have their details - emailed to you at a designated email address. This will allow - you to be notified of events as soon as they occur and also to - quickly view the events directly. This option specifies whether - this functionality should be available. The email created with - this option can be any size and is intended to be sent to a - regular email reader rather than a mobile device. - `, + In ZoneMinder you can create event filters that specify whether + events that match certain criteria should have their details + emailed to you at a designated email address. This will allow + you to be notified of events as soon as they occur and also to + quickly view the events directly. This option specifies whether + this functionality should be available. The email created with + this option can be any size and is intended to be sent to a + regular email reader rather than a mobile device. + `, type => $types{boolean}, category => 'mail', }, @@ -2244,9 +2245,9 @@ our @options = ( description => 'The email address to send matching event details to', requires => [ { name => 'ZM_OPT_EMAIL', value => 'yes' } ], help => q` - This option is used to define the email address that any events - that match the appropriate filters will be sent to. - `, + This option is used to define the email address that any events + that match the appropriate filters will be sent to. + `, type => $types{email}, category => 'mail', }, @@ -2272,9 +2273,9 @@ our @options = ( description => 'The text of the email used to send matching event details', requires => [ { name => 'ZM_OPT_EMAIL', value => 'yes' } ], help => q` - This option is used to define the content of the email that is - sent for any events that match the appropriate filters. - `, + This option is used to define the content of the email that is + sent for any events that match the appropriate filters. + `, type => $types{text}, category => 'hidden', }, @@ -2284,15 +2285,15 @@ our @options = ( description => 'The subject of the email used to send matching event details', requires => [ { name => 'ZM_OPT_EMAIL', value => 'yes' } ], help => q` - This option is used to define the subject of the email that is - sent for any events that match the appropriate filters. - `, + This option is used to define the subject of the email that is + sent for any events that match the appropriate filters. + `, type => $types{string}, category => 'mail', }, { name => 'ZM_EMAIL_BODY', - default => " + default => ' Hello, An alarm has been detected on your installation of the ZoneMinder. @@ -2307,13 +2308,13 @@ our @options = ( This alarm was matched by the %FN% filter and can be viewed at %EPS% - ZoneMinder", + ZoneMinder', description => 'The body of the email used to send matching event details', requires => [ { name => 'ZM_OPT_EMAIL', value => 'yes' } ], help => q` - This option is used to define the content of the email that is - sent for any events that match the appropriate filters. - `, + This option is used to define the content of the email that is + sent for any events that match the appropriate filters. + `, type => $types{text}, category => 'mail', }, @@ -2322,16 +2323,16 @@ our @options = ( default => 'no', description => 'Should ZoneMinder message you with details of events that match corresponding filters', help => q` - In ZoneMinder you can create event filters that specify whether - events that match certain criteria should have their details - sent to you at a designated short message email address. This - will allow you to be notified of events as soon as they occur. - This option specifies whether this functionality should be - available. The email created by this option will be brief and - is intended to be sent to an SMS gateway or a minimal mail - reader such as a mobile device or phone rather than a regular - email reader. - `, + In ZoneMinder you can create event filters that specify whether + events that match certain criteria should have their details + sent to you at a designated short message email address. This + will allow you to be notified of events as soon as they occur. + This option specifies whether this functionality should be + available. The email created by this option will be brief and + is intended to be sent to an SMS gateway or a minimal mail + reader such as a mobile device or phone rather than a regular + email reader. + `, type => $types{boolean}, category => 'mail', }, @@ -2341,23 +2342,23 @@ our @options = ( description => 'The email address to send matching event details to', requires => [ { name => 'ZM_OPT_MESSAGE', value => 'yes' } ], help => q` - This option is used to define the short message email address - that any events that match the appropriate filters will be sent - to. - `, + This option is used to define the short message email address + that any events that match the appropriate filters will be sent + to. + `, type => $types{email}, category => 'mail', }, { name => 'ZM_MESSAGE_TEXT', - default => q`subject = "ZoneMinder: Alarm - %MN%-%EI%" - body = "ZM alarm detected - %EL% secs, %EF%/%EFA% frames, t%EST%/m%ESM%/a%ESA% score."`, + default => 'subject = "ZoneMinder: Alarm - %MN%-%EI%" + body = "ZM alarm detected - %EL% secs, %EF%/%EFA% frames, t%EST%/m%ESM%/a%ESA% score."', description => 'The text of the message used to send matching event details', requires => [ { name => 'ZM_OPT_MESSAGE', value => 'yes' } ], help => q` - This option is used to define the content of the message that - is sent for any events that match the appropriate filters. - `, + This option is used to define the content of the message that + is sent for any events that match the appropriate filters. + `, type => $types{text}, category => 'hidden', }, @@ -2367,9 +2368,9 @@ our @options = ( description => 'The subject of the message used to send matching event details', requires => [ { name => 'ZM_OPT_MESSAGE', value => 'yes' } ], help => q` - This option is used to define the subject of the message that - is sent for any events that match the appropriate filters. - `, + This option is used to define the subject of the message that + is sent for any events that match the appropriate filters. + `, type => $types{string}, category => 'mail', }, @@ -2379,9 +2380,9 @@ our @options = ( description => 'The body of the message used to send matching event details', requires => [ { name => 'ZM_OPT_MESSAGE', value => 'yes' } ], help => q` - This option is used to define the content of the message that - is sent for any events that match the appropriate filters. - `, + This option is used to define the content of the message that + is sent for any events that match the appropriate filters. + `, type => $types{text}, category => 'mail', }, @@ -2394,16 +2395,16 @@ our @options = ( { name => 'ZM_OPT_MESSAGE', value => 'yes' } ], help => q` - Traditionally ZoneMinder has used the MIME::Entity perl module - to construct and send notification emails and messages. Some - people have reported problems with this module not being - present at all or flexible enough for their needs. If you are - one of those people this option allows you to select a new - mailing method using MIME::Lite and Net::SMTP instead. This - method was contributed by Ross Melin and should work for - everyone but has not been extensively tested so currently is - not selected by default. - `, + Traditionally ZoneMinder has used the MIME::Entity perl module + to construct and send notification emails and messages. Some + people have reported problems with this module not being + present at all or flexible enough for their needs. If you are + one of those people this option allows you to select a new + mailing method using MIME::Lite and Net::SMTP instead. This + method was contributed by Ross Melin and should work for + everyone but has not been extensively tested so currently is + not selected by default. + `, type => $types{boolean}, category => 'mail', }, @@ -2416,13 +2417,13 @@ our @options = ( { name => 'ZM_OPT_MESSAGE', value => 'yes' } ], help => q` - If you have chosen SMTP as the method by which to send - notification emails or messages then this option allows you to - choose which SMTP server to use to send them. The default of - localhost may work if you have the sendmail, exim or a similar - daemon running however you may wish to enter your ISP's SMTP - mail server here. - `, + If you have chosen SMTP as the method by which to send + notification emails or messages then this option allows you to + choose which SMTP server to use to send them. The default of + localhost may work if you have the sendmail, exim or a similar + daemon running however you may wish to enter your ISP's SMTP + mail server here. + `, type => $types{hostname}, category => 'mail', }, @@ -2435,11 +2436,11 @@ our @options = ( { name => 'ZM_OPT_MESSAGE', value => 'yes' } ], help => q` - The emails or messages that will be sent to you informing you - of events can appear to come from a designated email address to - help you with mail filtering etc. An address of something like - ZoneMinder\@your.domain is recommended. - `, + The emails or messages that will be sent to you informing you + of events can appear to come from a designated email address to + help you with mail filtering etc. An address of something like + ZoneMinder\@your.domain is recommended. + `, type => $types{email}, category => 'mail', }, @@ -2452,12 +2453,12 @@ our @options = ( { name => 'ZM_OPT_MESSAGE', value => 'yes' } ], help => q` - The emails or messages that will be sent to you informing you - of events can include a link to the events themselves for easy - viewing. If you intend to use this feature then set this option - to the url of your installation as it would appear from where - you read your email, e.g. http://host.your.domain/zm.php. - `, + The emails or messages that will be sent to you informing you + of events can include a link to the events themselves for easy + viewing. If you intend to use this feature then set this option + to the url of your installation as it would appear from where + you read your email, e.g. http://host.your.domain/zm.php. + `, type => $types{url}, category => 'mail', }, @@ -2466,14 +2467,14 @@ our @options = ( default => '600', description => 'Maximum delay (in seconds) for daemon restart attempts.', help => q` - The zmdc (zm daemon control) process controls when processeses - are started or stopped and will attempt to restart any that - fail. If a daemon fails frequently then a delay is introduced - between each restart attempt. If the daemon stills fails then - this delay is increased to prevent extra load being placed on - the system by continual restarts. This option controls what - this maximum delay is. - `, + The zmdc (zm daemon control) process controls when processeses + are started or stopped and will attempt to restart any that + fail. If a daemon fails frequently then a delay is introduced + between each restart attempt. If the daemon stills fails then + this delay is increased to prevent extra load being placed on + the system by continual restarts. This option controls what + this maximum delay is. + `, type => $types{integer}, category => 'system', }, @@ -2482,11 +2483,11 @@ our @options = ( default => '10', description => 'How often to check the capture daemons have not locked up', help => q` - The zmwatch daemon checks the image capture performance of the - capture daemons to ensure that they have not locked up (rarely - a sync error may occur which blocks indefinitely). This option - determines how often the daemons are checked. - `, + The zmwatch daemon checks the image capture performance of the + capture daemons to ensure that they have not locked up (rarely + a sync error may occur which blocks indefinitely). This option + determines how often the daemons are checked. + `, type => $types{integer}, category => 'system', }, @@ -2495,15 +2496,15 @@ our @options = ( default => '5', description => 'The maximum delay allowed since the last captured image', help => q` - The zmwatch daemon checks the image capture performance of the - capture daemons to ensure that they have not locked up (rarely - a sync error may occur which blocks indefinitely). This option - determines the maximum delay to allow since the last captured - frame. The daemon will be restarted if it has not captured any - images after this period though the actual restart may take - slightly longer in conjunction with the check interval value - above. - `, + The zmwatch daemon checks the image capture performance of the + capture daemons to ensure that they have not locked up (rarely + a sync error may occur which blocks indefinitely). This option + determines the maximum delay to allow since the last captured + frame. The daemon will be restarted if it has not captured any + images after this period though the actual restart may take + slightly longer in conjunction with the check interval value + above. + `, type => $types{decimal}, category => 'system', }, @@ -2512,21 +2513,21 @@ our @options = ( default => 'yes', description => 'Run zmaudit to check data consistency', help => q` - The zmaudit daemon exists to check that the saved information - in the database and on the filesystem match and are consistent - with each other. If an error occurs or if you are using 'fast - deletes' it may be that database records are deleted but files - remain. In this case, and similar, zmaudit will remove - redundant information to synchronise the two data stores. This - option controls whether zmaudit is run in the background and - performs these checks and fixes continuously. This is - recommended for most systems however if you have a very large - number of events the process of scanning the database and - filesystem may take a long time and impact performance. In this - case you may prefer to not have zmaudit running unconditionally - and schedule occasional checks at other, more convenient, - times. - `, + The zmaudit daemon exists to check that the saved information + in the database and on the filesystem match and are consistent + with each other. If an error occurs or if you are using 'fast + deletes' it may be that database records are deleted but files + remain. In this case, and similar, zmaudit will remove + redundant information to synchronise the two data stores. This + option controls whether zmaudit is run in the background and + performs these checks and fixes continuously. This is + recommended for most systems however if you have a very large + number of events the process of scanning the database and + filesystem may take a long time and impact performance. In this + case you may prefer to not have zmaudit running unconditionally + and schedule occasional checks at other, more convenient, + times. + `, type => $types{boolean}, category => 'system', }, @@ -2535,20 +2536,20 @@ our @options = ( default => '900', description => 'How often to check database and filesystem consistency', help => q` - The zmaudit daemon exists to check that the saved information - in the database and on the filesystem match and are consistent - with each other. If an error occurs or if you are using 'fast - deletes' it may be that database records are deleted but files - remain. In this case, and similar, zmaudit will remove - redundant information to synchronise the two data stores. The - default check interval of 900 seconds (15 minutes) is fine for - most systems however if you have a very large number of events - the process of scanning the database and filesystem may take a - long time and impact performance. In this case you may prefer - to make this interval much larger to reduce the impact on your - system. This option determines how often these checks are - performed. - `, + The zmaudit daemon exists to check that the saved information + in the database and on the filesystem match and are consistent + with each other. If an error occurs or if you are using 'fast + deletes' it may be that database records are deleted but files + remain. In this case, and similar, zmaudit will remove + redundant information to synchronise the two data stores. The + default check interval of 900 seconds (15 minutes) is fine for + most systems however if you have a very large number of events + the process of scanning the database and filesystem may take a + long time and impact performance. In this case you may prefer + to make this interval much larger to reduce the impact on your + system. This option determines how often these checks are + performed. + `, type => $types{integer}, category => 'system', }, @@ -2557,11 +2558,11 @@ our @options = ( default => '86400', description => 'The minimum age in seconds event data must be in order to be deleted.', help => q` - The zmaudit daemon exists to check that the saved information - in the database and on the filesystem match and are consistent - with each other. Event files or db records that are younger than - this setting will not be deleted and a warning will be given. - `, + The zmaudit daemon exists to check that the saved information + in the database and on the filesystem match and are consistent + with each other. Event files or db records that are younger than + this setting will not be deleted and a warning will be given. + `, type => $types{integer}, category => 'system', }, @@ -2570,11 +2571,11 @@ our @options = ( default => '255', description => 'Score to give forced alarms', help => q` - The 'zmu' utility can be used to force an alarm on a monitor - rather than rely on the motion detection algorithms. This - option determines what score to give these alarms to - distinguish them from regular ones. It must be 255 or less. - `, + The 'zmu' utility can be used to force an alarm on a monitor + rather than rely on the motion detection algorithms. This + option determines what score to give these alarms to + distinguish them from regular ones. It must be 255 or less. + `, type => $types{integer}, category => 'config', }, @@ -2583,20 +2584,20 @@ our @options = ( default => '100', description => 'How often a bulk frame should be written to the database', help => q` - Traditionally ZoneMinder writes an entry into the Frames - database table for each frame that is captured and saved. This - works well in motion detection scenarios but when in a DVR - situation ('Record' or 'Mocord' mode) this results in a huge - number of frame writes and a lot of database and disk bandwidth - for very little additional information. Setting this to a - non-zero value will enabled ZoneMinder to group these non-alarm - frames into one 'bulk' frame entry which saves a lot of - bandwidth and space. The only disadvantage of this is that - timing information for individual frames is lost but in - constant frame rate situations this is usually not significant. - This setting is ignored in Modect mode and individual frames - are still written if an alarm occurs in Mocord mode also. - `, + Traditionally ZoneMinder writes an entry into the Frames + database table for each frame that is captured and saved. This + works well in motion detection scenarios but when in a DVR + situation ('Record' or 'Mocord' mode) this results in a huge + number of frame writes and a lot of database and disk bandwidth + for very little additional information. Setting this to a + non-zero value will enabled ZoneMinder to group these non-alarm + frames into one 'bulk' frame entry which saves a lot of + bandwidth and space. The only disadvantage of this is that + timing information for individual frames is lost but in + constant frame rate situations this is usually not significant. + This setting is ignored in Modect mode and individual frames + are still written if an alarm occurs in Mocord mode also. + `, type => $types{integer}, category => 'config', }, @@ -2605,30 +2606,30 @@ our @options = ( default => 'idle', description => 'When continuous events are closed.', help => q` - When a monitor is running in a continuous recording mode - (Record or Mocord) events are usually closed after a fixed - period of time (the section length). However in Mocord mode it - is possible that motion detection may occur near the end of a - section. This option controls what happens when an alarm occurs - in Mocord mode. The 'time' setting means that the event will be - closed at the end of the section regardless of alarm activity. - The 'idle' setting means that the event will be closed at the - end of the section if there is no alarm activity occurring at - the time otherwise it will be closed once the alarm is over - meaning the event may end up being longer than the normal - section length. The 'alarm' setting means that if an alarm - occurs during the event, the event will be closed once the - alarm is over regardless of when this occurs. This has the - effect of limiting the number of alarms to one per event and - the events will be shorter than the section length if an alarm - has occurred. - `, + When a monitor is running in a continuous recording mode + (Record or Mocord) events are usually closed after a fixed + period of time (the section length). However in Mocord mode it + is possible that motion detection may occur near the end of a + section. This option controls what happens when an alarm occurs + in Mocord mode. The 'time' setting means that the event will be + closed at the end of the section regardless of alarm activity. + The 'idle' setting means that the event will be closed at the + end of the section if there is no alarm activity occurring at + the time otherwise it will be closed once the alarm is over + meaning the event may end up being longer than the normal + section length. The 'alarm' setting means that if an alarm + occurs during the event, the event will be closed once the + alarm is over regardless of when this occurs. This has the + effect of limiting the number of alarms to one per event and + the events will be shorter than the section length if an alarm + has occurred. + `, type => $types{boolean}, type => { - db_type => 'string', - hint => 'time|idle|alarm', - pattern => qr|^([tia])|i, - format => q( ($1 =~ /^t/) + db_type =>'string', + hint =>'time|idle|alarm', + pattern =>qr|^([tia])|i, + format =>q( ($1 =~ /^t/) ? 'time' : ($1 =~ /^i/ ? 'idle' : 'time' ) ) @@ -2641,15 +2642,15 @@ our @options = ( default => 'no', description => 'Close events at section ends.', help => q` - When a monitor is running in a continuous recording mode - (Record or Mocord) events are usually closed after a fixed - period of time (the section length). However in Mocord mode it - is possible that motion detection may occur near the end of a - section and ordinarily this will prevent the event being closed - until the motion has ceased. Switching this option on will - force the event closed at the specified time regardless of any - motion activity. - `, + When a monitor is running in a continuous recording mode + (Record or Mocord) events are usually closed after a fixed + period of time (the section length). However in Mocord mode it + is possible that motion detection may occur near the end of a + section and ordinarily this will prevent the event being closed + until the motion has ceased. Switching this option on will + force the event closed at the specified time regardless of any + motion activity. + `, type => $types{boolean}, category => 'hidden', }, @@ -2658,14 +2659,14 @@ our @options = ( default => 'yes', description => 'Create analysed alarm images with motion outlined', help => q` - By default during an alarm ZoneMinder records both the raw - captured image and one that has been analysed and had areas - where motion was detected outlined. This can be very useful - during zone configuration or in analysing why events occurred. - However it also incurs some overhead and in a stable system may - no longer be necessary. This parameter allows you to switch the - generation of these images off. - `, + By default during an alarm ZoneMinder records both the raw + captured image and one that has been analysed and had areas + where motion was detected outlined. This can be very useful + during zone configuration or in analysing why events occurred. + However it also incurs some overhead and in a stable system may + no longer be necessary. This parameter allows you to switch the + generation of these images off. + `, type => $types{boolean}, category => 'config', }, @@ -2674,16 +2675,16 @@ our @options = ( default => 'no', description => 'Use a weighted algorithm to calculate the centre of an alarm', help => q` - ZoneMinder will always calculate the centre point of an alarm - in a zone to give some indication of where on the screen it is. - This can be used by the experimental motion tracking feature or - your own custom extensions. In the alarmed or filtered pixels - mode this is a simple midpoint between the extents of the - detected pixels. However in the blob method this can instead be - calculated using weighted pixel locations to give more accurate - positioning for irregularly shaped blobs. This method, while - more precise is also slower and so is turned off by default. - `, + ZoneMinder will always calculate the centre point of an alarm + in a zone to give some indication of where on the screen it is. + This can be used by the experimental motion tracking feature or + your own custom extensions. In the alarmed or filtered pixels + mode this is a simple midpoint between the extents of the + detected pixels. However in the blob method this can instead be + calculated using weighted pixel locations to give more accurate + positioning for irregularly shaped blobs. This method, while + more precise is also slower and so is turned off by default. + `, type => $types{boolean}, category => 'config', }, @@ -2692,18 +2693,18 @@ our @options = ( default => '5', description => 'How many significant digits are used in event image numbering', help => q` - As event images are captured they are stored to the filesystem - with a numerical index. By default this index has three digits - so the numbers start 001, 002 etc. This works works for most - scenarios as events with more than 999 frames are rarely - captured. However if you have extremely long events and use - external applications then you may wish to increase this to - ensure correct sorting of images in listings etc. Warning, - increasing this value on a live system may render existing - events unviewable as the event will have been saved with the - previous scheme. Decreasing this value should have no ill - effects. - `, + As event images are captured they are stored to the filesystem + with a numerical index. By default this index has three digits + so the numbers start 001, 002 etc. This works works for most + scenarios as events with more than 999 frames are rarely + captured. However if you have extremely long events and use + external applications then you may wish to increase this to + ensure correct sorting of images in listings etc. Warning, + increasing this value on a live system may render existing + events unviewable as the event will have been saved with the + previous scheme. Decreasing this value should have no ill + effects. + `, type => $types{integer}, category => 'config', }, @@ -2712,15 +2713,15 @@ our @options = ( default => '4:3', description => 'The default width:height aspect ratio used in monitors', help => q` - When specifying the dimensions of monitors you can click a - checkbox to ensure that the width stays in the correct ratio to - the height, or vice versa. This setting allows you to indicate - what the ratio of these settings should be. This should be - specified in the format : and the - default of 4:3 normally be acceptable but 11:9 is another - common setting. If the checkbox is not clicked when specifying - monitor dimensions this setting has no effect. - `, + When specifying the dimensions of monitors you can click a + checkbox to ensure that the width stays in the correct ratio to + the height, or vice versa. This setting allows you to indicate + what the ratio of these settings should be. This should be + specified in the format : and the + default of 4:3 normally be acceptable but 11:9 is another + common setting. If the checkbox is not clicked when specifying + monitor dimensions this setting has no effect. + `, type => $types{string}, category => 'config', }, @@ -2729,10 +2730,10 @@ our @options = ( default => 'no', description => 'Allow unprivileged users to change their details', help => q` - Ordinarily only users with system edit privilege are able to - change users details. Switching this option on allows ordinary - users to change their passwords and their language settings - `, + Ordinarily only users with system edit privilege are able to + change users details. Switching this option on allows ordinary + users to change their passwords and their language settings + `, type => $types{boolean}, category => 'config', }, @@ -2741,13 +2742,13 @@ our @options = ( default => 'no', description => 'Support controllable (e.g. PTZ) cameras', help => q` - ZoneMinder includes limited support for controllable cameras. A - number of sample protocols are included and others can easily - be added. If you wish to control your cameras via ZoneMinder - then select this option otherwise if you only have static - cameras or use other control methods then leave this option - off. - `, + ZoneMinder includes limited support for controllable cameras. A + number of sample protocols are included and others can easily + be added. If you wish to control your cameras via ZoneMinder + then select this option otherwise if you only have static + cameras or use other control methods then leave this option + off. + `, type => $types{boolean}, category => 'system', }, @@ -2756,11 +2757,11 @@ our @options = ( default => 'no', description => 'Interface external event triggers via socket or device files', help => q` - ZoneMinder can interact with external systems which prompt or - cancel alarms. This is done via the zmtrigger.pl script. This - option indicates whether you want to use these external - triggers. Most people will say no here. - `, + ZoneMinder can interact with external systems which prompt or + cancel alarms. This is done via the zmtrigger.pl script. This + option indicates whether you want to use these external + triggers. Most people will say no here. + `, type => $types{boolean}, category => 'system', }, @@ -2769,16 +2770,16 @@ our @options = ( default => 'yes', description => 'Check with zoneminder.com for updated versions', help => q` - From ZoneMinder version 1.17.0 onwards new versions are - expected to be more frequent. To save checking manually for - each new version ZoneMinder can check with the zoneminder.com - website to determine the most recent release. These checks are - infrequent, about once per week, and no personal or system - information is transmitted other than your current version - number. If you do not wish these checks to take place or your - ZoneMinder system has no internet access you can switch these - check off with this configuration variable - `, + From ZoneMinder version 1.17.0 onwards new versions are + expected to be more frequent. To save checking manually for + each new version ZoneMinder can check with the zoneminder.com + website to determine the most recent release. These checks are + infrequent, about once per week, and no personal or system + information is transmitted other than your current version + number. If you do not wish these checks to take place or your + ZoneMinder system has no internet access you can switch these + check off with this configuration variable + `, type => $types{boolean}, category => 'system', }, @@ -2787,15 +2788,15 @@ our @options = ( default => 'yes', description => 'Send usage information to ZoneMinder', help => q` - Enable collection of usage information of the local system and send - it to the ZoneMinder development team. This data will be used to - determine things like who and where our customers are, how big their - systems are, the underlying hardware and operating system, etc. - This is being done for the sole purpoase of creating a better - product for our target audience. This script is intended to be - completely transparent to the end user, and can be disabled from - the web console under Options. - `, + Enable collection of usage information of the local system and send + it to the ZoneMinder development team. This data will be used to + determine things like who and where our customers are, how big their + systems are, the underlying hardware and operating system, etc. + This is being done for the sole purpoase of creating a better + product for our target audience. This script is intended to be + completely transparent to the end user, and can be disabled from + the web console under Options. + `, type => $types{boolean}, category => 'system', }, @@ -2804,10 +2805,10 @@ our @options = ( default => '', description => 'Unique identifier for ZoneMinder telemetry', help => q` - This variable is auto-generated once by the system and is used to - uniquely identify it among all other ZoneMinder systems in - existence. - `, + This variable is auto-generated once by the system and is used to + uniquely identify it among all other ZoneMinder systems in + existence. + `, type => $types{string}, category => 'dynamic', }, @@ -2841,11 +2842,11 @@ our @options = ( default => '', description => 'Proxy url if required to access zoneminder.com', help => q` - If you use a proxy to access the internet then ZoneMinder needs - to know so it can access zoneminder.com to check for updates. - If you do use a proxy enter the full proxy url here in the form - of http://:/ - `, + If you use a proxy to access the internet then ZoneMinder needs + to know so it can access zoneminder.com to check for updates. + If you do use a proxy enter the full proxy url here in the form + of http://:/ + `, type => $types{string}, category => 'system', }, @@ -2854,15 +2855,15 @@ our @options = ( default => '0x7a6d0000', description => 'Shared memory root key to use', help => q` - ZoneMinder uses shared memory to speed up communication between - modules. To identify the right area to use shared memory keys - are used. This option controls what the base key is, each - monitor will have it's Id or'ed with this to get the actual key - used. You will not normally need to change this value unless it - clashes with another instance of ZoneMinder on the same - machine. Only the first four hex digits are used, the lower - four will be masked out and ignored. - `, + ZoneMinder uses shared memory to speed up communication between + modules. To identify the right area to use shared memory keys + are used. This option controls what the base key is, each + monitor will have it's Id or'ed with this to get the actual key + used. You will not normally need to change this value unless it + clashes with another instance of ZoneMinder on the same + machine. Only the first four hex digits are used, the lower + four will be masked out and ignored. + `, type => $types{hexadecimal}, category => 'system', }, @@ -2872,22 +2873,22 @@ our @options = ( default => 'javascript', description => 'What method windows should use to refresh themselves', help => q` - Many windows in Javascript need to refresh themselves to keep - their information current. This option determines what method - they should use to do this. Choosing 'javascript' means that - each window will have a short JavaScript statement in with a - timer to prompt the refresh. This is the most compatible - method. Choosing 'http' means the refresh instruction is put in - the HTTP header. This is a cleaner method but refreshes are - interrupted or cancelled when a link in the window is clicked - meaning that the window will no longer refresh and this would - have to be done manually. - `, + Many windows in Javascript need to refresh themselves to keep + their information current. This option determines what method + they should use to do this. Choosing 'javascript' means that + each window will have a short JavaScript statement in with a + timer to prompt the refresh. This is the most compatible + method. Choosing 'http' means the refresh instruction is put in + the HTTP header. This is a cleaner method but refreshes are + interrupted or cancelled when a link in the window is clicked + meaning that the window will no longer refresh and this would + have to be done manually. + `, type => { - db_type => 'string', - hint => 'javascript|http', - pattern => qr|^([jh])|i, - format => q( $1 =~ /^j/ + db_type =>'string', + hint =>'javascript|http', + pattern =>qr|^([jh])|i, + format =>q( $1 =~ /^j/ ? 'javascript' : 'http' ) @@ -2899,18 +2900,18 @@ our @options = ( default => 'DateTime', description => 'Default field the event lists are sorted by', help => q` - Events in lists can be initially ordered in any way you want. - This option controls what field is used to sort them. You can - modify this ordering from filters or by clicking on headings in - the lists themselves. Bear in mind however that the 'Prev' and - 'Next' links, when scrolling through events, relate to the - ordering in the lists and so not always to time based ordering. - `, + Events in lists can be initially ordered in any way you want. + This option controls what field is used to sort them. You can + modify this ordering from filters or by clicking on headings in + the lists themselves. Bear in mind however that the 'Prev' and + 'Next' links, when scrolling through events, relate to the + ordering in the lists and so not always to time based ordering. + `, type => { - db_type => 'string', - hint => 'Id|Name|Cause|MonitorName|DateTime|Length|Frames|AlarmFrames|TotScore|AvgScore|MaxScore', - pattern => qr|.|, - format => q( $1 ) + db_type =>'string', + hint =>'Id|Name|Cause|MonitorName|DateTime|Length|Frames|AlarmFrames|TotScore|AvgScore|MaxScore', + pattern =>qr|.|, + format =>q( $1 ) }, category => 'web', }, @@ -2919,19 +2920,19 @@ our @options = ( default => 'asc', description => 'Default order the event lists are sorted by', help => q` - Events in lists can be initially ordered in any way you want. - This option controls what order (ascending or descending) is - used to sort them. You can modify this ordering from filters or - by clicking on headings in the lists themselves. Bear in mind - however that the 'Prev' and 'Next' links, when scrolling - through events, relate to the ordering in the lists and so not - always to time based ordering. - `, + Events in lists can be initially ordered in any way you want. + This option controls what order (ascending or descending) is + used to sort them. You can modify this ordering from filters or + by clicking on headings in the lists themselves. Bear in mind + however that the 'Prev' and 'Next' links, when scrolling + through events, relate to the ordering in the lists and so not + always to time based ordering. + `, type => { - db_type => 'string', - hint => 'asc|desc', - pattern => qr|^([ad])|i, - format => q( $1 =~ /^a/i ? 'asc' : 'desc' ) + db_type =>'string', + hint =>'asc|desc', + pattern =>qr|^([ad])|i, + format =>q( $1 =~ /^a/i ? 'asc' : 'desc' ) }, category => 'web', }, @@ -2940,11 +2941,11 @@ our @options = ( default => '25', description => 'How many events to list per page in paged mode', help => q` - In the event list view you can either list all events or just a - page at a time. This option controls how many events are listed - per page in paged mode and how often to repeat the column - headers in non-paged mode. - `, + In the event list view you can either list all events or just a + page at a time. This option controls how many events are listed + per page in paged mode and how often to repeat the column + headers in non-paged mode. + `, type => $types{integer}, category => 'web', }, @@ -2953,12 +2954,12 @@ our @options = ( default => 'no', description => 'Display mini-thumbnails of event images in event lists', help => q` - Ordinarily the event lists just display text details of the - events to save space and time. By switching this option on you - can also display small thumbnails to help you identify events - of interest. The size of these thumbnails is controlled by the - following two options. - `, + Ordinarily the event lists just display text details of the + events to save space and time. By switching this option on you + can also display small thumbnails to help you identify events + of interest. The size of these thumbnails is controlled by the + following two options. + `, type => $types{boolean}, category => 'web', }, @@ -2967,14 +2968,14 @@ our @options = ( default => '48', description => 'The width of the thumbnails that appear in the event lists', help => q` - This options controls the width of the thumbnail images that - appear in the event lists. It should be fairly small to fit in - with the rest of the table. If you prefer you can specify a - height instead in the next option but you should only use one - of the width or height and the other option should be set to - zero. If both width and height are specified then width will be - used and height ignored. - `, + This options controls the width of the thumbnail images that + appear in the event lists. It should be fairly small to fit in + with the rest of the table. If you prefer you can specify a + height instead in the next option but you should only use one + of the width or height and the other option should be set to + zero. If both width and height are specified then width will be + used and height ignored. + `, type => $types{integer}, requires => [ { name => 'ZM_WEB_LIST_THUMBS', value => 'yes' } ], category => 'web', @@ -2984,14 +2985,14 @@ our @options = ( default => '0', description => 'The height of the thumbnails that appear in the event lists', help => q` - This options controls the height of the thumbnail images that - appear in the event lists. It should be fairly small to fit in - with the rest of the table. If you prefer you can specify a - width instead in the previous option but you should only use - one of the width or height and the other option should be set - to zero. If both width and height are specified then width will - be used and height ignored. - `, + This options controls the height of the thumbnail images that + appear in the event lists. It should be fairly small to fit in + with the rest of the table. If you prefer you can specify a + width instead in the previous option but you should only use + one of the width or height and the other option should be set + to zero. If both width and height are specified then width will + be used and height ignored. + `, type => $types{integer}, requires => [ { name => 'ZM_WEB_LIST_THUMBS', value => 'yes' } ], category => 'web', @@ -3001,21 +3002,21 @@ our @options = ( default => 'yes', description => 'Wrap embed in object tags for media content', help => q` - There are two methods of including media content in web pages. - The most common way is use the EMBED tag which is able to give - some indication of the type of content. However this is not a - standard part of HTML. The official method is to use OBJECT - tags which are able to give more information allowing the - correct media viewers etc to be loaded. However these are less - widely supported and content may be specifically tailored to a - particular platform or player. This option controls whether - media content is enclosed in EMBED tags only or whether, where - appropriate, it is additionally wrapped in OBJECT tags. - Currently OBJECT tags are only used in a limited number of - circumstances but they may become more widespread in the - future. It is suggested that you leave this option on unless - you encounter problems playing some content. - `, + There are two methods of including media content in web pages. + The most common way is use the EMBED tag which is able to give + some indication of the type of content. However this is not a + standard part of HTML. The official method is to use OBJECT + tags which are able to give more information allowing the + correct media viewers etc to be loaded. However these are less + widely supported and content may be specifically tailored to a + particular platform or player. This option controls whether + media content is enclosed in EMBED tags only or whether, where + appropriate, it is additionally wrapped in OBJECT tags. + Currently OBJECT tags are only used in a limited number of + circumstances but they may become more widespread in the + future. It is suggested that you leave this option on unless + you encounter problems playing some content. + `, type => $types{boolean}, category => 'web', }, @@ -3023,23 +3024,23 @@ our @options = ( name => 'ZM_WEB_H_REFRESH_MAIN', default => '60', introduction => q` - There are now a number of options that are grouped into - bandwidth categories, this allows you to configure the - ZoneMinder client to work optimally over the various access - methods you might to access the client.\n\nThe next few options - control what happens when the client is running in 'high' - bandwidth mode. You should set these options for when accessing - the ZoneMinder client over a local network or high speed link. - In most cases the default values will be suitable as a starting - point. - `, + There are now a number of options that are grouped into + bandwidth categories, this allows you to configure the + ZoneMinder client to work optimally over the various access + methods you might to access the client.\n\nThe next few options + control what happens when the client is running in 'high' + bandwidth mode. You should set these options for when accessing + the ZoneMinder client over a local network or high speed link. + In most cases the default values will be suitable as a starting + point. + `, description => 'How often (in seconds) the main console window should refresh itself', help => q` - The main console window lists a general status and the event - totals for all monitors. This is not a trivial task and should - not be repeated too frequently or it may affect the performance - of the rest of the system. - `, + The main console window lists a general status and the event + totals for all monitors. This is not a trivial task and should + not be repeated too frequently or it may affect the performance + of the rest of the system. + `, type => $types{integer}, category => 'highband', }, @@ -3048,10 +3049,10 @@ our @options = ( default => '10', description => 'How often (in seconds) the cycle watch window swaps to the next monitor', help => q` - The cycle watch window is a method of continuously cycling - between images from all of your monitors. This option - determines how often to refresh with a new image. - `, + The cycle watch window is a method of continuously cycling + between images from all of your monitors. This option + determines how often to refresh with a new image. + `, type => $types{integer}, category => 'highband', }, @@ -3060,10 +3061,10 @@ our @options = ( default => '3', description => 'How often (in seconds) the watched image is refreshed (if not streaming)', help => q` - The live images from a monitor can be viewed in either streamed - or stills mode. This option determines how often a stills image - is refreshed, it has no effect if streaming is selected. - `, + The live images from a monitor can be viewed in either streamed + or stills mode. This option determines how often a stills image + is refreshed, it has no effect if streaming is selected. + `, type => $types{integer}, category => 'highband', }, @@ -3072,11 +3073,11 @@ our @options = ( default => '1', description => 'How often (in seconds) the status refreshes itself in the watch window', help => q` - The monitor window is actually made from several frames. The - one in the middle merely contains a monitor status which needs - to refresh fairly frequently to give a true indication. This - option determines that frequency. - `, + The monitor window is actually made from several frames. The + one in the middle merely contains a monitor status which needs + to refresh fairly frequently to give a true indication. This + option determines that frequency. + `, type => $types{integer}, category => 'highband', }, @@ -3085,10 +3086,10 @@ our @options = ( default => '5', description => 'How often (in seconds) the event listing is refreshed in the watch window', help => q` - The monitor window is actually made from several frames. The - lower framme contains a listing of the last few events for easy - access. This option determines how often this is refreshed. - `, + The monitor window is actually made from several frames. The + lower framme contains a listing of the last few events for easy + access. This option determines how often this is refreshed. + `, type => $types{integer}, category => 'highband', }, @@ -3097,14 +3098,14 @@ our @options = ( default => 'auto', description => 'Override the automatic detection of browser streaming capability', help => q` - If you know that your browser can handle image streams of the - type 'multipart/x-mixed-replace' but ZoneMinder does not detect - this correctly you can set this option to ensure that the - stream is delivered with or without the use of the Cambozola - plugin. Selecting 'yes' will tell ZoneMinder that your browser - can handle the streams natively, 'no' means that it can't and - so the plugin will be used while 'auto' lets ZoneMinder decide. - `, + If you know that your browser can handle image streams of the + type 'multipart/x-mixed-replace' but ZoneMinder does not detect + this correctly you can set this option to ensure that the + stream is delivered with or without the use of the Cambozola + plugin. Selecting 'yes' will tell ZoneMinder that your browser + can handle the streams natively, 'no' means that it can't and + so the plugin will be used while 'auto' lets ZoneMinder decide. + `, type => $types{tristate}, category => 'highband', }, @@ -3113,60 +3114,60 @@ our @options = ( default => 'jpeg', description => 'Which method should be used to send video streams to your browser.', help => q` - ZoneMinder can be configured to use either mpeg encoded video - or a series or still jpeg images when sending video streams. - This option defines which is used. If you choose mpeg you - should ensure that you have the appropriate plugins available - on your browser whereas choosing jpeg will work natively on - Mozilla and related browsers and with a Java applet on Internet - Explorer - `, + ZoneMinder can be configured to use either mpeg encoded video + or a series or still jpeg images when sending video streams. + This option defines which is used. If you choose mpeg you + should ensure that you have the appropriate plugins available + on your browser whereas choosing jpeg will work natively on + Mozilla and related browsers and with a Java applet on Internet + Explorer + `, type => { - db_type => 'string', - hint => 'mpeg|jpeg', - pattern => qr|^([mj])|i, - format => q( $1 =~ /^m/ ? 'mpeg' : 'jpeg' ) + db_type =>'string', + hint =>'mpeg|jpeg', + pattern =>qr|^([mj])|i, + format =>q( $1 =~ /^m/ ? 'mpeg' : 'jpeg' ) }, category => 'highband', }, { name => 'ZM_WEB_H_DEFAULT_SCALE', default => '100', - description => q`What the default scaling factor applied to 'live' or 'event' views is (%)`, + description => 'What the default scaling factor applied to \'live\' or \'event\' views is (%)', help => q` - Normally ZoneMinder will display 'live' or 'event' streams in - their native size. However if you have monitors with large - dimensions or a slow link you may prefer to reduce this size, - alternatively for small monitors you can enlarge it. This - options lets you specify what the default scaling factor will - be. It is expressed as a percentage so 100 is normal size, 200 - is double size etc. - `, + Normally ZoneMinder will display 'live' or 'event' streams in + their native size. However if you have monitors with large + dimensions or a slow link you may prefer to reduce this size, + alternatively for small monitors you can enlarge it. This + options lets you specify what the default scaling factor will + be. It is expressed as a percentage so 100 is normal size, 200 + is double size etc. + `, type => { - db_type => 'integer', - hint => '25|33|50|75|100|150|200|300|400', - pattern => qr|^(\d+)$|, - format => q( $1 ) + db_type =>'integer', + hint =>'25|33|50|75|100|150|200|300|400', + pattern =>qr|^(\d+)$|, + format =>q( $1 ) }, category => 'highband', }, { name => 'ZM_WEB_H_DEFAULT_RATE', default => '100', - description => q`What the default replay rate factor applied to 'event' views is (%)`, + description => 'What the default replay rate factor applied to \'event\' views is (%)', help => q` - Normally ZoneMinder will display 'event' streams at their - native rate, i.e. as close to real-time as possible. However if - you have long events it is often convenient to replay them at a - faster rate for review. This option lets you specify what the - default replay rate will be. It is expressed as a percentage so - 100 is normal rate, 200 is double speed etc. - `, + Normally ZoneMinder will display 'event' streams at their + native rate, i.e. as close to real-time as possible. However if + you have long events it is often convenient to replay them at a + faster rate for review. This option lets you specify what the + default replay rate will be. It is expressed as a percentage so + 100 is normal rate, 200 is double speed etc. + `, type => { - db_type => 'integer', - hint => '25|50|100|150|200|400|1000|2500|5000|10000', - pattern => qr|^(\d+)$|, - format => q( $1 ) + db_type =>'integer', + hint =>'25|50|100|150|200|400|1000|2500|5000|10000', + pattern =>qr|^(\d+)$|, + format =>q( $1 ) }, category => 'highband', }, @@ -3175,18 +3176,18 @@ our @options = ( default => '150000', description => 'What the bitrate of the video encoded stream should be set to', help => q` - When encoding real video via the ffmpeg library a bit rate can - be specified which roughly corresponds to the available - bandwidth used for the stream. This setting effectively - corresponds to a 'quality' setting for the video. A low value - will result in a blocky image whereas a high value will produce - a clearer view. Note that this setting does not control the - frame rate of the video however the quality of the video - produced is affected both by this setting and the frame rate - that the video is produced at. A higher frame rate at a - particular bit rate result in individual frames being at a - lower quality. - `, + When encoding real video via the ffmpeg library a bit rate can + be specified which roughly corresponds to the available + bandwidth used for the stream. This setting effectively + corresponds to a 'quality' setting for the video. A low value + will result in a blocky image whereas a high value will produce + a clearer view. Note that this setting does not control the + frame rate of the video however the quality of the video + produced is affected both by this setting and the frame rate + that the video is produced at. A higher frame rate at a + particular bit rate result in individual frames being at a + lower quality. + `, type => $types{integer}, category => 'highband', }, @@ -3195,21 +3196,21 @@ our @options = ( default => '30', description => 'What the maximum frame rate for streamed video should be', help => q` - When using streamed video the main control is the bitrate which - determines how much data can be transmitted. However a lower - bitrate at high frame rates results in a lower quality image. - This option allows you to limit the maximum frame rate to - ensure that video quality is maintained. An additional - advantage is that encoding video at high frame rates is a - processor intensive task when for the most part a very high - frame rate offers little perceptible improvement over one that - has a more manageable resource requirement. Note, this option - is implemented as a cap beyond which binary reduction takes - place. So if you have a device capturing at 15fps and set this - option to 10fps then the video is not produced at 10fps, but - rather at 7.5fps (15 divided by 2) as the final frame rate must - be the original divided by a power of 2. - `, + When using streamed video the main control is the bitrate which + determines how much data can be transmitted. However a lower + bitrate at high frame rates results in a lower quality image. + This option allows you to limit the maximum frame rate to + ensure that video quality is maintained. An additional + advantage is that encoding video at high frame rates is a + processor intensive task when for the most part a very high + frame rate offers little perceptible improvement over one that + has a more manageable resource requirement. Note, this option + is implemented as a cap beyond which binary reduction takes + place. So if you have a device capturing at 15fps and set this + option to 10fps then the video is not produced at 10fps, but + rather at 7.5fps (15 divided by 2) as the final frame rate must + be the original divided by a power of 2. + `, type => $types{integer}, category => 'highband', }, @@ -3218,14 +3219,14 @@ our @options = ( default => 'no', description => 'Scale thumbnails in events, bandwidth versus cpu in rescaling', help => q` - If unset, this option sends the whole image to the browser - which resizes it in the window. If set the image is scaled down - on the server before sending a reduced size image to the - browser to conserve bandwidth at the cost of cpu on the server. - Note that ZM can only perform the resizing if the appropriate - PHP graphics functionality is installed. This is usually - available in the php-gd package. - `, + If unset, this option sends the whole image to the browser + which resizes it in the window. If set the image is scaled down + on the server before sending a reduced size image to the + browser to conserve bandwidth at the cost of cpu on the server. + Note that ZM can only perform the resizing if the appropriate + PHP graphics functionality is installed. This is usually + available in the php-gd package. + `, type => $types{boolean}, category => 'highband', }, @@ -3234,17 +3235,17 @@ our @options = ( default => 'events', description => 'What the default view of multiple events should be.', help => q` - Stored events can be viewed in either an events list format or - in a timeline based one. This option sets the default view that - will be used. Choosing one view here does not prevent the other - view being used as it will always be selectable from whichever - view is currently being used. - `, + Stored events can be viewed in either an events list format or + in a timeline based one. This option sets the default view that + will be used. Choosing one view here does not prevent the other + view being used as it will always be selectable from whichever + view is currently being used. + `, type => { - db_type => 'string', - hint => 'events|timeline', - pattern => qr|^([lt])|i, - format => q( $1 =~ /^e/ ? 'events' : 'timeline' ) + db_type =>'string', + hint =>'events|timeline', + pattern =>qr|^([lt])|i, + format =>q( $1 =~ /^e/ ? 'events' : 'timeline' ) }, category => 'highband', }, @@ -3253,17 +3254,17 @@ our @options = ( default => 'yes', description => 'Show the progress of replay in event view.', help => q` - When viewing events an event navigation panel and progress bar - is shown below the event itself. This allows you to jump to - specific points in the event, but can can also dynamically - update to display the current progress of the event replay - itself. This progress is calculated from the actual event - duration and is not directly linked to the replay itself, so on - limited bandwidth connections may be out of step with the - replay. This option allows you to turn off the progress - display, whilst still keeping the navigation aspect, where - bandwidth prevents it functioning effectively. - `, + When viewing events an event navigation panel and progress bar + is shown below the event itself. This allows you to jump to + specific points in the event, but can can also dynamically + update to display the current progress of the event replay + itself. This progress is calculated from the actual event + duration and is not directly linked to the replay itself, so on + limited bandwidth connections may be out of step with the + replay. This option allows you to turn off the progress + display, whilst still keeping the navigation aspect, where + bandwidth prevents it functioning effectively. + `, type => $types{boolean}, category => 'highband', }, @@ -3272,17 +3273,17 @@ our @options = ( default => '3000', description => 'How long to wait for Ajax request responses (ms)', help => q` - The newer versions of the live feed and event views use Ajax to - request information from the server and populate the views - dynamically. This option allows you to specify a timeout if - required after which requests are abandoned. A timeout may be - necessary if requests would overwise hang such as on a slow - connection. This would tend to consume a lot of browser memory - and make the interface unresponsive. Ordinarily no requests - should timeout so this setting should be set to a value greater - than the slowest expected response. This value is in - milliseconds but if set to zero then no timeout will be used. - `, + The newer versions of the live feed and event views use Ajax to + request information from the server and populate the views + dynamically. This option allows you to specify a timeout if + required after which requests are abandoned. A timeout may be + necessary if requests would overwise hang such as on a slow + connection. This would tend to consume a lot of browser memory + and make the interface unresponsive. Ordinarily no requests + should timeout so this setting should be set to a value greater + than the slowest expected response. This value is in + milliseconds but if set to zero then no timeout will be used. + `, type => $types{integer}, category => 'highband', }, @@ -3291,19 +3292,19 @@ our @options = ( default => '300', description => 'How often (in seconds) the main console window should refresh itself', help => q` - The main console window lists a general status and the event - totals for all monitors. This is not a trivial task and should - not be repeated too frequently or it may affect the performance - of the rest of the system. - `, + The main console window lists a general status and the event + totals for all monitors. This is not a trivial task and should + not be repeated too frequently or it may affect the performance + of the rest of the system. + `, type => $types{integer}, introduction => q` - The next few options control what happens when the client is - running in 'medium' bandwidth mode. You should set these - options for when accessing the ZoneMinder client over a slower - cable or DSL link. In most cases the default values will be - suitable as a starting point. - `, + The next few options control what happens when the client is + running in 'medium' bandwidth mode. You should set these + options for when accessing the ZoneMinder client over a slower + cable or DSL link. In most cases the default values will be + suitable as a starting point. + `, category => 'medband', }, { @@ -3311,10 +3312,10 @@ our @options = ( default => '20', description => 'How often (in seconds) the cycle watch window swaps to the next monitor', help => q` - The cycle watch window is a method of continuously cycling - between images from all of your monitors. This option - determines how often to refresh with a new image. - `, + The cycle watch window is a method of continuously cycling + between images from all of your monitors. This option + determines how often to refresh with a new image. + `, type => $types{integer}, category => 'medband', }, @@ -3323,10 +3324,10 @@ our @options = ( default => '10', description => 'How often (in seconds) the watched image is refreshed (if not streaming)', help => q` - The live images from a monitor can be viewed in either streamed - or stills mode. This option determines how often a stills image - is refreshed, it has no effect if streaming is selected. - `, + The live images from a monitor can be viewed in either streamed + or stills mode. This option determines how often a stills image + is refreshed, it has no effect if streaming is selected. + `, type => $types{integer}, category => 'medband', }, @@ -3335,11 +3336,11 @@ our @options = ( default => '5', description => 'How often (in seconds) the status refreshes itself in the watch window', help => q` - The monitor window is actually made from several frames. The - one in the middle merely contains a monitor status which needs - to refresh fairly frequently to give a true indication. This - option determines that frequency. - `, + The monitor window is actually made from several frames. The + one in the middle merely contains a monitor status which needs + to refresh fairly frequently to give a true indication. This + option determines that frequency. + `, type => $types{integer}, category => 'medband', }, @@ -3348,10 +3349,10 @@ our @options = ( default => '60', description => 'How often (in seconds) the event listing is refreshed in the watch window', help => q` - The monitor window is actually made from several frames. The - lower framme contains a listing of the last few events for easy - access. This option determines how often this is refreshed. - `, + The monitor window is actually made from several frames. The + lower framme contains a listing of the last few events for easy + access. This option determines how often this is refreshed. + `, type => $types{integer}, category => 'medband', }, @@ -3360,14 +3361,14 @@ our @options = ( default => 'auto', description => 'Override the automatic detection of browser streaming capability', help => q` - If you know that your browser can handle image streams of the - type 'multipart/x-mixed-replace' but ZoneMinder does not detect - this correctly you can set this option to ensure that the - stream is delivered with or without the use of the Cambozola - plugin. Selecting 'yes' will tell ZoneMinder that your browser - can handle the streams natively, 'no' means that it can't and - so the plugin will be used while 'auto' lets ZoneMinder decide. - `, + If you know that your browser can handle image streams of the + type 'multipart/x-mixed-replace' but ZoneMinder does not detect + this correctly you can set this option to ensure that the + stream is delivered with or without the use of the Cambozola + plugin. Selecting 'yes' will tell ZoneMinder that your browser + can handle the streams natively, 'no' means that it can't and + so the plugin will be used while 'auto' lets ZoneMinder decide. + `, type => $types{tristate}, category => 'medband', }, @@ -3376,19 +3377,19 @@ our @options = ( default => 'jpeg', description => 'Which method should be used to send video streams to your browser.', help => q` - ZoneMinder can be configured to use either mpeg encoded video - or a series or still jpeg images when sending video streams. - This option defines which is used. If you choose mpeg you - should ensure that you have the appropriate plugins available - on your browser whereas choosing jpeg will work natively on - Mozilla and related browsers and with a Java applet on Internet - Explorer - `, + ZoneMinder can be configured to use either mpeg encoded video + or a series or still jpeg images when sending video streams. + This option defines which is used. If you choose mpeg you + should ensure that you have the appropriate plugins available + on your browser whereas choosing jpeg will work natively on + Mozilla and related browsers and with a Java applet on Internet + Explorer + `, type => { - db_type => 'string', - hint => 'mpeg|jpeg', - pattern => qr|^([mj])|i, - format => q( $1 =~ /^m/ ? 'mpeg' : 'jpeg' ) + db_type =>'string', + hint =>'mpeg|jpeg', + pattern =>qr|^([mj])|i, + format =>q( $1 =~ /^m/ ? 'mpeg' : 'jpeg' ) }, category => 'medband', }, @@ -3397,19 +3398,19 @@ our @options = ( default => '100', description => q`What the default scaling factor applied to 'live' or 'event' views is (%)`, help => q` - Normally ZoneMinder will display 'live' or 'event' streams in - their native size. However if you have monitors with large - dimensions or a slow link you may prefer to reduce this size, - alternatively for small monitors you can enlarge it. This - options lets you specify what the default scaling factor will - be. It is expressed as a percentage so 100 is normal size, 200 - is double size etc. - `, + Normally ZoneMinder will display 'live' or 'event' streams in + their native size. However if you have monitors with large + dimensions or a slow link you may prefer to reduce this size, + alternatively for small monitors you can enlarge it. This + options lets you specify what the default scaling factor will + be. It is expressed as a percentage so 100 is normal size, 200 + is double size etc. + `, type => { - db_type => 'integer', - hint => '25|33|50|75|100|150|200|300|400', - pattern => qr|^(\d+)$|, - format => q( $1 ) + db_type =>'integer', + hint =>'25|33|50|75|100|150|200|300|400', + pattern =>qr|^(\d+)$|, + format =>q( $1 ) }, category => 'medband', }, @@ -3418,18 +3419,18 @@ our @options = ( default => '100', description => q`What the default replay rate factor applied to 'event' views is (%)`, help => q` - Normally ZoneMinder will display 'event' streams at their - native rate, i.e. as close to real-time as possible. However if - you have long events it is often convenient to replay them at a - faster rate for review. This option lets you specify what the - default replay rate will be. It is expressed as a percentage so - 100 is normal rate, 200 is double speed etc. - `, + Normally ZoneMinder will display 'event' streams at their + native rate, i.e. as close to real-time as possible. However if + you have long events it is often convenient to replay them at a + faster rate for review. This option lets you specify what the + default replay rate will be. It is expressed as a percentage so + 100 is normal rate, 200 is double speed etc. + `, type => { - db_type => 'integer', - hint => '25|50|100|150|200|400|1000|2500|5000|10000', - pattern => qr|^(\d+)$|, - format => q( $1 ) + db_type =>'integer', + hint =>'25|50|100|150|200|400|1000|2500|5000|10000', + pattern =>qr|^(\d+)$|, + format =>q( $1 ) }, category => 'medband', }, @@ -3438,18 +3439,18 @@ our @options = ( default => '75000', description => 'What the bitrate of the video encoded stream should be set to', help => q` - When encoding real video via the ffmpeg library a bit rate can - be specified which roughly corresponds to the available - bandwidth used for the stream. This setting effectively - corresponds to a 'quality' setting for the video. A low value - will result in a blocky image whereas a high value will produce - a clearer view. Note that this setting does not control the - frame rate of the video however the quality of the video - produced is affected both by this setting and the frame rate - that the video is produced at. A higher frame rate at a - particular bit rate result in individual frames being at a - lower quality. - `, + When encoding real video via the ffmpeg library a bit rate can + be specified which roughly corresponds to the available + bandwidth used for the stream. This setting effectively + corresponds to a 'quality' setting for the video. A low value + will result in a blocky image whereas a high value will produce + a clearer view. Note that this setting does not control the + frame rate of the video however the quality of the video + produced is affected both by this setting and the frame rate + that the video is produced at. A higher frame rate at a + particular bit rate result in individual frames being at a + lower quality. + `, type => $types{integer}, category => 'medband', }, @@ -3458,21 +3459,21 @@ our @options = ( default => '10', description => 'What the maximum frame rate for streamed video should be', help => q` - When using streamed video the main control is the bitrate which - determines how much data can be transmitted. However a lower - bitrate at high frame rates results in a lower quality image. - This option allows you to limit the maximum frame rate to - ensure that video quality is maintained. An additional - advantage is that encoding video at high frame rates is a - processor intensive task when for the most part a very high - frame rate offers little perceptible improvement over one that - has a more manageable resource requirement. Note, this option - is implemented as a cap beyond which binary reduction takes - place. So if you have a device capturing at 15fps and set this - option to 10fps then the video is not produced at 10fps, but - rather at 7.5fps (15 divided by 2) as the final frame rate must - be the original divided by a power of 2. - `, + When using streamed video the main control is the bitrate which + determines how much data can be transmitted. However a lower + bitrate at high frame rates results in a lower quality image. + This option allows you to limit the maximum frame rate to + ensure that video quality is maintained. An additional + advantage is that encoding video at high frame rates is a + processor intensive task when for the most part a very high + frame rate offers little perceptible improvement over one that + has a more manageable resource requirement. Note, this option + is implemented as a cap beyond which binary reduction takes + place. So if you have a device capturing at 15fps and set this + option to 10fps then the video is not produced at 10fps, but + rather at 7.5fps (15 divided by 2) as the final frame rate must + be the original divided by a power of 2. + `, type => $types{integer}, category => 'medband', }, @@ -3481,14 +3482,14 @@ our @options = ( default => 'yes', description => 'Scale thumbnails in events, bandwidth versus cpu in rescaling', help => q` - If unset, this option sends the whole image to the browser - which resizes it in the window. If set the image is scaled down - on the server before sending a reduced size image to the - browser to conserve bandwidth at the cost of cpu on the server. - Note that ZM can only perform the resizing if the appropriate - PHP graphics functionality is installed. This is usually - available in the php-gd package. - `, + If unset, this option sends the whole image to the browser + which resizes it in the window. If set the image is scaled down + on the server before sending a reduced size image to the + browser to conserve bandwidth at the cost of cpu on the server. + Note that ZM can only perform the resizing if the appropriate + PHP graphics functionality is installed. This is usually + available in the php-gd package. + `, type => $types{boolean}, category => 'medband', }, @@ -3497,17 +3498,17 @@ our @options = ( default => 'events', description => 'What the default view of multiple events should be.', help => q` - Stored events can be viewed in either an events list format or - in a timeline based one. This option sets the default view that - will be used. Choosing one view here does not prevent the other - view being used as it will always be selectable from whichever - view is currently being used. - `, + Stored events can be viewed in either an events list format or + in a timeline based one. This option sets the default view that + will be used. Choosing one view here does not prevent the other + view being used as it will always be selectable from whichever + view is currently being used. + `, type => { - db_type => 'string', - hint => 'events|timeline', - pattern => qr|^([lt])|i, - format => q( $1 =~ /^e/ ? 'events' : 'timeline' ) + db_type =>'string', + hint =>'events|timeline', + pattern =>qr|^([lt])|i, + format =>q( $1 =~ /^e/ ? 'events' : 'timeline' ) }, category => 'medband', }, @@ -3516,17 +3517,17 @@ our @options = ( default => 'yes', description => 'Show the progress of replay in event view.', help => q` - When viewing events an event navigation panel and progress bar - is shown below the event itself. This allows you to jump to - specific points in the event, but can can also dynamically - update to display the current progress of the event replay - itself. This progress is calculated from the actual event - duration and is not directly linked to the replay itself, so on - limited bandwidth connections may be out of step with the - replay. This option allows you to turn off the progress - display, whilst still keeping the navigation aspect, where - bandwidth prevents it functioning effectively. - `, + When viewing events an event navigation panel and progress bar + is shown below the event itself. This allows you to jump to + specific points in the event, but can can also dynamically + update to display the current progress of the event replay + itself. This progress is calculated from the actual event + duration and is not directly linked to the replay itself, so on + limited bandwidth connections may be out of step with the + replay. This option allows you to turn off the progress + display, whilst still keeping the navigation aspect, where + bandwidth prevents it functioning effectively. + `, type => $types{boolean}, category => 'medband', }, @@ -3535,17 +3536,17 @@ our @options = ( default => '5000', description => 'How long to wait for Ajax request responses (ms)', help => q` - The newer versions of the live feed and event views use Ajax to - request information from the server and populate the views - dynamically. This option allows you to specify a timeout if - required after which requests are abandoned. A timeout may be - necessary if requests would overwise hang such as on a slow - connection. This would tend to consume a lot of browser memory - and make the interface unresponsive. Ordinarily no requests - should timeout so this setting should be set to a value greater - than the slowest expected response. This value is in - milliseconds but if set to zero then no timeout will be used. - `, + The newer versions of the live feed and event views use Ajax to + request information from the server and populate the views + dynamically. This option allows you to specify a timeout if + required after which requests are abandoned. A timeout may be + necessary if requests would overwise hang such as on a slow + connection. This would tend to consume a lot of browser memory + and make the interface unresponsive. Ordinarily no requests + should timeout so this setting should be set to a value greater + than the slowest expected response. This value is in + milliseconds but if set to zero then no timeout will be used. + `, type => $types{integer}, category => 'medband', }, @@ -3554,18 +3555,18 @@ our @options = ( default => '300', description => 'How often (in seconds) the main console window should refresh itself', introduction => q` - The next few options control what happens when the client is - running in 'low' bandwidth mode. You should set these options - for when accessing the ZoneMinder client over a modem or slow - link. In most cases the default values will be suitable as a - starting point. - `, + The next few options control what happens when the client is + running in 'low' bandwidth mode. You should set these options + for when accessing the ZoneMinder client over a modem or slow + link. In most cases the default values will be suitable as a + starting point. + `, help => q` - The main console window lists a general status and the event - totals for all monitors. This is not a trivial task and should - not be repeated too frequently or it may affect the performance - of the rest of the system. - `, + The main console window lists a general status and the event + totals for all monitors. This is not a trivial task and should + not be repeated too frequently or it may affect the performance + of the rest of the system. + `, type => $types{integer}, category => 'lowband', }, @@ -3574,10 +3575,10 @@ our @options = ( default => '30', description => 'How often (in seconds) the cycle watch window swaps to the next monitor', help => q` - The cycle watch window is a method of continuously cycling - between images from all of your monitors. This option - determines how often to refresh with a new image. - `, + The cycle watch window is a method of continuously cycling + between images from all of your monitors. This option + determines how often to refresh with a new image. + `, type => $types{integer}, category => 'lowband', }, @@ -3586,10 +3587,10 @@ our @options = ( default => '15', description => 'How often (in seconds) the watched image is refreshed (if not streaming)', help => q` - The live images from a monitor can be viewed in either streamed - or stills mode. This option determines how often a stills image - is refreshed, it has no effect if streaming is selected. - `, + The live images from a monitor can be viewed in either streamed + or stills mode. This option determines how often a stills image + is refreshed, it has no effect if streaming is selected. + `, type => $types{integer}, category => 'lowband', }, @@ -3598,11 +3599,11 @@ our @options = ( default => '10', description => 'How often (in seconds) the status refreshes itself in the watch window', help => q` - The monitor window is actually made from several frames. The - one in the middle merely contains a monitor status which needs - to refresh fairly frequently to give a true indication. This - option determines that frequency. - `, + The monitor window is actually made from several frames. The + one in the middle merely contains a monitor status which needs + to refresh fairly frequently to give a true indication. This + option determines that frequency. + `, type => $types{integer}, category => 'lowband', }, @@ -3611,10 +3612,10 @@ our @options = ( default => '180', description => 'How often (in seconds) the event listing is refreshed in the watch window', help => q` - The monitor window is actually made from several frames. The - lower framme contains a listing of the last few events for easy - access. This option determines how often this is refreshed. - `, + The monitor window is actually made from several frames. The + lower framme contains a listing of the last few events for easy + access. This option determines how often this is refreshed. + `, type => $types{integer}, category => 'lowband', }, @@ -3623,14 +3624,14 @@ our @options = ( default => 'auto', description => 'Override the automatic detection of browser streaming capability', help => q` - If you know that your browser can handle image streams of the - type 'multipart/x-mixed-replace' but ZoneMinder does not detect - this correctly you can set this option to ensure that the - stream is delivered with or without the use of the Cambozola - plugin. Selecting 'yes' will tell ZoneMinder that your browser - can handle the streams natively, 'no' means that it can't and - so the plugin will be used while 'auto' lets ZoneMinder decide. - `, + If you know that your browser can handle image streams of the + type 'multipart/x-mixed-replace' but ZoneMinder does not detect + this correctly you can set this option to ensure that the + stream is delivered with or without the use of the Cambozola + plugin. Selecting 'yes' will tell ZoneMinder that your browser + can handle the streams natively, 'no' means that it can't and + so the plugin will be used while 'auto' lets ZoneMinder decide. + `, type => $types{tristate}, category => 'lowband', }, @@ -3639,19 +3640,19 @@ our @options = ( default => 'jpeg', description => 'Which method should be used to send video streams to your browser.', help => q` - ZoneMinder can be configured to use either mpeg encoded video - or a series or still jpeg images when sending video streams. - This option defines which is used. If you choose mpeg you - should ensure that you have the appropriate plugins available - on your browser whereas choosing jpeg will work natively on - Mozilla and related browsers and with a Java applet on Internet - Explorer - `, + ZoneMinder can be configured to use either mpeg encoded video + or a series or still jpeg images when sending video streams. + This option defines which is used. If you choose mpeg you + should ensure that you have the appropriate plugins available + on your browser whereas choosing jpeg will work natively on + Mozilla and related browsers and with a Java applet on Internet + Explorer + `, type => { - db_type => 'string', - hint => 'mpeg|jpeg', - pattern => qr|^([mj])|i, - format => q( $1 =~ /^m/ ? 'mpeg' : 'jpeg' ) + db_type =>'string', + hint =>'mpeg|jpeg', + pattern =>qr|^([mj])|i, + format =>q( $1 =~ /^m/ ? 'mpeg' : 'jpeg' ) }, category => 'lowband', }, @@ -3660,19 +3661,19 @@ our @options = ( default => '100', description => q`What the default scaling factor applied to 'live' or 'event' views is (%)`, help => q` - Normally ZoneMinder will display 'live' or 'event' streams in - their native size. However if you have monitors with large - dimensions or a slow link you may prefer to reduce this size, - alternatively for small monitors you can enlarge it. This - options lets you specify what the default scaling factor will - be. It is expressed as a percentage so 100 is normal size, 200 - is double size etc. - `, + Normally ZoneMinder will display 'live' or 'event' streams in + their native size. However if you have monitors with large + dimensions or a slow link you may prefer to reduce this size, + alternatively for small monitors you can enlarge it. This + options lets you specify what the default scaling factor will + be. It is expressed as a percentage so 100 is normal size, 200 + is double size etc. + `, type => { - db_type => 'integer', - hint => '25|33|50|75|100|150|200|300|400', - pattern => qr|^(\d+)$|, - format => q( $1 ) + db_type =>'integer', + hint =>'25|33|50|75|100|150|200|300|400', + pattern =>qr|^(\d+)$|, + format =>q( $1 ) }, category => 'lowband', }, @@ -3681,17 +3682,17 @@ our @options = ( default => '100', description => q`What the default replay rate factor applied to 'event' views is (%)`, help => q` - Normally ZoneMinder will display 'event' streams at their - native rate, i.e. as close to real-time as possible. However if - you have long events it is often convenient to replay them at a - faster rate for review. This option lets you specify what the - default replay rate will be. It is expressed as a percentage so - 100 is normal rate, 200 is double speed etc. - `, + Normally ZoneMinder will display 'event' streams at their + native rate, i.e. as close to real-time as possible. However if + you have long events it is often convenient to replay them at a + faster rate for review. This option lets you specify what the + default replay rate will be. It is expressed as a percentage so + 100 is normal rate, 200 is double speed etc. + `, type => { - db_type => 'integer', - hint => '25|50|100|150|200|400|1000|2500|5000|10000', - pattern => qr|^(\d+)$|, format=> q( $1 ) + db_type =>'integer', + hint =>'25|50|100|150|200|400|1000|2500|5000|10000', + pattern =>qr|^(\d+)$|, format=>q( $1 ) }, category => 'lowband', }, @@ -3700,18 +3701,18 @@ our @options = ( default => '25000', description => 'What the bitrate of the video encoded stream should be set to', help => q` - When encoding real video via the ffmpeg library a bit rate can - be specified which roughly corresponds to the available - bandwidth used for the stream. This setting effectively - corresponds to a 'quality' setting for the video. A low value - will result in a blocky image whereas a high value will produce - a clearer view. Note that this setting does not control the - frame rate of the video however the quality of the video - produced is affected both by this setting and the frame rate - that the video is produced at. A higher frame rate at a - particular bit rate result in individual frames being at a - lower quality. - `, + When encoding real video via the ffmpeg library a bit rate can + be specified which roughly corresponds to the available + bandwidth used for the stream. This setting effectively + corresponds to a 'quality' setting for the video. A low value + will result in a blocky image whereas a high value will produce + a clearer view. Note that this setting does not control the + frame rate of the video however the quality of the video + produced is affected both by this setting and the frame rate + that the video is produced at. A higher frame rate at a + particular bit rate result in individual frames being at a + lower quality. + `, type => $types{integer}, category => 'lowband', }, @@ -3720,21 +3721,21 @@ our @options = ( default => '5', description => 'What the maximum frame rate for streamed video should be', help => q` - When using streamed video the main control is the bitrate which - determines how much data can be transmitted. However a lower - bitrate at high frame rates results in a lower quality image. - This option allows you to limit the maximum frame rate to - ensure that video quality is maintained. An additional - advantage is that encoding video at high frame rates is a - processor intensive task when for the most part a very high - frame rate offers little perceptible improvement over one that - has a more manageable resource requirement. Note, this option - is implemented as a cap beyond which binary reduction takes - place. So if you have a device capturing at 15fps and set this - option to 10fps then the video is not produced at 10fps, but - rather at 7.5fps (15 divided by 2) as the final frame rate must - be the original divided by a power of 2. - `, + When using streamed video the main control is the bitrate which + determines how much data can be transmitted. However a lower + bitrate at high frame rates results in a lower quality image. + This option allows you to limit the maximum frame rate to + ensure that video quality is maintained. An additional + advantage is that encoding video at high frame rates is a + processor intensive task when for the most part a very high + frame rate offers little perceptible improvement over one that + has a more manageable resource requirement. Note, this option + is implemented as a cap beyond which binary reduction takes + place. So if you have a device capturing at 15fps and set this + option to 10fps then the video is not produced at 10fps, but + rather at 7.5fps (15 divided by 2) as the final frame rate must + be the original divided by a power of 2. + `, type => $types{integer}, category => 'lowband', }, @@ -3743,14 +3744,14 @@ our @options = ( default => 'yes', description => 'Scale thumbnails in events, bandwidth versus cpu in rescaling', help => q` - If unset, this option sends the whole image to the browser - which resizes it in the window. If set the image is scaled down - on the server before sending a reduced size image to the - browser to conserve bandwidth at the cost of cpu on the server. - Note that ZM can only perform the resizing if the appropriate - PHP graphics functionality is installed. This is usually - available in the php-gd package. - `, + If unset, this option sends the whole image to the browser + which resizes it in the window. If set the image is scaled down + on the server before sending a reduced size image to the + browser to conserve bandwidth at the cost of cpu on the server. + Note that ZM can only perform the resizing if the appropriate + PHP graphics functionality is installed. This is usually + available in the php-gd package. + `, type => $types{boolean}, category => 'lowband', }, @@ -3759,17 +3760,17 @@ our @options = ( default => 'events', description => 'What the default view of multiple events should be.', help => q` - Stored events can be viewed in either an events list format or - in a timeline based one. This option sets the default view that - will be used. Choosing one view here does not prevent the other - view being used as it will always be selectable from whichever - view is currently being used. - `, + Stored events can be viewed in either an events list format or + in a timeline based one. This option sets the default view that + will be used. Choosing one view here does not prevent the other + view being used as it will always be selectable from whichever + view is currently being used. + `, type => { - db_type => 'string', - hint => 'events|timeline', - pattern => qr|^([lt])|i, - format => q( $1 =~ /^e/ ? 'events' : 'timeline' ) + db_type =>'string', + hint =>'events|timeline', + pattern =>qr|^([lt])|i, + format =>q( $1 =~ /^e/ ? 'events' : 'timeline' ) }, category => 'lowband', }, @@ -3778,17 +3779,17 @@ our @options = ( default => 'no', description => 'Show the progress of replay in event view.', help => q` - When viewing events an event navigation panel and progress bar - is shown below the event itself. This allows you to jump to - specific points in the event, but can can also dynamically - update to display the current progress of the event replay - itself. This progress is calculated from the actual event - duration and is not directly linked to the replay itself, so on - limited bandwidth connections may be out of step with the - replay. This option allows you to turn off the progress - display, whilst still keeping the navigation aspect, where - bandwidth prevents it functioning effectively. - `, + When viewing events an event navigation panel and progress bar + is shown below the event itself. This allows you to jump to + specific points in the event, but can can also dynamically + update to display the current progress of the event replay + itself. This progress is calculated from the actual event + duration and is not directly linked to the replay itself, so on + limited bandwidth connections may be out of step with the + replay. This option allows you to turn off the progress + display, whilst still keeping the navigation aspect, where + bandwidth prevents it functioning effectively. + `, type => $types{boolean}, category => 'lowband', }, @@ -3797,17 +3798,17 @@ our @options = ( default => '10000', description => 'How long to wait for Ajax request responses (ms)', help => q` - The newer versions of the live feed and event views use Ajax to - request information from the server and populate the views - dynamically. This option allows you to specify a timeout if - required after which requests are abandoned. A timeout may be - necessary if requests would overwise hang such as on a slow - connection. This would tend to consume a lot of browser memory - and make the interface unresponsive. Ordinarily no requests - should timeout so this setting should be set to a value greater - than the slowest expected response. This value is in - milliseconds but if set to zero then no timeout will be used. - `, + The newer versions of the live feed and event views use Ajax to + request information from the server and populate the views + dynamically. This option allows you to specify a timeout if + required after which requests are abandoned. A timeout may be + necessary if requests would overwise hang such as on a slow + connection. This would tend to consume a lot of browser memory + and make the interface unresponsive. Ordinarily no requests + should timeout so this setting should be set to a value greater + than the slowest expected response. This value is in + milliseconds but if set to zero then no timeout will be used. + `, type => $types{integer}, category => 'lowband', }, @@ -3824,9 +3825,9 @@ our @options = ( name => 'ZM_DYN_CURR_VERSION', default => '@VERSION@', description => q` - What the effective current version of ZoneMinder is, might be - different from actual if versions ignored - `, + What the effective current version of ZoneMinder is, might be + different from actual if versions ignored + `, help => '', type => $types{string}, readonly => 1, @@ -3881,21 +3882,21 @@ our @options = ( name => 'ZM_SSMTP_MAIL', default => 'no', description => q` - Use a SSMTP mail server if available. - NEW_MAIL_MODULES must be enabled - `, + Use a SSMTP mail server if available. + NEW_MAIL_MODULES must be enabled + `, requires => [ - { name => 'ZM_OPT_EMAIL', value => 'yes' }, - { name => 'ZM_OPT_MESSAGE', value => 'yes' }, - { name => 'ZM_NEW_MAIL_MODULES', value => 'yes' } + { name => 'ZM_OPT_EMAIL', value => 'yes' }, + { name => 'ZM_OPT_MESSAGE', value => 'yes' }, + { name => 'ZM_NEW_MAIL_MODULES', value => 'yes' } ], help => q` - SSMTP is a lightweight and efficient method to send email. - The SSMTP application is not installed by default. - NEW_MAIL_MODULES must also be enabled. - Please visit: http://www.zoneminder.com/wiki/index.php/How_to_get_ssmtp_working_with_Zoneminder - for setup and configuration help. - `, + SSMTP is a lightweight and efficient method to send email. + The SSMTP application is not installed by default. + NEW_MAIL_MODULES must also be enabled. + Please visit: http://www.zoneminder.com/wiki/index.php/How_to_get_ssmtp_working_with_Zoneminder + for setup and configuration help. + `, type => $types{boolean}, category => 'mail', }, @@ -3905,10 +3906,10 @@ our @options = ( description => 'SSMTP executable path', requires => [{ name => 'ZM_SSMTP_MAIL', value => 'yes' }], help => q` - Recommend setting the path to the SSMTP application. - If path is not defined. Zoneminder will try to determine - the path via shell command. Example path: /usr/sbin/ssmtp. - `, + Recommend setting the path to the SSMTP application. + If path is not defined. Zoneminder will try to determine + the path via shell command. Example path: /usr/sbin/ssmtp. + `, type => $types{string}, category => 'mail', }, @@ -3916,7 +3917,7 @@ our @options = ( our %options_hash = map { ( $_->{name}, $_ ) } @options; -# This function should never need to be called explicitly, except if +# This function should never need to be called explicitly, except if # this module is 'require'd rather than 'use'd. See zmconfgen.pl. sub initialiseConfig { return if ( $configInitialised ); diff --git a/src/zm_remote_camera_http.h b/src/zm_remote_camera_http.h index b6c4ef726..fe5823397 100644 --- a/src/zm_remote_camera_http.h +++ b/src/zm_remote_camera_http.h @@ -25,7 +25,6 @@ #include "zm_buffer.h" #include "zm_regexp.h" #include "zm_utils.h" -#include "zm_packetqueue.h" // // Class representing 'http' cameras, i.e. those which are diff --git a/utils/do_debian_package.sh b/utils/do_debian_package.sh index a07b03bf4..a825d0b62 100755 --- a/utils/do_debian_package.sh +++ b/utils/do_debian_package.sh @@ -122,10 +122,10 @@ if [ ! -d "${GITHUB_FORK}_zoneminder_release" ]; then git pull cd ../ echo "git clone ${GITHUB_FORK}_ZoneMinder.git ${GITHUB_FORK}_zoneminder_release" - git clone "${GITHUB_FORK}_ZoneMinder.git" "${GITHUB_FORK}_zoneminder_release" + git clone "${GITHUB_FORK}_ZoneMinder.git" "${GITHUB_FORK}_zoneminder_release" else echo "git clone https://github.com/$GITHUB_FORK/ZoneMinder.git ${GITHUB_FORK}_zoneminder_release" - git clone "https://github.com/$GITHUB_FORK/ZoneMinder.git" "${GITHUB_FORK}_zoneminder_release" + git clone "https://github.com/$GITHUB_FORK/ZoneMinder.git" "${GITHUB_FORK}_zoneminder_release" fi else echo "release dir already exists. Please remove it." @@ -139,7 +139,7 @@ cd ../ VERSION=`cat ${GITHUB_FORK}_zoneminder_release/version` if [ $VERSION == "" ]; then - exit 1; + exit 1; fi; if [ "$SNAPSHOT" != "stable" ] && [ "$SNAPSHOT" != "" ]; then VERSION="$VERSION~$SNAPSHOT"; @@ -158,7 +158,7 @@ cd "$DIRECTORY.orig"; git submodule init git submodule update --init --recursive if [ "$DISTRO" == "trusty" ] || [ "$DISTRO" == "precise" ]; then - mv distros/ubuntu1204 debian + mv distros/ubuntu1204 debian else if [ "$DISTRO" == "wheezy" ]; then mv distros/debian debian @@ -225,7 +225,7 @@ if [ $TYPE == "binary" ]; then sudo apt-get install devscripts equivs sudo mk-build-deps -ir ./debian/control echo "Status: $?" - DEBUILD=debuild + DEBUILD=debuild else if [ $TYPE == "local" ]; then # Auto-install all ZoneMinder's depedencies using the Debian control file @@ -259,22 +259,22 @@ fi if [ $TYPE == "binary" ]; then if [ "$INTERACTIVE" != "no" ]; then - echo "Not doing dput since it's a binary release. Do you want to install it? (Y/N)" - read install - if [ "$install" == "Y" ]; then + read -p "Not doing dput since it's a binary release. Do you want to install it? (Y/N)" + if [[ $REPLY == [yY] ]]; then sudo dpkg -i $DIRECTORY*.deb + else + echo $REPLY; fi; if [ "$DISTRO" == "jessie" ]; then - echo "Do you want to upload this binary to zmrepo? (y/N)" - read install - if [ "$install" == "Y" ]; then + read -p "Do you want to upload this binary to zmrepo? (y/N)" + if [[ $REPLY == [yY] ]]; then if [ "$RELEASE" != "" ]; then scp "zoneminder_${VERSION}-${DISTRO}*" "zmrepo@zmrepo.connortechnology.com:debian/stable/mini-dinstall/incoming/" else if [ "$BRANCH" == "" ]; then scp "zoneminder_${VERSION}-${DISTRO}*" "zmrepo@zmrepo.connortechnology.com:debian/master/mini-dinstall/incoming/" else - scp "zoneminder_${VERSION}-${DISTRO}*" "zmrepo@zmrepo.connortechnology.com:debian/${BRANCH}/mini-dinstall/incoming/" + scp "$DIRECTORY-${DISTRO}*" "zmrepo@zmrepo.connortechnology.com:debian/${BRANCH}/mini-dinstall/incoming/" fi; fi; fi; @@ -282,25 +282,25 @@ if [ $TYPE == "binary" ]; then fi; else SC="zoneminder_${VERSION}-${DISTRO}${PACKAGE_VERSION}_source.changes"; - PPA=""; - if [ "$RELEASE" != "" ]; then - PPA="ppa:iconnor/zoneminder"; - else - if [ "$BRANCH" == "" ]; then - PPA="ppa:iconnor/zoneminder-master"; - else - PPA="ppa:iconnor/zoneminder-$BRANCH"; - fi; - fi; + PPA=""; + if [ "$RELEASE" != "" ]; then + PPA="ppa:iconnor/zoneminder"; + else + if [ "$BRANCH" == "" ]; then + PPA="ppa:iconnor/zoneminder-master"; + else + PPA="ppa:iconnor/zoneminder-$BRANCH"; + fi; + fi; dput="Y"; if [ "$INTERACTIVE" != "no" ]; then echo "Ready to dput $SC to $PPA ? Y/N..."; read dput fi - if [ "$dput" == "Y" -o "$dput" == "y" ]; then - dput $PPA $SC - fi; + if [ "$dput" == [Yy] ]; then + dput $PPA $SC + fi; fi; diff --git a/web/includes/functions.php b/web/includes/functions.php index 5d7e077fc..075df7a95 100644 --- a/web/includes/functions.php +++ b/web/includes/functions.php @@ -53,7 +53,7 @@ function userLogin( $username, $password='', $passwordHashed=false ) { Info( "Login successful for user \"$username\"" ); $_SESSION['user'] = $user = $dbUser; unset($_SESSION['loginFailed']); - if ( ZM_AUTH_TYPE == "builtin" ) { + if ( ZM_AUTH_TYPE == 'builtin' ) { $_SESSION['passwordHash'] = $user['Password']; } session_regenerate_id(); @@ -76,11 +76,11 @@ function userLogout() { } function noCacheHeaders() { - header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past - header("Last-Modified: ".gmdate( "D, d M Y H:i:s" )." GMT"); // always modified - header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1 - header("Cache-Control: post-check=0, pre-check=0", false); - header("Pragma: no-cache"); // HTTP/1.0 + header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past + header('Last-Modified: '.gmdate( 'D, d M Y H:i:s' ).' GMT'); // always modified + header('Cache-Control: no-store, no-cache, must-revalidate'); // HTTP/1.1 + header('Cache-Control: post-check=0, pre-check=0', false); + header('Pragma: no-cache'); // HTTP/1.0 } function CORSHeaders() { @@ -96,13 +96,13 @@ function CORSHeaders() { foreach( $servers as $row ) { $Server = new Server( $row ); if ( $_SERVER['HTTP_ORIGIN'] == $Server->Url() ) { - header("Access-Control-Allow-Origin: " . $Server->Url() ); - header("Access-Control-Allow-Headers: x-requested-with,x-request"); $valid = true; + header('Access-Control-Allow-Origin: ' . $Server->Url() ); + header('Access-Control-Allow-Headers: x-requested-with,x-request'); } } if ( ! $valid ) { - Warning( $_SERVER['HTTP_ORIGIN'] . " is not found in servers list." ); + Warning( $_SERVER['HTTP_ORIGIN'] . ' is not found in servers list.' ); } } } @@ -176,24 +176,24 @@ function getStreamSrc( $args, $querySep='&' ) { $streamSrc = ZM_BASE_URL.ZM_PATH_ZMS; if ( ZM_OPT_USE_AUTH ) { - if ( ZM_AUTH_RELAY == "hashed" ) { - $args[] = "auth=".generateAuthHash( ZM_AUTH_HASH_IPS ); - } elseif ( ZM_AUTH_RELAY == "plain" ) { - $args[] = "user=".$_SESSION['username']; - $args[] = "pass=".$_SESSION['password']; - } elseif ( ZM_AUTH_RELAY == "none" ) { - $args[] = "user=".$_SESSION['username']; + if ( ZM_AUTH_RELAY == 'hashed' ) { + $args[] = 'auth='.generateAuthHash( ZM_AUTH_HASH_IPS ); + } elseif ( ZM_AUTH_RELAY == 'plain' ) { + $args[] = 'user='.$_SESSION['username']; + $args[] = 'pass='.$_SESSION['password']; + } elseif ( ZM_AUTH_RELAY == 'none' ) { + $args[] = 'user='.$_SESSION['username']; } } - if ( !in_array( "mode=single", $args ) && !empty($GLOBALS['connkey']) ) { - $args[] = "connkey=".$GLOBALS['connkey']; + if ( !in_array( 'mode=single', $args ) && !empty($GLOBALS['connkey']) ) { + $args[] = 'connkey='.$GLOBALS['connkey']; } if ( ZM_RAND_STREAM ) { - $args[] = "rand=".time(); + $args[] = 'rand='.time(); } if ( count($args) ) { - $streamSrc .= "?".join( $querySep, $args ); + $streamSrc .= '?'.join( $querySep, $args ); } return( $streamSrc ); @@ -211,11 +211,11 @@ function getMimeType( $file ) { return( trim( exec( 'file -bi '.escapeshellarg( $file ).' 2>/dev/null' ) ) ); } -function outputVideoStream( $id, $src, $width, $height, $format, $title="" ) { +function outputVideoStream( $id, $src, $width, $height, $format, $title='' ) { echo getVideoStreamHTML( $id, $src, $width, $height, $format, $title ); } -function getVideoStreamHTML( $id, $src, $width, $height, $format, $title="" ) { +function getVideoStreamHTML( $id, $src, $width, $height, $format, $title='' ) { $html = ''; $width = validInt($width); $height = validInt($height); @@ -226,24 +226,24 @@ function getVideoStreamHTML( $id, $src, $width, $height, $format, $title="" ) { } else { switch( $format ) { case 'asf' : - $mimeType = "video/x-ms-asf"; + $mimeType = 'video/x-ms-asf'; break; case 'avi' : case 'wmv' : - $mimeType = "video/x-msvideo"; + $mimeType = 'video/x-msvideo'; break; case 'mov' : - $mimeType = "video/quicktime"; + $mimeType = 'video/quicktime'; break; case 'mpg' : case 'mpeg' : - $mimeType = "video/mpeg"; + $mimeType = 'video/mpeg'; break; case 'swf' : - $mimeType = "application/x-shockwave-flash"; + $mimeType = 'application/x-shockwave-flash'; break; case '3gp' : - $mimeType = "video/3gpp"; + $mimeType = 'video/3gpp'; break; default : $mimeType = "video/$format"; @@ -254,9 +254,9 @@ function getVideoStreamHTML( $id, $src, $width, $height, $format, $title="" ) { $mimeType = 'video/'.$format; if ( ZM_WEB_USE_OBJECT_TAGS ) { switch( $mimeType ) { - case "video/x-ms-asf" : - case "video/x-msvideo" : - case "video/mp4" : + case 'video/x-ms-asf' : + case 'video/x-msvideo' : + case 'video/mp4' : { if ( isWindows() ) { return ''; } } - case "video/quicktime" : + case 'video/quicktime' : { return ' '; } - case "application/x-shockwave-flash" : + case 'application/x-shockwave-flash' : { return ''; } -function outputImageStill( $id, $src, $width, $height, $title="" ) { - echo getImageStill( $id, $src, $width, $height, $title="" ); +function outputImageStill( $id, $src, $width, $height, $title='' ) { + echo getImageStill( $id, $src, $width, $height, $title='' ); } -function getImageStill( $id, $src, $width, $height, $title="" ) { +function getImageStill( $id, $src, $width, $height, $title='' ) { return ''.$title.''; } -function outputControlStill( $src, $width, $height, $monitor, $scale, $target ) -{ +function outputControlStill( $src, $width, $height, $monitor, $scale, $target ) { ?>
@@ -417,18 +416,12 @@ function outputControlStill( $src, $width, $height, $monitor, $scale, $target ) function getZmuCommand( $args ) { $zmuCommand = ZMU_PATH; - if ( ZM_OPT_USE_AUTH ) - { - if ( ZM_AUTH_RELAY == "hashed" ) - { - $zmuCommand .= " -A ".generateAuthHash( false ); - } - elseif ( ZM_AUTH_RELAY == "plain" ) - { - $zmuCommand .= " -U " .escapeshellarg($_SESSION['username'])." -P ".escapeshellarg($_SESSION['password']); - } - elseif ( ZM_AUTH_RELAY == "none" ) - { + if ( ZM_OPT_USE_AUTH ) { + if ( ZM_AUTH_RELAY == 'hashed' ) { + $zmuCommand .= ' -A '.generateAuthHash( false ); + } elseif ( ZM_AUTH_RELAY == 'plain' ) { + $zmuCommand .= ' -U ' .escapeshellarg($_SESSION['username']).' -P '.escapeshellarg($_SESSION['password']); + } elseif ( ZM_AUTH_RELAY == 'none' ) { $zmuCommand .= " -U ".escapeshellarg($_SESSION['username']); } } @@ -458,7 +451,7 @@ function canEdit( $area, $mid=false ) { function getEventPath( $event ) { if ( ZM_USE_DEEP_STORAGE ) - $eventPath = $event['MonitorId'].'/'.strftime( "%y/%m/%d/%H/%M/%S", strtotime($event['StartTime']) ); + $eventPath = $event['MonitorId'].'/'.strftime( '%y/%m/%d/%H/%M/%S', strtotime($event['StartTime']) ); else $eventPath = $event['MonitorId'].'/'.$event['Id']; return( $eventPath ); @@ -473,7 +466,7 @@ function getEventDefaultVideoPath( $event ) { function deletePath( $path ) { if ( is_dir( $path ) ) { Logger::Debug("deletePath rm -rf $path"); - system( escapeshellcmd( "rm -rf ".$path ) ); + system( escapeshellcmd( 'rm -rf '.$path ) ); } else { Logger::Debug("deletePath unlink $path"); unlink( $path ); @@ -483,7 +476,7 @@ Logger::Debug("deletePath unlink $path"); function deleteEvent( $event ) { if ( empty($event) ) { - Error( "Empty event passed to deleteEvent."); + Error( 'Empty event passed to deleteEvent.'); return; } @@ -501,8 +494,8 @@ Logger::Debug("Event type: " . gettype($event)); } # CAN EDIT } -function makeLink( $url, $label, $condition=1, $options="" ) { - $string = ""; +function makeLink( $url, $label, $condition=1, $options='' ) { + $string = ''; if ( $condition ) { $string .= ''; } @@ -513,8 +506,8 @@ function makeLink( $url, $label, $condition=1, $options="" ) { return( $string ); } -function makePopupLink( $url, $winName, $winSize, $label, $condition=1, $options="" ) { - $string = ""; +function makePopupLink( $url, $winName, $winSize, $label, $condition=1, $options='' ) { + $string = ''; if ( $condition ) { if ( is_array( $winSize ) ) $popupParms = "'".$url."', '".$winName."', '".$winSize[0]."', ".$winSize[1].", ".$winSize[2]; @@ -530,7 +523,7 @@ function makePopupLink( $url, $winName, $winSize, $label, $condition=1, $options return( $string ); } -function makePopupButton( $url, $winName, $winSize, $buttonValue, $condition=1, $options="" ) { +function makePopupButton( $url, $winName, $winSize, $buttonValue, $condition=1, $options='' ) { if ( is_array( $winSize ) ) $popupParms = "'".$url."', '".$winName."', '".$winSize[0]."', ".$winSize[1].", ".$winSize[2]; else @@ -541,7 +534,7 @@ function makePopupButton( $url, $winName, $winSize, $buttonValue, $condition=1, function htmlSelect( $name, $contents, $values, $behaviours=false ) { - $behaviourText = ""; + $behaviourText = ''; if ( !empty($behaviours) ) { if ( is_array($behaviours) ) { foreach ( $behaviours as $event=>$action ) { @@ -557,24 +550,23 @@ function htmlSelect( $name, $contents, $values, $behaviours=false ) { $selected = is_array( $values ) ? in_array( $value, $values ) : $value==$values; $html .= ""; } - $html .= ""; + $html .= ''; return $html; } function truncText( $text, $length, $deslash=1 ) { - return( preg_replace( "/^(.{".$length.",}?)\b.*$/", "\\1…", ($deslash?stripslashes($text):$text) ) ); + return( preg_replace( '/^(.{'.$length.',}?)\b.*$/', '\\1…', ($deslash?stripslashes($text):$text) ) ); } -function buildSelect( $name, $contents, $behaviours=false ) -{ - $value = ""; - if ( preg_match( "/^\s*(\w+)\s*(\[.*\])?\s*$/", $name, $matches ) && count($matches) > 2 ) { +function buildSelect( $name, $contents, $behaviours=false ) { + $value = ''; + if ( preg_match( '/^\s*(\w+)\s*(\[.*\])?\s*$/', $name, $matches ) && count($matches) > 2 ) { $arr = $matches[1]; if ( isset($GLOBALS[$arr]) ) $value = $GLOBALS[$arr]; elseif ( isset($_REQUEST[$arr]) ) $value = $_REQUEST[$arr]; - if ( !preg_match_all( "/\[\s*['\"]?(\w+)[\"']?\s*\]/", $matches[2], $matches ) ) { + if ( !preg_match_all( '/\[\s*[\'"]?(\w+)["\']?\s*\]/', $matches[2], $matches ) ) { Fatal( "Can't parse selector '$name'" ); } for ( $i = 0; $i < count($matches[1]); $i++ ) { @@ -588,7 +580,7 @@ function buildSelect( $name, $contents, $behaviours=false ) $value = $_REQUEST[$name]; } ob_start(); - $behaviourText = ""; + $behaviourText = ''; if ( !empty($behaviours) ) { if ( is_array($behaviours) ) { foreach ( $behaviours as $event=>$action ) { @@ -642,10 +634,10 @@ function getFormChanges( $values, $newValues, $types=false, $columns=false ) { { if ( is_array( $newValues[$key] ) ) { $imageData = getimagesize( $newValues[$key]['tmp_name'] ); - $changes[$key.'Width'] = $key."Width = ".$imageData[0]; - $changes[$key.'Height'] = $key."Height = ".$imageData[1]; + $changes[$key.'Width'] = $key.'Width = '.$imageData[0]; + $changes[$key.'Height'] = $key.'Height = '.$imageData[1]; $changes[$key.'Type'] = $key."Type = '".$newValues[$key]['type']."'"; - $changes[$key.'Size'] = $key."Size = ".$newValues[$key]['size']; + $changes[$key.'Size'] = $key.'Size = '.$newValues[$key]['size']; ob_start(); readfile( $newValues[$key]['tmp_name'] ); $changes[$key] = $key." = ".dbEscape( ob_get_contents() ); @@ -660,20 +652,20 @@ function getFormChanges( $values, $newValues, $types=false, $columns=false ) { if ( is_array( $newValues[$key] ) ) { $imageData = getimagesize( $newValues[$key]['tmp_name'] ); $changes[$key.'Type'] = $key."Type = '".$newValues[$key]['type']."'"; - $changes[$key.'Size'] = $key."Size = ".$newValues[$key]['size']; + $changes[$key.'Size'] = $key.'Size = '.$newValues[$key]['size']; ob_start(); readfile( $newValues[$key]['tmp_name'] ); - $changes[$key] = $key." = ".dbEscape( ob_get_contents() ); + $changes[$key] = $key.' = '.dbEscape( ob_get_contents() ); ob_end_clean(); } else { - $changes[$key] = "$key = ".dbEscape($value); + $changes[$key] = $key . ' = '.dbEscape($value); } break; } case 'file' : { - $changes[$key.'Type'] = $key."Type = ".dbEscape($newValues[$key]['type']); - $changes[$key.'Size'] = $key."Size = ".dbEscape($newValues[$key]['size']); + $changes[$key.'Type'] = $key.'Type = '.dbEscape($newValues[$key]['type']); + $changes[$key.'Size'] = $key.'Size = '.dbEscape($newValues[$key]['size']); ob_start(); readfile( $newValues[$key]['tmp_name'] ); $changes[$key] = $key." = '".dbEscape( ob_get_contents() )."'"; @@ -683,7 +675,7 @@ function getFormChanges( $values, $newValues, $types=false, $columns=false ) { case 'raw' : { if ( $values[$key] != $value ) { - $changes[$key] = "$key = ".dbEscape($value); + $changes[$key] = $key . ' = '.dbEscape($value); } break; } @@ -693,7 +685,7 @@ function getFormChanges( $values, $newValues, $types=false, $columns=false ) { if ( ! isset($value) || $value == '' ) { $changes[$key] = "$key = NULL"; } else { - $changes[$key] = "$key = ".dbEscape(trim($value)); + $changes[$key] = $key . ' = '.dbEscape(trim($value)); } } break; @@ -758,43 +750,43 @@ function getBrowser( &$browser, &$version ) { function isMozilla() { getBrowser( $browser, $version ); - return( $browser == "mozilla" ); + return( $browser == 'mozilla' ); } function isKonqueror() { getBrowser( $browser, $version ); - return( $browser == "konqueror" ); + return( $browser == 'konqueror' ); } function isInternetExplorer() { getBrowser( $browser, $version ); - return( $browser == "ie" ); + return( $browser == 'ie' ); } function isOldChrome() { getBrowser( $browser, $version ); - return( $browser == "oldchrome" ); + return( $browser == 'oldchrome' ); } function isChrome() { getBrowser( $browser, $version ); - return( $browser == "chrome" ); + return( $browser == 'chrome' ); } function isOpera() { getBrowser( $browser, $version ); - return( $browser == "opera" ); + return( $browser == 'opera' ); } function isSafari() { getBrowser( $browser, $version ); - return( $browser == "safari" ); + return( $browser == 'safari' ); } function isWindows() { @@ -807,12 +799,12 @@ function canStreamIframe() { function canStreamNative() { // Old versions of Chrome can display the stream, but then it blocks everything else (Chrome bug 5876) - return( ZM_WEB_CAN_STREAM == "yes" || ( ZM_WEB_CAN_STREAM == "auto" && (!isInternetExplorer() && !isOldChrome()) ) ); + return( ZM_WEB_CAN_STREAM == 'yes' || ( ZM_WEB_CAN_STREAM == 'auto' && (!isInternetExplorer() && !isOldChrome()) ) ); } function canStreamApplet() { if ( (ZM_OPT_CAMBOZOLA && !file_exists( ZM_PATH_WEB.'/'.ZM_PATH_CAMBOZOLA )) ) { - Warning ( "ZM_OPT_CAMBOZOLA is enabled, but the system cannot find ".ZM_PATH_WEB."/".ZM_PATH_CAMBOZOLA ); + Warning ( 'ZM_OPT_CAMBOZOLA is enabled, but the system cannot find '.ZM_PATH_WEB.'/'.ZM_PATH_CAMBOZOLA ); } return( (ZM_OPT_CAMBOZOLA && file_exists( ZM_PATH_WEB.'/'.ZM_PATH_CAMBOZOLA )) ); @@ -824,7 +816,7 @@ function canStream() { function packageControl( $command ) { $string = ZM_PATH_BIN.'/zmpkg.pl '.escapeshellarg( $command ); - $string .= " 2>/dev/null >&- <&- >/dev/null"; + $string .= ' 2>/dev/null >&- <&- >/dev/null'; exec( $string ); } @@ -883,27 +875,27 @@ function zmcControl( $monitor, $mode=false ) { function zmaControl( $monitor, $mode=false ) { if ( !is_array( $monitor ) ) { - $monitor = dbFetchOne( "select C.*, M.* from Monitors as M left join Controls as C on (M.ControlId = C.Id ) where M.Id=?", NULL, array($monitor) ); + $monitor = dbFetchOne( 'select C.*, M.* from Monitors as M left join Controls as C on (M.ControlId = C.Id ) where M.Id=?', NULL, array($monitor) ); } if ( (!defined('ZM_SERVER_ID')) or ( ZM_SERVER_ID==$monitor['ServerId'] ) ) { - if ( !$monitor || $monitor['Function'] == 'None' || $monitor['Function'] == 'Monitor' || $mode == "stop" ) { + if ( !$monitor || $monitor['Function'] == 'None' || $monitor['Function'] == 'Monitor' || $mode == 'stop' ) { if ( ZM_OPT_CONTROL ) { - daemonControl( "stop", "zmtrack.pl", "-m ".$monitor['Id'] ); + daemonControl( 'stop', 'zmtrack.pl', '-m '.$monitor['Id'] ); } - daemonControl( "stop", "zma", "-m ".$monitor['Id'] ); + daemonControl( 'stop', 'zma', '-m '.$monitor['Id'] ); } else { - if ( $mode == "restart" ) { + if ( $mode == 'restart' ) { if ( ZM_OPT_CONTROL ) { - daemonControl( "stop", "zmtrack.pl", "-m ".$monitor['Id'] ); + daemonControl( 'stop', 'zmtrack.pl', '-m '.$monitor['Id'] ); } - daemonControl( "stop", "zma", "-m ".$monitor['Id'] ); + daemonControl( 'stop', 'zma', '-m '.$monitor['Id'] ); } - daemonControl( "start", "zma", "-m ".$monitor['Id'] ); + daemonControl( 'start', 'zma', '-m '.$monitor['Id'] ); if ( ZM_OPT_CONTROL && $monitor['Controllable'] && $monitor['TrackMotion'] && ( $monitor['Function'] == 'Modect' || $monitor['Function'] == 'Mocord' ) ) { - daemonControl( "start", "zmtrack.pl", "-m ".$monitor['Id'] ); + daemonControl( 'start', 'zmtrack.pl', '-m '.$monitor['Id'] ); } - if ( $mode == "reload" ) { - daemonControl( "reload", "zma", "-m ".$monitor['Id'] ); + if ( $mode == 'reload' ) { + daemonControl( 'reload', 'zma', '-m '.$monitor['Id'] ); } } } // end if we are on the recording server @@ -917,7 +909,7 @@ function initDaemonStatus() { $string = ZM_PATH_BIN."/zmdc.pl status"; $daemon_status = shell_exec( $string ); } else { - $daemon_status = ""; + $daemon_status = ''; } } } @@ -950,7 +942,7 @@ function zmaStatus( $monitor ) { } function daemonCheck( $daemon=false, $args=false ) { - $string = ZM_PATH_BIN."/zmdc.pl check"; + $string = ZM_PATH_BIN.'/zmdc.pl check'; if ( $daemon ) { $string .= ' ' . $daemon; if ( $args ) @@ -1083,54 +1075,54 @@ function parseSort( $saveToSession=false, $querySep='&' ) { if ( empty($_REQUEST['sort_field']) ) { $_REQUEST['sort_field'] = ZM_WEB_EVENT_SORT_FIELD; - $_REQUEST['sort_asc'] = (ZM_WEB_EVENT_SORT_ORDER == "asc"); + $_REQUEST['sort_asc'] = (ZM_WEB_EVENT_SORT_ORDER == 'asc'); } switch( $_REQUEST['sort_field'] ) { case 'Id' : - $sortColumn = "E.Id"; + $sortColumn = 'E.Id'; break; case 'MonitorName' : - $sortColumn = "M.Name"; + $sortColumn = 'M.Name'; break; case 'Name' : - $sortColumn = "E.Name"; + $sortColumn = 'E.Name'; break; case 'Cause' : - $sortColumn = "E.Cause"; + $sortColumn = 'E.Cause'; break; case 'DateTime' : $_REQUEST['sort_field'] = 'StartTime'; case 'StartTime' : - $sortColumn = "E.StartTime"; + $sortColumn = 'E.StartTime'; break; case 'Length' : - $sortColumn = "E.Length"; + $sortColumn = 'E.Length'; break; case 'Frames' : - $sortColumn = "E.Frames"; + $sortColumn = 'E.Frames'; break; case 'AlarmFrames' : - $sortColumn = "E.AlarmFrames"; + $sortColumn = 'E.AlarmFrames'; break; case 'TotScore' : - $sortColumn = "E.TotScore"; + $sortColumn = 'E.TotScore'; break; case 'AvgScore' : - $sortColumn = "E.AvgScore"; + $sortColumn = 'E.AvgScore'; break; case 'MaxScore' : - $sortColumn = "E.MaxScore"; + $sortColumn = 'E.MaxScore'; break; default: - $sortColumn = "E.StartTime"; + $sortColumn = 'E.StartTime'; break; } - $sortOrder = $_REQUEST['sort_asc']?"asc":"desc"; + $sortOrder = $_REQUEST['sort_asc']?'asc':'desc'; if ( !$_REQUEST['sort_asc'] ) $_REQUEST['sort_asc'] = 0; - $sortQuery = $querySep."sort_field=".validHtmlStr($_REQUEST['sort_field']).$querySep."sort_asc=".validHtmlStr($_REQUEST['sort_asc']); + $sortQuery = $querySep.'sort_field='.validHtmlStr($_REQUEST['sort_field']).$querySep.'sort_asc='.validHtmlStr($_REQUEST['sort_asc']); if ( !isset($_REQUEST['limit']) ) - $_REQUEST['limit'] = ""; + $_REQUEST['limit'] = ''; if ( $saveToSession ) { $_SESSION['sort_field'] = validHtmlStr($_REQUEST['sort_field']); $_SESSION['sort_asc'] = validHtmlStr($_REQUEST['sort_asc']); @@ -1167,16 +1159,16 @@ function parseFilter( &$filter, $saveToSession=false, $querySep='&' ) { $filter['sql'] .= 'M.ServerId'; break; case 'DateTime': - $filter['sql'] .= "E.StartTime"; + $filter['sql'] .= 'E.StartTime'; break; case 'Date': - $filter['sql'] .= "to_days( E.StartTime )"; + $filter['sql'] .= 'to_days( E.StartTime )'; break; case 'Time': - $filter['sql'] .= "extract( hour_second from E.StartTime )"; + $filter['sql'] .= 'extract( hour_second from E.StartTime )'; break; case 'Weekday': - $filter['sql'] .= "weekday( E.StartTime )"; + $filter['sql'] .= 'weekday( E.StartTime )'; break; case 'Id': case 'Name': @@ -1265,19 +1257,19 @@ function parseFilter( &$filter, $saveToSession=false, $querySep='&' ) { case '>' : case '<' : case '<=' : - $filter['sql'] .= " ".$filter['terms'][$i]['op']." $value"; + $filter['sql'] .= ' '.$filter['terms'][$i]['op']." $value"; break; case '=~' : - $filter['sql'] .= " regexp ".$value; + $filter['sql'] .= ' regexp '.$value; break; case '!~' : - $filter['sql'] .= " not regexp ".$value; + $filter['sql'] .= ' not regexp '.$value; break; case '=[]' : - $filter['sql'] .= " in (".join( ",", $valueList ).")"; + $filter['sql'] .= ' in ('.join( ",", $valueList ).')'; break; case '![]' : - $filter['sql'] .= " not in (".join( ",", $valueList ).")"; + $filter['sql'] .= ' not in ('.join( ',', $valueList ).')'; break; } @@ -1288,12 +1280,12 @@ function parseFilter( &$filter, $saveToSession=false, $querySep='&' ) { } if ( isset($filter['terms'][$i]['cbr']) ) { $filter['query'] .= $querySep."filter[terms][$i][cbr]=".urlencode($filter['terms'][$i]['cbr']); - $filter['sql'] .= " ".str_repeat( ")", $filter['terms'][$i]['cbr'] )." "; + $filter['sql'] .= ' '.str_repeat( ')', $filter['terms'][$i]['cbr'] ).' '; $filter['fields'] .= "\n"; } } if ( $filter['sql'] ) - $filter['sql'] = " and ( ".$filter['sql']." )"; + $filter['sql'] = ' and ( '.$filter['sql'].' )'; if ( $saveToSession ) { $_SESSION['filter'] = $filter; } @@ -1325,7 +1317,7 @@ function delFilterTerm( $filter, $position ) { function getPagination( $pages, $page, $maxShortcuts, $query, $querySep='&' ) { global $view; - $pageText = ""; + $pageText = ''; if ( $pages > 1 ) { if ( $page ) { if ( $page < 0 ) @@ -1414,7 +1406,7 @@ function getDiskPercent($path = ZM_DIR_EVENTS) { Error('disk_total_space returned false. Verify the web account user has access to ' . $path ); return 0; } elseif ( $total == 0 ) { - Error('disk_total_space indicates the following path has a filesystem size of zero bytes' . $path ); + Error('disk_total_space indicates the following path has a filesystem size of zero bytes ' . $path ); return 100; } $free = disk_free_space($path); @@ -1447,17 +1439,17 @@ function sidField() { } function verNum( $version ) { - $vNum = ""; + $vNum = ''; $maxFields = 3; - $vFields = explode( ".", $version ); + $vFields = explode( '.', $version ); array_splice( $vFields, $maxFields ); while ( count($vFields) < $maxFields ) { $vFields[] = 0; } foreach ( $vFields as $vField ) { - $vField = sprintf( "%02d", $vField ); + $vField = sprintf( '%02d', $vField ); while ( strlen($vField) < 2 ) { - $vField = "0".$vField; + $vField = '0'.$vField; } $vNum .= $vField; } @@ -1466,7 +1458,7 @@ function verNum( $version ) { function fixSequences() { $sequence = 1; - $sql = "select * from Monitors order by Sequence asc, Id asc"; + $sql = 'select * from Monitors order by Sequence asc, Id asc'; foreach( dbFetchAll( $sql ) as $monitor ) { if ( $monitor['Sequence'] != $sequence ) { dbQuery( 'update Monitors set Sequence = ? WHERE Id=?', array( $sequence, $monitor['Id'] ) ); @@ -1496,7 +1488,7 @@ function linesIntersect( $line1, $line2 ) { // Checking if bounding boxes intersect if ( $max_x1 < $min_x2 || $max_x2 < $min_x1 ||$max_y1 < $min_y2 || $max_y2 < $min_y1 ) { - if ( $debug ) echo "Not intersecting, out of bounds
"; + if ( $debug ) echo 'Not intersecting, out of bounds
'; return( false ); } @@ -1531,11 +1523,11 @@ function linesIntersect( $line1, $line2 ) { } } elseif ( $b1 == $b2 ) { // Colinear, must overlap due to box check, intersect? - if ( $debug ) echo "Intersecting, colinear
"; + if ( $debug ) echo 'Intersecting, colinear
'; return( true ); } else { // Parallel - if ( $debug ) echo "Not intersecting, parallel
"; + if ( $debug ) echo 'Not intersecting, parallel
'; return( false ); } } elseif ( !$dx1 ) { // Line 1 is vertical @@ -1559,15 +1551,15 @@ function linesIntersect( $line1, $line2 ) { } else { // Both lines are vertical if ( $line1[0]['x'] == $line2[0]['x'] ) { // Colinear, must overlap due to box check, intersect? - if ( $debug ) echo "Intersecting, vertical, colinear
"; + if ( $debug ) echo 'Intersecting, vertical, colinear
'; return( true ); } else { // Parallel - if ( $debug ) echo "Not intersecting, vertical, parallel
"; + if ( $debug ) echo 'Not intersecting, vertical, parallel
'; return( false ); } } - if ( $debug ) echo "Whoops, unexpected scenario
"; + if ( $debug ) echo 'Whoops, unexpected scenario
'; return( false ); } @@ -1638,18 +1630,18 @@ function getPolyArea( $points ) { $dy = $y2 - $y1; $global_edges[] = array( - "min_y" => $y1<$y2?$y1:$y2, - "max_y" => ($y1<$y2?$y2:$y1)+1, - "min_x" => $y1<$y2?$x1:$x2, - "_1_m" => $dx/$dy, + 'min_y' => $y1<$y2?$y1:$y2, + 'max_y' => ($y1<$y2?$y2:$y1)+1, + 'min_x' => $y1<$y2?$x1:$x2, + '_1_m' => $dx/$dy, ); } - usort( $global_edges, "_CompareXY" ); + usort( $global_edges, '_CompareXY' ); if ( $debug ) { for ( $i = 0; $i < count($global_edges); $i++ ) { - printf( "%d: min_y: %d, max_y:%d, min_x:%.2f, 1/m:%.2f
", $i, $global_edges[$i]['min_y'], $global_edges[$i]['max_y'], $global_edges[$i]['min_x'], $global_edges[$i]['_1_m'] ); + printf( '%d: min_y: %d, max_y:%d, min_x:%.2f, 1/m:%.2f
', $i, $global_edges[$i]['min_y'], $global_edges[$i]['max_y'], $global_edges[$i]['min_x'], $global_edges[$i]['_1_m'] ); } } @@ -1659,7 +1651,7 @@ function getPolyArea( $points ) { do { for ( $i = 0; $i < count($global_edges); $i++ ) { if ( $global_edges[$i]['min_y'] == $y ) { - if ( $debug ) printf( "Moving global edge
" ); + if ( $debug ) printf( 'Moving global edge
' ); $active_edges[] = $global_edges[$i]; array_splice( $global_edges, $i, 1 ); $i--; @@ -1667,10 +1659,10 @@ function getPolyArea( $points ) { break; } } - usort( $active_edges, "_CompareX" ); + usort( $active_edges, '_CompareX' ); if ( $debug ) { for ( $i = 0; $i < count($active_edges); $i++ ) { - printf( "%d - %d: min_y: %d, max_y:%d, min_x:%.2f, 1/m:%.2f
", $y, $i, $active_edges[$i]['min_y'], $active_edges[$i]['max_y'], $active_edges[$i]['min_x'], $active_edges[$i]['_1_m'] ); + printf( '%d - %d: min_y: %d, max_y:%d, min_x:%.2f, 1/m:%.2f
', $y, $i, $active_edges[$i]['min_y'], $active_edges[$i]['max_y'], $active_edges[$i]['min_x'], $active_edges[$i]['_1_m'] ); } } $last_x = 0; @@ -1686,11 +1678,11 @@ function getPolyArea( $points ) { $parity = !$parity; $last_x = $x; } - if ( $debug ) printf( "%d: Area:%d
", $y, $row_area ); + if ( $debug ) printf( '%d: Area:%d
', $y, $row_area ); $y++; for ( $i = 0; $i < count($active_edges); $i++ ) { if ( $y >= $active_edges[$i]['max_y'] ) { // Or >= as per sheets - if ( $debug ) printf( "Deleting active_edge
" ); + if ( $debug ) printf( 'Deleting active_edge
' ); array_splice( $active_edges, $i, 1 ); $i--; } else { @@ -1698,7 +1690,7 @@ function getPolyArea( $points ) { } } } while ( count($global_edges) || count($active_edges) ); - if ( $debug ) printf( "Area:%d
", $area ); + if ( $debug ) printf( 'Area:%d
', $area ); return( $area ); } @@ -1727,7 +1719,7 @@ function mapCoords( $a ) { } function pointsToCoords( $points ) { - return( join( " ", array_map( "mapCoords", $points ) ) ); + return( join( ' ', array_map( 'mapCoords', $points ) ) ); } function coordsToPoints( $coords ) { @@ -1776,7 +1768,7 @@ function scalePoints( &$points, $scale ) { function getLanguages() { $langs = array(); - foreach ( glob("lang/*_*.php") as $file ) { + foreach ( glob('lang/*_*.php') as $file ) { preg_match( '/([^\/]+_.+)\.php/', $file, $matches ); $langs[$matches[1]] = $matches[1]; } @@ -1790,7 +1782,7 @@ function trimString( $string, $length ) { function monitorIdsToNames( $ids ) { global $mITN_monitors; if ( !$mITN_monitors ) { - $sql = "select Id, Name from Monitors"; + $sql = 'select Id, Name from Monitors'; foreach( dbFetchAll( $sql ) as $monitor ) { $mITN_monitors[$monitor['Id']] = $monitor; } @@ -1813,16 +1805,16 @@ function initX10Status() { if ( !isset($x10_status) ) { $socket = socket_create( AF_UNIX, SOCK_STREAM, 0 ); if ( $socket < 0 ) { - Fatal( "socket_create() failed: ".socket_strerror($socket) ); + Fatal( 'socket_create() failed: '.socket_strerror($socket) ); } $sock_file = ZM_PATH_SOCKS.'/zmx10.sock'; if ( @socket_connect( $socket, $sock_file ) ) { - $command = "status"; + $command = 'status'; if ( !socket_write( $socket, $command ) ) { Fatal( "Can't write to control socket: ".socket_strerror(socket_last_error($socket)) ); } socket_shutdown( $socket, 1 ); - $x10Output = ""; + $x10Output = ''; while ( $x10Response = socket_read( $socket, 256 ) ) { $x10Output .= $x10Response; } @@ -1848,14 +1840,14 @@ function getDeviceStatusX10( $key ) { initX10Status(); if ( empty($x10_status[$key]) || !($status = $x10_status[$key]) ) - $status = "unknown"; + $status = 'unknown'; return( $status ); } function setDeviceStatusX10( $key, $status ) { $socket = socket_create( AF_UNIX, SOCK_STREAM, 0 ); if ( $socket < 0 ) { - Fatal( "socket_create() failed: ".socket_strerror($socket) ); + Fatal( 'socket_create() failed: '.socket_strerror($socket) ); } $sock_file = ZM_PATH_SOCKS.'/zmx10.sock'; if ( @socket_connect( $socket, $sock_file ) ) { @@ -1876,7 +1868,7 @@ function setDeviceStatusX10( $key, $status ) { if ( preg_match( '/^'.$key.'\s+(.*)/', $x10Response, $matches ) ) $status = $matches[1]; else - $status = "unknown"; + $status = 'unknown'; return( $status ); } @@ -2026,7 +2018,7 @@ function ajaxError( $message, $code=HTTP_STATUS_OK ) { ajaxCleanup(); if ( $code == HTTP_STATUS_OK ) { $response = array( 'result'=>'Error', 'message'=>$message ); - header( "Content-type: text/plain" ); + header( 'Content-type: text/plain' ); exit( jsonEncode( $response ) ); } header( "HTTP/1.0 $code $message" ); @@ -2041,7 +2033,7 @@ function ajaxResponse( $result=false ) { $response = array_merge( $response, $result ); elseif ( !empty($result) ) $response['message'] = $result; - header( "Content-type: text/plain" ); + header( 'Content-type: text/plain' ); exit( jsonEncode( $response ) ); } @@ -2091,7 +2083,7 @@ function getSkinIncludes( $file, $includeBase=false, $asOverride=false ) return( $includeFiles ); } -function requestVar( $name, $default="" ) { +function requestVar( $name, $default='' ) { return( isset($_REQUEST[$name])?validHtmlStr($_REQUEST[$name]):$default ); }