Merge branch 'master' of github.com:ZoneMinder/ZoneMinder

This commit is contained in:
Isaac Connor 2016-12-06 11:55:26 -05:00
commit fbc47359eb
30 changed files with 1179 additions and 1611 deletions

View File

@ -23,9 +23,11 @@ env:
compiler: compiler:
- gcc - gcc
- clang - clang
services:
- mysql
before_install: before_install:
- sudo apt-get update -qq - sudo apt-get update -qq
- sudo apt-get install -y -qq libpolkit-gobject-1-dev zlib1g-dev apache2 mysql-server php5 php5-mysql build-essential libmysqlclient-dev libssl-dev libbz2-dev libpcre3-dev libdbi-perl libarchive-zip-perl libdate-manip-perl libdevice-serialport-perl libmime-perl libwww-perl libdbd-mysql-perl libsys-mmap-perl yasm automake autoconf cmake libjpeg-turbo8-dev apache2-mpm-prefork libapache2-mod-php5 php5-cli libtheora-dev libvorbis-dev libvpx-dev libx264-dev libvlccore-dev libvlc-dev 2>&1 > /dev/null - sudo apt-get install -y libpolkit-gobject-1-dev zlib1g-dev apache2 php5 php5-mysql build-essential libmysqlclient-dev libssl-dev libbz2-dev libpcre3-dev libdbi-perl libarchive-zip-perl libdate-manip-perl libdevice-serialport-perl libmime-perl libwww-perl libdbd-mysql-perl libsys-mmap-perl yasm automake autoconf cmake libjpeg-turbo8-dev apache2-mpm-prefork libapache2-mod-php5 php5-cli libtheora-dev libvorbis-dev libvpx-dev libx264-dev libvlccore-dev libvlc-dev
install: install:
- git clone -b n3.0 --depth=1 git://source.ffmpeg.org/ffmpeg.git - git clone -b n3.0 --depth=1 git://source.ffmpeg.org/ffmpeg.git
- cd ffmpeg - cd ffmpeg

View File

@ -147,10 +147,10 @@ set(ZM_PERL_SEARCH_PATH "" CACHE PATH
where ZM_PERL_MM_PARMS has been modified such that ZoneMinder's Perl modules are where ZM_PERL_MM_PARMS has been modified such that ZoneMinder's Perl modules are
installed outside Perl's default search path.") installed outside Perl's default search path.")
set(ZM_TARGET_DISTRO "" CACHE STRING set(ZM_TARGET_DISTRO "" CACHE STRING
"Build ZoneMinder for a specific distribution. Currently, valid names are: f23, f24, el6, el7, OS13, FreeBSD") "Build ZoneMinder for a specific distribution. Currently, valid names are: fc24, fc25, el6, el7, OS13, FreeBSD")
# Reassign some variables if a target distro has been specified # Reassign some variables if a target distro has been specified
if((ZM_TARGET_DISTRO STREQUAL "f23") OR (ZM_TARGET_DISTRO STREQUAL "f24")) if((ZM_TARGET_DISTRO STREQUAL "fc24") OR (ZM_TARGET_DISTRO STREQUAL "fc25"))
set(ZM_RUNDIR "/var/run/zoneminder") set(ZM_RUNDIR "/var/run/zoneminder")
set(ZM_SOCKDIR "/var/lib/zoneminder/sock") set(ZM_SOCKDIR "/var/lib/zoneminder/sock")
set(ZM_TMPDIR "/var/lib/zoneminder/temp") set(ZM_TMPDIR "/var/lib/zoneminder/temp")
@ -193,7 +193,7 @@ elseif(ZM_TARGET_DISTRO STREQUAL "FreeBSD")
set(ZM_WEBDIR "/usr/local/share/zoneminder/www") set(ZM_WEBDIR "/usr/local/share/zoneminder/www")
set(ZM_CGIDIR "/usr/local/libexec/zoneminder/cgi-bin") set(ZM_CGIDIR "/usr/local/libexec/zoneminder/cgi-bin")
set(ZM_PERL_MM_PARMS "INSTALLDIRS=site") set(ZM_PERL_MM_PARMS "INSTALLDIRS=site")
endif((ZM_TARGET_DISTRO STREQUAL "f23") OR (ZM_TARGET_DISTRO STREQUAL "f24")) endif((ZM_TARGET_DISTRO STREQUAL "fc24") OR (ZM_TARGET_DISTRO STREQUAL "fc25"))
# Required for certain checks to work # Required for certain checks to work
set(CMAKE_EXTRA_INCLUDE_FILES set(CMAKE_EXTRA_INCLUDE_FILES
@ -708,13 +708,13 @@ if(ZM_ONVIF)
endif(ZM_ONVIF) endif(ZM_ONVIF)
# Process distro subdirectories # Process distro subdirectories
if((ZM_TARGET_DISTRO STREQUAL "f23") OR (ZM_TARGET_DISTRO STREQUAL "f24")) if((ZM_TARGET_DISTRO STREQUAL "fc24") OR (ZM_TARGET_DISTRO STREQUAL "fc25"))
add_subdirectory(distros/fedora) add_subdirectory(distros/fedora)
elseif((ZM_TARGET_DISTRO STREQUAL "el6") OR (ZM_TARGET_DISTRO STREQUAL "el7")) elseif((ZM_TARGET_DISTRO STREQUAL "el6") OR (ZM_TARGET_DISTRO STREQUAL "el7"))
add_subdirectory(distros/redhat) add_subdirectory(distros/redhat)
elseif(ZM_TARGET_DISTRO STREQUAL "OS13") elseif(ZM_TARGET_DISTRO STREQUAL "OS13")
add_subdirectory(distros/opensuse) add_subdirectory(distros/opensuse)
endif((ZM_TARGET_DISTRO STREQUAL "f23") OR (ZM_TARGET_DISTRO STREQUAL "f24")) endif((ZM_TARGET_DISTRO STREQUAL "fc24") OR (ZM_TARGET_DISTRO STREQUAL "fc25"))
# Print optional libraries detection status # Print optional libraries detection status
message(STATUS "Optional libraries found:${optlibsfound}") message(STATUS "Optional libraries found:${optlibsfound}")

View File

@ -1,7 +1,7 @@
Alias /zm /usr/share/zoneminder/www Alias /zm /usr/share/zoneminder/www
<Directory /usr/share/zoneminder/www> <Directory /usr/share/zoneminder/www>
Options Indexes FollowSymLinks Options -Indexes +FollowSymLinks
<IfModule mod_dir.c> <IfModule mod_dir.c>
DirectoryIndex index.php DirectoryIndex index.php
</IfModule> </IfModule>

View File

@ -4,15 +4,16 @@
message([STATUS] "Starting Fedora Build Options" ...) message([STATUS] "Starting Fedora Build Options" ...)
# Process config files # Process config files
configure_file(zoneminder.service.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.service @ONLY)
configure_file(zoneminder.tmpfiles.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.tmpfiles @ONLY) configure_file(zoneminder.tmpfiles.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.tmpfiles @ONLY)
configure_file(zoneminder.logrotate.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.logrotate @ONLY) configure_file(zoneminder.logrotate.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.logrotate @ONLY)
if(ZM_WEB_USER STREQUAL "nginx") if(ZM_WEB_USER STREQUAL "nginx")
configure_file(nginx/zoneminder.conf.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.conf @ONLY) configure_file(nginx/zoneminder.conf.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.conf @ONLY)
configure_file(nginx/zoneminder.service.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.service @ONLY)
configure_file(nginx/zoneminder.php-fpm.conf.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.php-fpm.conf @ONLY) configure_file(nginx/zoneminder.php-fpm.conf.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.php-fpm.conf @ONLY)
configure_file(nginx/README.Fedora ${CMAKE_CURRENT_SOURCE_DIR}/README.Fedora COPYONLY) configure_file(nginx/README.Fedora ${CMAKE_CURRENT_SOURCE_DIR}/README.Fedora COPYONLY)
else(ZM_WEB_USER STREQUAL "nginx") else(ZM_WEB_USER STREQUAL "nginx")
configure_file(zoneminder.conf.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.conf @ONLY) configure_file(zoneminder.conf.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.conf @ONLY)
configure_file(zoneminder.service.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.service @ONLY)
endif(ZM_WEB_USER STREQUAL "nginx") endif(ZM_WEB_USER STREQUAL "nginx")
# Unpack jscalendar & move files into position # Unpack jscalendar & move files into position

View File

@ -0,0 +1,19 @@
# ZoneMinder systemd unit file for Fedora
# Replace mariadb with community-mysql if using mysql service instead of mariadb
[Unit]
Description=ZoneMinder CCTV recording and security system
After=network.target mariadb.service nginx.service php-fpm.service fcgiwrap.service
Requires=mariadb.service nginx.service php-fpm.service fcgiwrap.service
[Service]
User=@WEB_USER@
Type=forking
ExecStart=@BINDIR@/zmpkg.pl start
ExecReload=@BINDIR@/zmpkg.pl restart
ExecStop=@BINDIR@/zmpkg.pl stop
PIDFile="@ZM_RUNDIR@/zm.pid"
Environment=TZ=/etc/localtime
[Install]
WantedBy=multi-user.target

View File

@ -1 +0,0 @@
zoneminder.f24.spec

View File

@ -1,429 +0,0 @@
%define zmuid $(id -un)
%define zmgid $(id -gn)
%define zmuid_final apache
%define zmgid_final apache
%global _hardened_build 1
### Delete the lines below to build with ffmpeg and/or x10
%define _without_ffmpeg 1
%define _without_x10 1
Name: zoneminder
Version: 1.30.0
Release: 1%{?dist}
Summary: A camera monitoring and analysis tool
Group: System Environment/Daemons
# jscalendar is LGPL (any version): http://www.dynarch.com/projects/calendar/
# Mootools is inder the MIT license: http://mootools.net/
License: GPLv2+ and LGPLv2+ and MIT
URL: http://www.zoneminder.com/
#Source: https://github.com/ZoneMinder/ZoneMinder/archive/v%{version}.tar.gz
Source: ZoneMinder-%{version}.tar.gz
BuildRequires: cmake gnutls-devel systemd-units bzip2-devel
BuildRequires: mariadb-devel pcre-devel libjpeg-turbo-devel
BuildRequires: perl(Archive::Tar) perl(Archive::Zip) perl-podlators
BuildRequires: perl(Date::Manip) perl(DBD::mysql)
BuildRequires: perl(ExtUtils::MakeMaker) perl(LWP::UserAgent)
BuildRequires: perl(MIME::Entity) perl(MIME::Lite)
BuildRequires: perl(PHP::Serialization) perl(Sys::Mmap)
BuildRequires: perl(Time::HiRes) perl(Net::SFTP::Foreign)
BuildRequires: perl(Expect) perl(Sys::Syslog)
BuildRequires: gcc gcc-c++ vlc-devel libcurl-devel libv4l-devel
%{!?_without_ffmpeg:BuildRequires: ffmpeg-devel}
%{!?_without_x10:BuildRequires: perl(X10::ActiveHome) perl(Astro::SunTime)}
# cmake needs the following installed at build time due to the way it auto-detects certain parameters
BuildRequires: httpd polkit-devel
%{!?_without_ffmpeg:BuildRequires: ffmpeg}
Requires: httpd php php-gd php-mysql cambozola polkit net-tools psmisc
Requires: libjpeg-turbo vlc-core libcurl
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Requires: perl(DBD::mysql) perl(Archive::Tar) perl(Archive::Zip)
Requires: perl(MIME::Entity) perl(MIME::Lite) perl(Net::SMTP) perl(Net::FTP)
Requires: perl(LWP::Protocol::https)
%{!?_without_ffmpeg:Requires: ffmpeg}
Requires(post): systemd-units systemd-sysv
Requires(post): /usr/bin/gpasswd
Requires(post): /usr/bin/less
Requires(preun): systemd-units
Requires(postun): systemd-units
%description
ZoneMinder is a set of applications which is intended to provide a complete
solution allowing you to capture, analyse, record and monitor any cameras you
have attached to a Linux based machine. It is designed to run on kernels which
support the Video For Linux (V4L) interface and has been tested with cameras
attached to BTTV cards, various USB cameras and IP network cameras. It is
designed to support as many cameras as you can attach to your computer without
too much degradation of performance.
%prep
%setup -q -n ZoneMinder-%{version}
# Change the following default values
./utils/zmeditconfigdata.sh ZM_PATH_ZMS /cgi-bin-zm/nph-zms
./utils/zmeditconfigdata.sh ZM_OPT_CAMBOZOLA yes
./utils/zmeditconfigdata.sh ZM_PATH_SWAP /dev/shm
./utils/zmeditconfigdata.sh ZM_UPLOAD_FTP_LOC_DIR /var/spool/zoneminder-upload
./utils/zmeditconfigdata.sh ZM_OPT_CONTROL yes
./utils/zmeditconfigdata.sh ZM_CHECK_FOR_UPDATES no
./utils/zmeditconfigdata.sh ZM_DYN_SHOW_DONATE_REMINDER no
./utils/zmeditconfigdata.sh ZM_OPT_FAST_DELETE no
%build
%cmake \
-DZM_TARGET_DISTRO="f23" \
%{?_without_ffmpeg:-DZM_NO_FFMPEG=ON} \
%{?_without_x10:-DZM_NO_X10=ON} \
.
make %{?_smp_mflags}
%install
export DESTDIR=%{buildroot}
make install
%post
# Add any new PTZ control configurations to the database (will not overwrite)
%{_bindir}/zmcamtool.pl --import >/dev/null 2>&1 || :
if [ $1 -eq 1 ] ; then
# Initial installation
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
# Allow zoneminder access to local video sources, serial ports, and x10
/usr/bin/gpasswd -a %{zmuid_final} video
/usr/bin/gpasswd -a %{zmuid_final} dialout
# Upgrade from a previous version of zoneminder
if [ $1 -eq 2 ] ; then
# Add any new PTZ control configurations to the database (will not overwrite)
%{_bindir}/zmcamtool.pl --import >/dev/null 2>&1 || :
# Freshen the database
%{_bindir}/zmupdate.pl -f >/dev/null 2>&1 || :
# We can't run this automatically when new sql account permissions need to
# be manually added first
# Run zmupdate non-interactively
#/usr/bin/zmupdate.pl --nointeractive
fi
# Warn the end user to read the README file
echo -e "\nVERY IMPORTANT: Before starting ZoneMinder, read README.Fedora to finish the\ninstallation or upgrade!\n"
echo -e "\nThe README file is located here: %{_docdir}/%{name}\n"
%preun
if [ $1 -eq 0 ] ; then
# Package removal, not upgrade
/bin/systemctl --no-reload disable zoneminder.service > /dev/null 2>&1 || :
/bin/systemctl stop zoneminder.service > /dev/null 2>&1 || :
fi
%postun
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
/bin/systemctl try-restart zoneminder.service >/dev/null 2>&1 || :
fi
%triggerun -- zoneminder < 1.25.0-4
# Save the current service runlevel info
# User must manually run systemd-sysv-convert --apply zoneminder
# to migrate them to systemd targets
/usr/bin/systemd-sysv-convert --save zoneminder >/dev/null 2>&1 ||:
# Run these because the SysV package being removed won't do them
/sbin/chkconfig --del zoneminder >/dev/null 2>&1 || :
/bin/systemctl try-restart zoneminder.service >/dev/null 2>&1 || :
%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING README.md distros/fedora/README.Fedora distros/fedora/README.https distros/fedora/jscalendar-doc
%config %attr(640,root,%{zmgid_final}) /etc/zm/zm.conf
%config(noreplace) %attr(644,root,root) /etc/httpd/conf.d/zoneminder.conf
%config(noreplace) /etc/tmpfiles.d/zoneminder.conf
%config(noreplace) /etc/logrotate.d/zoneminder
%{_unitdir}/zoneminder.service
%{_bindir}/zma
%{_bindir}/zmaudit.pl
%{_bindir}/zmc
%{_bindir}/zmcontrol.pl
%{_bindir}/zmdc.pl
%{_bindir}/zmf
%{_bindir}/zmfilter.pl
%{_bindir}/zmpkg.pl
%{_bindir}/zmtrack.pl
%{_bindir}/zmtrigger.pl
%{_bindir}/zmu
%{_bindir}/zmupdate.pl
%{_bindir}/zmvideo.pl
%{_bindir}/zmwatch.pl
%{_bindir}/zmcamtool.pl
%{_bindir}/zmsystemctl.pl
%{_bindir}/zmtelemetry.pl
%{!?_without_x10:%{_bindir}/zmx10.pl}
%{_bindir}/zmonvif-probe.pl
%{perl_vendorlib}/ZoneMinder*
%{perl_vendorlib}/ONVIF*
%{perl_vendorlib}/WSDiscovery*
%{perl_vendorlib}/WSSecurity*
%{perl_vendorlib}/WSNotification*
%{_mandir}/man*/*
%dir %{_libexecdir}/zoneminder
%{_libexecdir}/zoneminder/cgi-bin
%dir %{_datadir}/zoneminder
%{_datadir}/zoneminder/db
%{_datadir}/zoneminder/www
%{_datadir}/polkit-1/actions/com.zoneminder.systemctl.policy
%{_datadir}/polkit-1/rules.d/com.zoneminder.systemctl.rules
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/events
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/images
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/sock
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/swap
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/temp
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/log/zoneminder
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/spool/zoneminder-upload
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /run/zoneminder
%changelog
* Thu Mar 3 2016 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.30.0
- Bump version fo 1.30.0 release.
* Sat Nov 21 2015 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.29.0
- Bump version for 1.29.0 release on Fedora 23.
* Sat Feb 14 2015 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.28.1
- Bump version for 1.28.1 release on Fedora 21.
* Sun Oct 5 2014 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.28.0
- Bump version for 1.28.0 release.
* Fri Mar 14 2014 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.27
- Tweak build requirements for cmake
* Sat Feb 01 2014 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.27
- Add zmcamtool.pl. Bump version for 1.27 release.
* Mon Dec 16 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.26.5
- This is a bug fixe release
- RTSP fixes, cmake enhancements, couple other misc fixes
* Mon Oct 07 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.26.4
- Initial cmake build.
* Sat Oct 05 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.26.4
- Fedora specific path changes have been moved to zoneminder-1.26.0-defaults.patch
- All files are now part of the zoneminder source tree. Update specfile accordingly.
* Sat Sep 21 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.26.3
- Initial rebuild for ZoneMinder 1.26.3 release.
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.25.0-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Mon Jan 21 2013 Adam Tkac <atkac redhat com> - 1.25.0-12
- rebuild due to "jpeg8-ABI" feature drop
* Mon Jan 7 2013 Remi Collet <rcollet@redhat.com> - 1.25.0-11
- fix configuration file for httpd 2.4, #871502
* Fri Dec 21 2012 Adam Tkac <atkac redhat com> - 1.25.0-10
- rebuild against new libjpeg
* Thu Aug 09 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-9
- Add patch to work around v4l2 api breakage in 3.5 kernel.
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.25.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Sat Jun 23 2012 Petr Pisar <ppisar@redhat.com> - 1.25.0-7
- Perl 5.16 rebuild
* Wed Mar 21 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-6
- Fix stupid thinko in sql modifications.
* Sat Feb 25 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-5
- Clean up macro usage.
* Sat Feb 25 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-4
- Convert to systemd.
- Add tmpfiles.d configuration since the initscript isn't around to create
/run/zoneminder.
- Remove some pointless executable permissions.
- Add logrotate file.
* Wed Feb 22 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-3
- Update README.Fedora to reference systemctl and mention timezone info in
php.ini.
- Add proper default for EYEZM_LOG_TO_FILE.
* Thu Feb 09 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-2
- Rebuild for new pcre.
* Thu Jan 19 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-1
- Update to 1.25.0
- Fix gcc4.7 build problems.
- Drop gcc4.4 build fixes; for whatever reason they now break the build.
- Clean up old patches.
- Force setting of ZM_TMPDIR and ZM_RUNDIR.
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.24.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Thu Sep 15 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.4-3
- Re-add the dist-tag that somehow got lost.
* Thu Sep 15 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.4-2
- Add patch for bug 711780 - fix syntax issue in Mapped.pm.
- Undo that patch, and undo another which was the cause of the whole mess.
- Fix up other patches so ZM_PATH_BUILD is both defined and useful.
- Make sure database creation mods actually take.
- Update Fedora-specific docs with some additional info.
- Use bundled mootools (javascript, so no guideline violation).
- Update download location.
- Update the gcrypt patch to actually work.
- Upstream changed the tarball without changing the version to patch a
vulnerability, so redownload.
* Sun Aug 14 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.4-1
- Initial attempt to upgrade to 1.24.4.
- Add patch from BZ 460310 to build against libgcrypt instead of requiring the
gnutls openssl libs.
* Thu Jul 21 2011 Petr Sabata <contyk@redhat.com> - 1.24.3-7.20110324svn3310
- Perl mass rebuild
* Wed Jul 20 2011 Petr Sabata <contyk@redhat.com> - 1.24.3-6.20110324svn3310
- Perl mass rebuild
* Mon May 09 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.3-5.20110324svn3310
- Bump for gnutls update.
* Thu Mar 24 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.3-4.20110324svn3310
- Update to latest 1.24.3 subversion. Turns out that what upstream was calling
1.24.3 is really just an occasionally updated devel snapshot.
- Rebase various patches.
* Wed Mar 23 2011 Dan Horák <dan@danny.cz> - 1.24.3-3
- rebuilt for mysql 5.5.10 (soname bump in libmysqlclient)
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.24.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Tue Jan 25 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.3-1
- Update to latest upstream version.
- Rebase patches.
- Initial incomplete attempt to disable v4l1 support.
* Fri Jan 21 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.2-6
- Unbundle cambozola; instead link to the separately pacakged copy.
- Remove BuildRoot:, %%clean and buildroot cleaning in %%install.
- Git rid of mixed space/tab usage by removing all tabs.
- Remove unnecessary Conflicts: line.
- Attempt to force short_open_tag on for the code directories.
- Move default location of sockets, swaps, logfiles and some temporary files to
make more sense and allow things to work better with a future selinux policy.
- Fix errors in README.Fedora.
* Wed Jun 02 2010 Marcela Maslanova <mmaslano@redhat.com> - 1.24.2-5
- Mass rebuild with perl-5.12.0
* Fri Dec 4 2009 Stepan Kasal <skasal@redhat.com> - 1.24.2-4
- rebuild against perl 5.10.1
- use Perl vendorarch and archlib variables correctly
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.24.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Wed Jul 22 2009 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.2-2
- Bump release since 1.24.2-1 was mistakenly tagged a few months ago.
* Wed Jul 22 2009 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.2-1
- Initial update to 1.24.2.
- Rebase patches.
- Update mootools download location.
- Update to mootools 1.2.3.
- Add additional dependencies for some optional features.
* Sat Apr 11 2009 Martin Ebourne <martin@zepler.org> - 1.24.1-3
- Remove unused Sys::Mmap perl dependency RPM is finding
* Sat Apr 11 2009 Martin Ebourne <martin@zepler.org> - 1.24.1-2
- Update gcc44 patch to disable -frepo, seems to be broken with gcc44
- Added noffmpeg patch to make building outside mock easier
* Sat Mar 21 2009 Martin Ebourne <martin@zepler.org> - 1.24.1-1
- Patch for gcc 4.4 compilation errors
- Upgrade to 1.24.1
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.23.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Sat Jan 24 2009 Caolán McNamara <caolanm@redhat.com> - 1.23.3-3
- rebuild for dependencies
* Mon Dec 15 2008 Martin Ebourne <martin@zepler.org> - 1.23.3-2
- Fix permissions on zm.conf
* Fri Jul 11 2008 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.23.3-1
- Initial attempt at packaging 1.23.
* Tue Jul 1 2008 Martin Ebourne <martin@zepler.org> - 1.22.3-15
- Add perl module compat dependency, bz #453590
* Tue May 6 2008 Martin Ebourne <martin@zepler.org> - 1.22.3-14
- Remove default runlevel, bz #441315
* Mon Apr 28 2008 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.22.3-13
- Backport patch for CVE-2008-1381 from 1.23.3 to 1.22.3.
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.22.3-12
- Autorebuild for GCC 4.3
* Thu Jan 3 2008 Martin Ebourne <martin@zepler.org> - 1.22.3-11
- Fix compilation on gcc 4.3
* Thu Dec 6 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-10
- Rebuild for new openssl
* Thu Aug 2 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-8
- Fix licence tag
* Thu Jul 12 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-7
- Fixes from testing by Jitz including missing dependencies and database creation
* Sat Jun 30 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-6
- Disable crashtrace on ppc
* Sat Jun 30 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-5
- Fix uid for directories in /var/lib/zoneminder
* Tue Jun 26 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-4
- Added perl Archive::Tar dependency
- Disabled web interface due to lack of access control on the event images
* Sun Jun 10 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-3
- Changes recommended in review by Jason Tibbitts
* Mon Apr 2 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-2
- Standardised on package name of zoneminder
* Thu Dec 28 2006 Martin Ebourne <martin@zepler.org> - 1.22.3-1
- First version. Uses some parts from zm-1.20.1 by Corey DeLasaux and Serg Oskin

View File

@ -0,0 +1 @@
zoneminder.f25.spec

View File

@ -0,0 +1,436 @@
%define zmuid $(id -un)
%define zmgid $(id -gn)
%define zmuid_final apache
%define zmgid_final apache
%global _hardened_build 1
### Delete the lines below to build with ffmpeg and/or x10
%define _without_ffmpeg 1
%define _without_x10 1
Name: zoneminder
Version: 1.30.0
Release: 1%{?dist}
Summary: A camera monitoring and analysis tool
Group: System Environment/Daemons
# jscalendar is LGPL (any version): http://www.dynarch.com/projects/calendar/
# Mootools is inder the MIT license: http://mootools.net/
License: GPLv2+ and LGPLv2+ and MIT
URL: http://www.zoneminder.com/
#Source: https://github.com/ZoneMinder/ZoneMinder/archive/v%{version}.tar.gz
Source: ZoneMinder-%{version}.tar.gz
BuildRequires: cmake gnutls-devel systemd-units bzip2-devel
BuildRequires: mariadb-devel pcre-devel libjpeg-turbo-devel
BuildRequires: perl(Archive::Tar) perl(Archive::Zip) perl-podlators
BuildRequires: perl(Date::Manip) perl(DBD::mysql)
BuildRequires: perl(ExtUtils::MakeMaker) perl(LWP::UserAgent)
BuildRequires: perl(MIME::Entity) perl(MIME::Lite)
BuildRequires: perl(PHP::Serialization) perl(Sys::Mmap)
BuildRequires: perl(Time::HiRes) perl(Net::SFTP::Foreign)
BuildRequires: perl(Expect) perl(Sys::Syslog)
BuildRequires: gcc gcc-c++ vlc-devel libcurl-devel libv4l-devel
%{!?_without_ffmpeg:BuildRequires: ffmpeg-devel}
%{!?_without_x10:BuildRequires: perl(X10::ActiveHome) perl(Astro::SunTime)}
# cmake needs the following installed at build time due to the way it auto-detects certain parameters
BuildRequires: httpd polkit-devel
%{!?_without_ffmpeg:BuildRequires: ffmpeg}
# php-mysql was deprecated beginning with f25
%if 0%{?fedora} >= 25
Requires: php-mysqlnd
%else
Requires: php-mysql
%endif
Requires: httpd php php-gd cambozola polkit net-tools psmisc
Requires: libjpeg-turbo vlc-core libcurl
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Requires: perl(DBD::mysql) perl(Archive::Tar) perl(Archive::Zip)
Requires: perl(MIME::Entity) perl(MIME::Lite) perl(Net::SMTP) perl(Net::FTP)
Requires: perl(LWP::Protocol::https)
%{!?_without_ffmpeg:Requires: ffmpeg}
Requires(post): systemd-units systemd-sysv
Requires(post): /usr/bin/gpasswd
Requires(post): /usr/bin/less
Requires(preun): systemd-units
Requires(postun): systemd-units
%description
ZoneMinder is a set of applications which is intended to provide a complete
solution allowing you to capture, analyse, record and monitor any cameras you
have attached to a Linux based machine. It is designed to run on kernels which
support the Video For Linux (V4L) interface and has been tested with cameras
attached to BTTV cards, various USB cameras and IP network cameras. It is
designed to support as many cameras as you can attach to your computer without
too much degradation of performance.
%prep
%setup -q -n ZoneMinder-%{version}
# Change the following default values
./utils/zmeditconfigdata.sh ZM_PATH_ZMS /cgi-bin-zm/nph-zms
./utils/zmeditconfigdata.sh ZM_OPT_CAMBOZOLA yes
./utils/zmeditconfigdata.sh ZM_PATH_SWAP /dev/shm
./utils/zmeditconfigdata.sh ZM_UPLOAD_FTP_LOC_DIR /var/spool/zoneminder-upload
./utils/zmeditconfigdata.sh ZM_OPT_CONTROL yes
./utils/zmeditconfigdata.sh ZM_CHECK_FOR_UPDATES no
./utils/zmeditconfigdata.sh ZM_DYN_SHOW_DONATE_REMINDER no
./utils/zmeditconfigdata.sh ZM_OPT_FAST_DELETE no
%build
%cmake \
-DZM_TARGET_DISTRO="%{dist}" \
%{?_without_ffmpeg:-DZM_NO_FFMPEG=ON} \
%{?_without_x10:-DZM_NO_X10=ON} \
.
make %{?_smp_mflags}
%install
export DESTDIR=%{buildroot}
make install
%post
# Add any new PTZ control configurations to the database (will not overwrite)
%{_bindir}/zmcamtool.pl --import >/dev/null 2>&1 || :
if [ $1 -eq 1 ] ; then
# Initial installation
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
# Allow zoneminder access to local video sources, serial ports, and x10
/usr/bin/gpasswd -a %{zmuid_final} video
/usr/bin/gpasswd -a %{zmuid_final} dialout
# Upgrade from a previous version of zoneminder
if [ $1 -eq 2 ] ; then
# Add any new PTZ control configurations to the database (will not overwrite)
%{_bindir}/zmcamtool.pl --import >/dev/null 2>&1 || :
# Freshen the database
%{_bindir}/zmupdate.pl -f >/dev/null 2>&1 || :
# We can't run this automatically when new sql account permissions need to
# be manually added first
# Run zmupdate non-interactively
#/usr/bin/zmupdate.pl --nointeractive
fi
# Warn the end user to read the README file
echo -e "\nVERY IMPORTANT: Before starting ZoneMinder, read README.Fedora to finish the\ninstallation or upgrade!\n"
echo -e "\nThe README file is located here: %{_docdir}/%{name}\n"
%preun
if [ $1 -eq 0 ] ; then
# Package removal, not upgrade
/bin/systemctl --no-reload disable zoneminder.service > /dev/null 2>&1 || :
/bin/systemctl stop zoneminder.service > /dev/null 2>&1 || :
fi
%postun
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
/bin/systemctl try-restart zoneminder.service >/dev/null 2>&1 || :
fi
%triggerun -- zoneminder < 1.25.0-4
# Save the current service runlevel info
# User must manually run systemd-sysv-convert --apply zoneminder
# to migrate them to systemd targets
/usr/bin/systemd-sysv-convert --save zoneminder >/dev/null 2>&1 ||:
# Run these because the SysV package being removed won't do them
/sbin/chkconfig --del zoneminder >/dev/null 2>&1 || :
/bin/systemctl try-restart zoneminder.service >/dev/null 2>&1 || :
%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING README.md distros/fedora/README.Fedora distros/fedora/README.https distros/fedora/jscalendar-doc
%config %attr(640,root,%{zmgid_final}) /etc/zm/zm.conf
%config(noreplace) %attr(644,root,root) /etc/httpd/conf.d/zoneminder.conf
%config(noreplace) /etc/tmpfiles.d/zoneminder.conf
%config(noreplace) /etc/logrotate.d/zoneminder
%{_unitdir}/zoneminder.service
%{_bindir}/zma
%{_bindir}/zmaudit.pl
%{_bindir}/zmc
%{_bindir}/zmcontrol.pl
%{_bindir}/zmdc.pl
%{_bindir}/zmf
%{_bindir}/zmfilter.pl
%{_bindir}/zmpkg.pl
%{_bindir}/zmtrack.pl
%{_bindir}/zmtrigger.pl
%{_bindir}/zmu
%{_bindir}/zmupdate.pl
%{_bindir}/zmvideo.pl
%{_bindir}/zmwatch.pl
%{_bindir}/zmcamtool.pl
%{_bindir}/zmsystemctl.pl
%{_bindir}/zmtelemetry.pl
%{!?_without_x10:%{_bindir}/zmx10.pl}
%{_bindir}/zmonvif-probe.pl
%{perl_vendorlib}/ZoneMinder*
%{perl_vendorlib}/ONVIF*
%{perl_vendorlib}/WSDiscovery*
%{perl_vendorlib}/WSSecurity*
%{perl_vendorlib}/WSNotification*
%{_mandir}/man*/*
%dir %{_libexecdir}/zoneminder
%{_libexecdir}/zoneminder/cgi-bin
%dir %{_datadir}/zoneminder
%{_datadir}/zoneminder/db
%{_datadir}/zoneminder/www
%{_datadir}/polkit-1/actions/com.zoneminder.systemctl.policy
%{_datadir}/polkit-1/rules.d/com.zoneminder.systemctl.rules
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/events
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/images
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/sock
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/swap
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/temp
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/log/zoneminder
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/spool/zoneminder-upload
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /run/zoneminder
%changelog
* Thu Mar 3 2016 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.30.0
- Bump version fo 1.30.0 release.
* Sat Nov 21 2015 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.29.0
- Bump version for 1.29.0 release on Fedora 23.
* Sat Feb 14 2015 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.28.1
- Bump version for 1.28.1 release on Fedora 21.
* Sun Oct 5 2014 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.28.0
- Bump version for 1.28.0 release.
* Fri Mar 14 2014 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.27
- Tweak build requirements for cmake
* Sat Feb 01 2014 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.27
- Add zmcamtool.pl. Bump version for 1.27 release.
* Mon Dec 16 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.26.5
- This is a bug fixe release
- RTSP fixes, cmake enhancements, couple other misc fixes
* Mon Oct 07 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.26.4
- Initial cmake build.
* Sat Oct 05 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.26.4
- Fedora specific path changes have been moved to zoneminder-1.26.0-defaults.patch
- All files are now part of the zoneminder source tree. Update specfile accordingly.
* Sat Sep 21 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.26.3
- Initial rebuild for ZoneMinder 1.26.3 release.
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.25.0-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Mon Jan 21 2013 Adam Tkac <atkac redhat com> - 1.25.0-12
- rebuild due to "jpeg8-ABI" feature drop
* Mon Jan 7 2013 Remi Collet <rcollet@redhat.com> - 1.25.0-11
- fix configuration file for httpd 2.4, #871502
* Fri Dec 21 2012 Adam Tkac <atkac redhat com> - 1.25.0-10
- rebuild against new libjpeg
* Thu Aug 09 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-9
- Add patch to work around v4l2 api breakage in 3.5 kernel.
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.25.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Sat Jun 23 2012 Petr Pisar <ppisar@redhat.com> - 1.25.0-7
- Perl 5.16 rebuild
* Wed Mar 21 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-6
- Fix stupid thinko in sql modifications.
* Sat Feb 25 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-5
- Clean up macro usage.
* Sat Feb 25 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-4
- Convert to systemd.
- Add tmpfiles.d configuration since the initscript isn't around to create
/run/zoneminder.
- Remove some pointless executable permissions.
- Add logrotate file.
* Wed Feb 22 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-3
- Update README.Fedora to reference systemctl and mention timezone info in
php.ini.
- Add proper default for EYEZM_LOG_TO_FILE.
* Thu Feb 09 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-2
- Rebuild for new pcre.
* Thu Jan 19 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-1
- Update to 1.25.0
- Fix gcc4.7 build problems.
- Drop gcc4.4 build fixes; for whatever reason they now break the build.
- Clean up old patches.
- Force setting of ZM_TMPDIR and ZM_RUNDIR.
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.24.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Thu Sep 15 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.4-3
- Re-add the dist-tag that somehow got lost.
* Thu Sep 15 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.4-2
- Add patch for bug 711780 - fix syntax issue in Mapped.pm.
- Undo that patch, and undo another which was the cause of the whole mess.
- Fix up other patches so ZM_PATH_BUILD is both defined and useful.
- Make sure database creation mods actually take.
- Update Fedora-specific docs with some additional info.
- Use bundled mootools (javascript, so no guideline violation).
- Update download location.
- Update the gcrypt patch to actually work.
- Upstream changed the tarball without changing the version to patch a
vulnerability, so redownload.
* Sun Aug 14 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.4-1
- Initial attempt to upgrade to 1.24.4.
- Add patch from BZ 460310 to build against libgcrypt instead of requiring the
gnutls openssl libs.
* Thu Jul 21 2011 Petr Sabata <contyk@redhat.com> - 1.24.3-7.20110324svn3310
- Perl mass rebuild
* Wed Jul 20 2011 Petr Sabata <contyk@redhat.com> - 1.24.3-6.20110324svn3310
- Perl mass rebuild
* Mon May 09 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.3-5.20110324svn3310
- Bump for gnutls update.
* Thu Mar 24 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.3-4.20110324svn3310
- Update to latest 1.24.3 subversion. Turns out that what upstream was calling
1.24.3 is really just an occasionally updated devel snapshot.
- Rebase various patches.
* Wed Mar 23 2011 Dan Horák <dan@danny.cz> - 1.24.3-3
- rebuilt for mysql 5.5.10 (soname bump in libmysqlclient)
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.24.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Tue Jan 25 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.3-1
- Update to latest upstream version.
- Rebase patches.
- Initial incomplete attempt to disable v4l1 support.
* Fri Jan 21 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.2-6
- Unbundle cambozola; instead link to the separately pacakged copy.
- Remove BuildRoot:, %%clean and buildroot cleaning in %%install.
- Git rid of mixed space/tab usage by removing all tabs.
- Remove unnecessary Conflicts: line.
- Attempt to force short_open_tag on for the code directories.
- Move default location of sockets, swaps, logfiles and some temporary files to
make more sense and allow things to work better with a future selinux policy.
- Fix errors in README.Fedora.
* Wed Jun 02 2010 Marcela Maslanova <mmaslano@redhat.com> - 1.24.2-5
- Mass rebuild with perl-5.12.0
* Fri Dec 4 2009 Stepan Kasal <skasal@redhat.com> - 1.24.2-4
- rebuild against perl 5.10.1
- use Perl vendorarch and archlib variables correctly
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.24.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Wed Jul 22 2009 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.2-2
- Bump release since 1.24.2-1 was mistakenly tagged a few months ago.
* Wed Jul 22 2009 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.2-1
- Initial update to 1.24.2.
- Rebase patches.
- Update mootools download location.
- Update to mootools 1.2.3.
- Add additional dependencies for some optional features.
* Sat Apr 11 2009 Martin Ebourne <martin@zepler.org> - 1.24.1-3
- Remove unused Sys::Mmap perl dependency RPM is finding
* Sat Apr 11 2009 Martin Ebourne <martin@zepler.org> - 1.24.1-2
- Update gcc44 patch to disable -frepo, seems to be broken with gcc44
- Added noffmpeg patch to make building outside mock easier
* Sat Mar 21 2009 Martin Ebourne <martin@zepler.org> - 1.24.1-1
- Patch for gcc 4.4 compilation errors
- Upgrade to 1.24.1
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.23.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Sat Jan 24 2009 Caolán McNamara <caolanm@redhat.com> - 1.23.3-3
- rebuild for dependencies
* Mon Dec 15 2008 Martin Ebourne <martin@zepler.org> - 1.23.3-2
- Fix permissions on zm.conf
* Fri Jul 11 2008 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.23.3-1
- Initial attempt at packaging 1.23.
* Tue Jul 1 2008 Martin Ebourne <martin@zepler.org> - 1.22.3-15
- Add perl module compat dependency, bz #453590
* Tue May 6 2008 Martin Ebourne <martin@zepler.org> - 1.22.3-14
- Remove default runlevel, bz #441315
* Mon Apr 28 2008 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.22.3-13
- Backport patch for CVE-2008-1381 from 1.23.3 to 1.22.3.
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.22.3-12
- Autorebuild for GCC 4.3
* Thu Jan 3 2008 Martin Ebourne <martin@zepler.org> - 1.22.3-11
- Fix compilation on gcc 4.3
* Thu Dec 6 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-10
- Rebuild for new openssl
* Thu Aug 2 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-8
- Fix licence tag
* Thu Jul 12 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-7
- Fixes from testing by Jitz including missing dependencies and database creation
* Sat Jun 30 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-6
- Disable crashtrace on ppc
* Sat Jun 30 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-5
- Fix uid for directories in /var/lib/zoneminder
* Tue Jun 26 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-4
- Added perl Archive::Tar dependency
- Disabled web interface due to lack of access control on the event images
* Sun Jun 10 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-3
- Changes recommended in review by Jason Tibbitts
* Mon Apr 2 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-2
- Standardised on package name of zoneminder
* Thu Dec 28 2006 Martin Ebourne <martin@zepler.org> - 1.22.3-1
- First version. Uses some parts from zm-1.20.1 by Corey DeLasaux and Serg Oskin

View File

@ -13,6 +13,7 @@ ExecStart=@BINDIR@/zmpkg.pl start
ExecReload=@BINDIR@/zmpkg.pl restart ExecReload=@BINDIR@/zmpkg.pl restart
ExecStop=@BINDIR@/zmpkg.pl stop ExecStop=@BINDIR@/zmpkg.pl stop
PIDFile="@ZM_RUNDIR@/zm.pid" PIDFile="@ZM_RUNDIR@/zm.pid"
Environment=TZ=/etc/localtime
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View File

@ -12,6 +12,7 @@ ExecStart=@BINDIR@/zmpkg.pl start
ExecReload=@BINDIR@/zmpkg.pl restart ExecReload=@BINDIR@/zmpkg.pl restart
ExecStop=@BINDIR@/zmpkg.pl stop ExecStop=@BINDIR@/zmpkg.pl stop
PIDFile="@ZM_RUNDIR@/zm.pid" PIDFile="@ZM_RUNDIR@/zm.pid"
Environment=TZ=/etc/localtime
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View File

@ -9,7 +9,7 @@ ScriptAlias /zm/cgi-bin "/usr/lib/zoneminder/cgi-bin"
Alias /zm /usr/share/zoneminder/www Alias /zm /usr/share/zoneminder/www
<Directory /usr/share/zoneminder/www> <Directory /usr/share/zoneminder/www>
php_flag register_globals off php_flag register_globals off
Options Indexes FollowSymLinks Options -Indexes +FollowSymLinks
<IfModule mod_dir.c> <IfModule mod_dir.c>
DirectoryIndex index.php DirectoryIndex index.php
</IfModule> </IfModule>

View File

@ -1,8 +1,19 @@
Alias /zm /usr/share/zoneminder/www # Remember to enable cgi mod (i.e. "a2enmod cgi").
ScriptAlias /zm/cgi-bin "/usr/lib/zoneminder/cgi-bin"
<Directory "/usr/lib/zoneminder/cgi-bin">
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
AllowOverride All
Require all granted
</Directory>
Alias /zm /usr/share/zoneminder/www
<Directory /usr/share/zoneminder/www> <Directory /usr/share/zoneminder/www>
Options Indexes FollowSymLinks Options -Indexes +ollowSymLinks
<IfModule mod_dir.c> <IfModule mod_dir.c>
DirectoryIndex index.php DirectoryIndex index.php
</IfModule> </IfModule>
</Directory> </Directory>
<Directory /usr/share/zoneminder/www/api>
AllowOverride All
</Directory>

View File

@ -8,7 +8,7 @@ ScriptAlias /zm/cgi-bin "/usr/lib/zoneminder/cgi-bin"
Alias /zm /usr/share/zoneminder/www Alias /zm /usr/share/zoneminder/www
<Directory /usr/share/zoneminder/www> <Directory /usr/share/zoneminder/www>
Options Indexes FollowSymLinks Options -Indexes +FollowSymLinks
<IfModule mod_dir.c> <IfModule mod_dir.c>
DirectoryIndex index.php DirectoryIndex index.php
</IfModule> </IfModule>

View File

@ -10,7 +10,7 @@
DocumentRoot "@WEB_PREFIX@" DocumentRoot "@WEB_PREFIX@"
<Directory "@WEB_PREFIX@"> <Directory "@WEB_PREFIX@">
Options FollowSymLinks Options -Indexes +FollowSymLinks
AllowOverride All AllowOverride All
</Directory> </Directory>

View File

@ -32,7 +32,7 @@ require Exporter;
our @ISA = qw(Exporter); our @ISA = qw(Exporter);
use constant ZM_VERSION => "@VERSION@"; use constant ZM_VERSION => '@VERSION@';
# Items to export into callers namespace by default. Note: do not export # Items to export into callers namespace by default. Note: do not export
# names by default without a very good reason. Use EXPORT_OK instead. # names by default without a very good reason. Use EXPORT_OK instead.
@ -47,7 +47,7 @@ our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
our @EXPORT = qw(); our @EXPORT = qw();
our $VERSION = "@VERSION@"; our $VERSION = '@VERSION@';
1; 1;
__END__ __END__

View File

@ -69,13 +69,11 @@ use constant ZM_CONFIG => "@ZM_CONFIG@"; # Path to the ZoneMinder config file
use Carp; use Carp;
# Load the config from the database into the symbol table # Load the config from the database into the symbol table
BEGIN BEGIN {
{
my $config_file = ZM_CONFIG; my $config_file = ZM_CONFIG;
open( my $CONFIG, "<", $config_file ) open( my $CONFIG, "<", $config_file )
or croak( "Can't open config file '$config_file': $!" ); or croak( "Can't open config file '$config_file': $!" );
foreach my $str ( <$CONFIG> ) foreach my $str ( <$CONFIG> ) {
{
next if ( $str =~ /^\s*$/ ); next if ( $str =~ /^\s*$/ );
next if ( $str =~ /^\s*#/ ); next if ( $str =~ /^\s*#/ );
my ( $name, $value ) = $str =~ /^\s*([^=\s]+)\s*=\s*(.*?)\s*$/; my ( $name, $value ) = $str =~ /^\s*([^=\s]+)\s*=\s*(.*?)\s*$/;
@ -92,19 +90,13 @@ BEGIN
my $socket; my $socket;
my ( $host, $portOrSocket ) = ( $Config{ZM_DB_HOST} =~ /^([^:]+)(?::(.+))?$/ ); my ( $host, $portOrSocket ) = ( $Config{ZM_DB_HOST} =~ /^([^:]+)(?::(.+))?$/ );
if ( defined($portOrSocket) ) if ( defined($portOrSocket) ) {
{ if ( $portOrSocket =~ /^\// ) {
if ( $portOrSocket =~ /^\// )
{
$socket = ";mysql_socket=".$portOrSocket; $socket = ";mysql_socket=".$portOrSocket;
} } else {
else
{
$socket = ";host=".$host.";port=".$portOrSocket; $socket = ";host=".$host.";port=".$portOrSocket;
} }
} } else {
else
{
$socket = ";host=".$Config{ZM_DB_HOST}; $socket = ";host=".$Config{ZM_DB_HOST};
} }
my $dbh = DBI->connect( "DBI:mysql:database=".$Config{ZM_DB_NAME} my $dbh = DBI->connect( "DBI:mysql:database=".$Config{ZM_DB_NAME}
@ -134,7 +126,7 @@ BEGIN
} }
$sth->finish(); $sth->finish();
} }
} } # end BEGIN
sub loadConfigFromDB { sub loadConfigFromDB {
print( "Loading config from DB\n" ); print( "Loading config from DB\n" );
@ -169,13 +161,12 @@ sub loadConfigFromDB {
} }
$sth->finish(); $sth->finish();
return( $option_count ); return( $option_count );
} } # end sub loadConfigFromDB
sub saveConfigToDB { sub saveConfigToDB {
print( "Saving config to DB\n" ); print( "Saving config to DB\n" );
my $dbh = ZoneMinder::Database::zmDbConnect(); my $dbh = ZoneMinder::Database::zmDbConnect();
if ( !$dbh ) if ( !$dbh ) {
{
print( "Error: unable to save options to database: $DBI::errstr\n" ); print( "Error: unable to save options to database: $DBI::errstr\n" );
return( 0 ); return( 0 );
} }
@ -193,41 +184,27 @@ sub saveConfigToDB {
$sql = "replace into Config set Id = ?, Name = ?, Value = ?, Type = ?, DefaultValue = ?, Hint = ?, Pattern = ?, Format = ?, Prompt = ?, Help = ?, Category = ?, Readonly = ?, Requires = ?"; $sql = "replace into Config set Id = ?, Name = ?, Value = ?, Type = ?, DefaultValue = ?, Hint = ?, Pattern = ?, Format = ?, Prompt = ?, Help = ?, Category = ?, Readonly = ?, Requires = ?";
my $sth = $dbh->prepare_cached( $sql ) my $sth = $dbh->prepare_cached( $sql )
or croak( "Can't prepare '$sql': ".$dbh->errstr() ); or croak( "Can't prepare '$sql': ".$dbh->errstr() );
foreach my $option ( @options ) foreach my $option ( @options ) {
{
#next if ( $option->{category} eq 'hidden' ); #next if ( $option->{category} eq 'hidden' );
#print( $option->{name}."\n" ) if ( !$option->{category} ); #print( $option->{name}."\n" ) if ( !$option->{category} );
$option->{db_type} = $option->{type}->{db_type}; $option->{db_type} = $option->{type}->{db_type};
$option->{db_hint} = $option->{type}->{hint}; $option->{db_hint} = $option->{type}->{hint};
$option->{db_pattern} = $option->{type}->{pattern}; $option->{db_pattern} = $option->{type}->{pattern};
$option->{db_format} = $option->{type}->{format}; $option->{db_format} = $option->{type}->{format};
if ( $option->{db_type} eq "boolean" ) if ( $option->{db_type} eq "boolean" ) {
{ $option->{db_value} = ($option->{value} eq "yes") ? "1" : "0";
$option->{db_value} = ($option->{value} eq "yes") } else {
? "1"
: "0"
;
}
else
{
$option->{db_value} = $option->{value}; $option->{db_value} = $option->{value};
} }
if ( my $requires = $option->{requires} ) if ( my $requires = $option->{requires} ) {
{
$option->{db_requires} = join( ";", $option->{db_requires} = join( ";",
map { map {
my $value = $_->{value}; my $value = $_->{value};
$value = ($value eq "yes") $value = ($value eq "yes") ? 1 : 0 if ( $options_hash{$_->{name}}->{db_type} eq "boolean" );
? 1 ( "$_->{name}=$value" )
: 0
if ( $options_hash{$_->{name}}->{db_type} eq "boolean" )
; ( "$_->{name}=$value" )
} @$requires } @$requires
); );
} }
else
{
}
my $res = $sth->execute( my $res = $sth->execute(
$option->{id}, $option->{id},
$option->{name}, $option->{name},
@ -243,12 +220,12 @@ sub saveConfigToDB {
$option->{readonly} ? 1 : 0, $option->{readonly} ? 1 : 0,
$option->{db_requires} $option->{db_requires}
) or croak( "Can't execute: ".$sth->errstr() ); ) or croak( "Can't execute: ".$sth->errstr() );
} } # end foreach option
$sth->finish(); $sth->finish();
$dbh->do('UNLOCK TABLES'); $dbh->do('UNLOCK TABLES');
$dbh->{AutoCommit} = $ac; $dbh->{AutoCommit} = $ac;
} } # end sub saveConfigToDB
1; 1;
__END__ __END__

View File

@ -65,14 +65,12 @@ use Carp;
our $configInitialised = 0; our $configInitialised = 0;
sub INIT sub INIT {
{
initialiseConfig(); initialiseConfig();
} }
# Types # Types
our %types = our %types = (
(
string => { string => {
db_type => "string", db_type => "string",
hint => "string", hint => "string",
@ -96,10 +94,7 @@ our %types =
hint => "yes|no", hint => "yes|no",
pattern => qr|^([yn])|i, pattern => qr|^([yn])|i,
check => q( $1 ), check => q( $1 ),
format => q( ($1 =~ /^y/) format => q( ($1 =~ /^y/) ? "yes" : "no" )
? "yes"
: "no"
)
}, },
integer => { integer => {
db_type => "integer", db_type => "integer",
@ -123,10 +118,7 @@ our %types =
db_type => "string", db_type => "string",
hint => "auto|yes|no", hint => "auto|yes|no",
pattern => qr|^([ayn])|i, check=>q( $1 ), pattern => qr|^([ayn])|i, check=>q( $1 ),
format => q( ($1 =~ /^y/) format => q( ($1 =~ /^y/) ? "yes" : ($1 =~ /^n/ ? "no" : "auto" ) )
? "yes"
: ($1 =~ /^n/ ? "no" : "auto" )
)
}, },
abs_path => { abs_path => {
db_type => "string", db_type => "string",
@ -178,8 +170,7 @@ sub qqq { ## Un-pad paragraph of text.
return $_; return $_;
} }
our @options = our @options = (
(
{ {
name => "ZM_SKIN_DEFAULT", name => "ZM_SKIN_DEFAULT",
default => "classic", default => "classic",
@ -283,10 +274,7 @@ our @options =
db_type => "string", db_type => "string",
hint => "hashed|plain|none", hint => "hashed|plain|none",
pattern => qr|^([hpn])|i, pattern => qr|^([hpn])|i,
format => q( ($1 =~ /^h/) format => q( ($1 =~ /^h/) ? "hashed" : ($1 =~ /^p/ ? "plain" : "none" ) )
? "hashed"
: ($1 =~ /^p/ ? "plain" : "none" )
)
}, },
category => "system", category => "system",
}, },
@ -3902,21 +3890,16 @@ 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. # this module is 'require'd rather than 'use'd. See zmconfgen.pl.
sub initialiseConfig sub initialiseConfig {
{
return if ( $configInitialised ); return if ( $configInitialised );
# Do some initial data munging to finish the data structures # Do some initial data munging to finish the data structures
# Create option ids # Create option ids
my $option_id = 0; my $option_id = 0;
foreach my $option ( @options ) foreach my $option ( @options ) {
{ if ( defined($option->{default}) ) {
if ( defined($option->{default}) )
{
$option->{value} = $option->{default} $option->{value} = $option->{default}
} } else {
else
{
$option->{value} = ''; $option->{value} = '';
} }
#next if ( $option->{category} eq 'hidden' ); #next if ( $option->{category} eq 'hidden' );

View File

@ -43,14 +43,12 @@ use ZoneMinder::Database qw(:all);
our $AUTOLOAD; our $AUTOLOAD;
sub new sub new {
{
my $class = shift; my $class = shift;
my $id = shift; my $id = shift;
my $self = {}; my $self = {};
$self->{name} = "PelcoD"; $self->{name} = "PelcoD";
if ( !defined($id) ) if ( !defined($id) ) {
{
Fatal( "No monitor defined when invoking protocol ".$self->{name} ); Fatal( "No monitor defined when invoking protocol ".$self->{name} );
} }
$self->{id} = $id; $self->{id} = $id;
@ -58,12 +56,10 @@ sub new
return $self; return $self;
} }
sub DESTROY sub DESTROY {
{
} }
sub AUTOLOAD sub AUTOLOAD {
{
my $self = shift; my $self = shift;
my $class = ref($self) || croak( "$self not object" ); my $class = ref($self) || croak( "$self not object" );
my $name = $AUTOLOAD; my $name = $AUTOLOAD;
@ -75,61 +71,49 @@ sub AUTOLOAD
croak( "Can't access $name member of object of class $class" ); croak( "Can't access $name member of object of class $class" );
} }
sub getKey sub getKey {
{
my $self = shift; my $self = shift;
return( $self->{id} ); return( $self->{id} );
} }
sub open sub open {
{
my $self = shift; my $self = shift;
Fatal( "No open method defined for protocol ".$self->{name} ); Fatal( "No open method defined for protocol ".$self->{name} );
} }
sub close sub close {
{
my $self = shift; my $self = shift;
Fatal( "No close method defined for protocol ".$self->{name} ); Fatal( "No close method defined for protocol ".$self->{name} );
} }
sub loadMonitor sub loadMonitor {
{
my $self = shift; my $self = shift;
if ( !$self->{Monitor} ) if ( !$self->{Monitor} ) {
{ if ( !($self->{Monitor} = zmDbGetMonitor( $self->{id} )) ) {
if ( !($self->{Monitor} = zmDbGetMonitor( $self->{id} )) )
{
Fatal( "Monitor id ".$self->{id}." not found or not controllable" ); Fatal( "Monitor id ".$self->{id}." not found or not controllable" );
} }
if ( defined($self->{Monitor}->{AutoStopTimeout}) ) if ( defined($self->{Monitor}->{AutoStopTimeout}) ) {
{
# Convert to microseconds. # Convert to microseconds.
$self->{Monitor}->{AutoStopTimeout} = int(1000000*$self->{Monitor}->{AutoStopTimeout}); $self->{Monitor}->{AutoStopTimeout} = int(1000000*$self->{Monitor}->{AutoStopTimeout});
} }
} }
} }
sub getParam sub getParam {
{
my $self = shift; my $self = shift;
my $params = shift; my $params = shift;
my $name = shift; my $name = shift;
my $default = shift; my $default = shift;
if ( defined($params->{$name}) ) if ( defined($params->{$name}) ) {
{
return( $params->{$name} ); return( $params->{$name} );
} } elsif ( defined($default) ) {
elsif ( defined($default) )
{
return( $default ); return( $default );
} }
Fatal( "Missing mandatory parameter '$name'" ); Fatal( "Missing mandatory parameter '$name'" );
} }
sub executeCommand sub executeCommand {
{
my $self = shift; my $self = shift;
my $params = shift; my $params = shift;
@ -145,8 +129,7 @@ sub executeCommand
&{$self->{$command}}( $self, $params ); &{$self->{$command}}( $self, $params );
} }
sub printMsg sub printMsg {
{
my $self = shift; my $self = shift;
Fatal( "No printMsg method defined for protocol ".$self->{name} ); Fatal( "No printMsg method defined for protocol ".$self->{name} );
} }

View File

@ -70,31 +70,22 @@ use Carp;
our $dbh = undef; our $dbh = undef;
sub zmDbConnect sub zmDbConnect {
{
my $force = shift; my $force = shift;
if ( $force ) if ( $force ) {
{
zmDbDisconnect(); zmDbDisconnect();
} }
if ( !defined( $dbh ) ) if ( !defined( $dbh ) ) {
{
my $socket; my $socket;
my ( $host, $portOrSocket ) = ( $Config{ZM_DB_HOST} =~ /^([^:]+)(?::(.+))?$/ ); my ( $host, $portOrSocket ) = ( $Config{ZM_DB_HOST} =~ /^([^:]+)(?::(.+))?$/ );
if ( defined($portOrSocket) ) if ( defined($portOrSocket) ) {
{ if ( $portOrSocket =~ /^\// ) {
if ( $portOrSocket =~ /^\// )
{
$socket = ";mysql_socket=".$portOrSocket; $socket = ";mysql_socket=".$portOrSocket;
} } else {
else
{
$socket = ";host=".$host.";port=".$portOrSocket; $socket = ";host=".$host.";port=".$portOrSocket;
} }
} } else {
else
{
$socket = ";host=".$Config{ZM_DB_HOST}; $socket = ";host=".$Config{ZM_DB_HOST};
} }
$dbh = DBI->connect( "DBI:mysql:database=".$Config{ZM_DB_NAME} $dbh = DBI->connect( "DBI:mysql:database=".$Config{ZM_DB_NAME}
@ -107,10 +98,8 @@ sub zmDbConnect
return( $dbh ); return( $dbh );
} }
sub zmDbDisconnect sub zmDbDisconnect {
{ if ( defined( $dbh ) ) {
if ( defined( $dbh ) )
{
$dbh->disconnect(); $dbh->disconnect();
$dbh = undef; $dbh = undef;
} }
@ -123,33 +112,22 @@ use constant DB_MON_MOTION => 3; # All monitors that are doing motion detection
use constant DB_MON_RECORD => 4; # All monitors that are doing unconditional recording use constant DB_MON_RECORD => 4; # All monitors that are doing unconditional recording
use constant DB_MON_PASSIVE => 5; # All monitors that are in nodect state use constant DB_MON_PASSIVE => 5; # All monitors that are in nodect state
sub zmDbGetMonitors sub zmDbGetMonitors {
{
zmDbConnect(); zmDbConnect();
my $function = shift || DB_MON_ALL; my $function = shift || DB_MON_ALL;
my $sql = "select * from Monitors"; my $sql = "select * from Monitors";
if ( $function ) if ( $function ) {
{ if ( $function == DB_MON_CAPT ) {
if ( $function == DB_MON_CAPT )
{
$sql .= " where Function >= 'Monitor'"; $sql .= " where Function >= 'Monitor'";
} } elsif ( $function == DB_MON_ACTIVE ) {
elsif ( $function == DB_MON_ACTIVE )
{
$sql .= " where Function > 'Monitor'"; $sql .= " where Function > 'Monitor'";
} } elsif ( $function == DB_MON_MOTION ) {
elsif ( $function == DB_MON_MOTION )
{
$sql .= " where Function = 'Modect' or Function = 'Mocord'"; $sql .= " where Function = 'Modect' or Function = 'Mocord'";
} } elsif ( $function == DB_MON_RECORD ) {
elsif ( $function == DB_MON_RECORD )
{
$sql .= " where Function = 'Record' or Function = 'Mocord'"; $sql .= " where Function = 'Record' or Function = 'Mocord'";
} } elsif ( $function == DB_MON_PASSIVE ) {
elsif ( $function == DB_MON_PASSIVE )
{
$sql .= " where Function = 'Nodect'"; $sql .= " where Function = 'Nodect'";
} }
} }
@ -159,16 +137,14 @@ sub zmDbGetMonitors
or croak( "Can't execute '$sql': ".$sth->errstr() ); or croak( "Can't execute '$sql': ".$sth->errstr() );
my @monitors; my @monitors;
while( my $monitor = $sth->fetchrow_hashref() ) while( my $monitor = $sth->fetchrow_hashref() ) {
{
push( @monitors, $monitor ); push( @monitors, $monitor );
} }
$sth->finish(); $sth->finish();
return( \@monitors ); return( \@monitors );
} }
sub zmDbGetMonitor sub zmDbGetMonitor {
{
zmDbConnect(); zmDbConnect();
my $id = shift; my $id = shift;
@ -185,8 +161,7 @@ sub zmDbGetMonitor
return( $monitor ); return( $monitor );
} }
sub zmDbGetMonitorAndControl sub zmDbGetMonitorAndControl {
{
zmDbConnect(); zmDbConnect();
my $id = shift; my $id = shift;

View File

@ -138,22 +138,18 @@ sub find_one {
return $results[0] if @results; return $results[0] if @results;
} }
sub getEventPath sub getEventPath {
{
my $event = shift; my $event = shift;
my $event_path = ""; my $event_path = "";
if ( $Config{ZM_USE_DEEP_STORAGE} ) if ( $Config{ZM_USE_DEEP_STORAGE} ) {
{
$event_path = $Config{ZM_DIR_EVENTS} $event_path = $Config{ZM_DIR_EVENTS}
.'/'.$event->{MonitorId} .'/'.$event->{MonitorId}
.'/'.strftime( "%y/%m/%d/%H/%M/%S", .'/'.strftime( "%y/%m/%d/%H/%M/%S",
localtime($event->{Time}) localtime($event->{Time})
) )
; ;
} } else {
else
{
$event_path = $Config{ZM_DIR_EVENTS} $event_path = $Config{ZM_DIR_EVENTS}
.'/'.$event->{MonitorId} .'/'.$event->{MonitorId}
.'/'.$event->{Id} .'/'.$event->{Id}
@ -176,17 +172,14 @@ sub GenerateVideo {
( my $video_name = $self->{Name} ) =~ s/\s/_/g; ( my $video_name = $self->{Name} ) =~ s/\s/_/g;
my @file_parts; my @file_parts;
if ( $rate ) if ( $rate ) {
{
my $file_rate = $rate; my $file_rate = $rate;
$file_rate =~ s/\./_/; $file_rate =~ s/\./_/;
$file_rate =~ s/_00//; $file_rate =~ s/_00//;
$file_rate =~ s/(_\d+)0+$/$1/; $file_rate =~ s/(_\d+)0+$/$1/;
$file_rate = 'r'.$file_rate; $file_rate = 'r'.$file_rate;
push( @file_parts, $file_rate ); push( @file_parts, $file_rate );
} } elsif ( $fps ) {
elsif ( $fps )
{
my $file_fps = $fps; my $file_fps = $fps;
$file_fps =~ s/\./_/; $file_fps =~ s/\./_/;
$file_fps =~ s/_00//; $file_fps =~ s/_00//;
@ -195,35 +188,27 @@ sub GenerateVideo {
push( @file_parts, $file_fps ); push( @file_parts, $file_fps );
} }
if ( $scale ) if ( $scale ) {
{
my $file_scale = $scale; my $file_scale = $scale;
$file_scale =~ s/\./_/; $file_scale =~ s/\./_/;
$file_scale =~ s/_00//; $file_scale =~ s/_00//;
$file_scale =~ s/(_\d+)0+$/$1/; $file_scale =~ s/(_\d+)0+$/$1/;
$file_scale = 's'.$file_scale; $file_scale = 's'.$file_scale;
push( @file_parts, $file_scale ); push( @file_parts, $file_scale );
} } elsif ( $size ) {
elsif ( $size )
{
my $file_size = 'S'.$size; my $file_size = 'S'.$size;
push( @file_parts, $file_size ); push( @file_parts, $file_size );
} }
my $video_file = "$video_name-".$file_parts[0]."-".$file_parts[1].".$format"; my $video_file = "$video_name-".$file_parts[0]."-".$file_parts[1].".$format";
if ( $overwrite || !-s $video_file ) if ( $overwrite || !-s $video_file ) {
{
Info( "Creating video file $video_file for event $self->{Id}\n" ); Info( "Creating video file $video_file for event $self->{Id}\n" );
my $frame_rate = sprintf( "%.2f", $self->{Frames}/$self->{FullLength} ); my $frame_rate = sprintf( "%.2f", $self->{Frames}/$self->{FullLength} );
if ( $rate ) if ( $rate ) {
{ if ( $rate != 1.0 ) {
if ( $rate != 1.0 )
{
$frame_rate *= $rate; $frame_rate *= $rate;
} }
} } elsif ( $fps ) {
elsif ( $fps )
{
$frame_rate = $fps; $frame_rate = $fps;
} }
@ -231,17 +216,13 @@ sub GenerateVideo {
my $height = $self->{MonitorHeight}; my $height = $self->{MonitorHeight};
my $video_size = " ${width}x${height}"; my $video_size = " ${width}x${height}";
if ( $scale ) if ( $scale ) {
{ if ( $scale != 1.0 ) {
if ( $scale != 1.0 )
{
$width = int($width*$scale); $width = int($width*$scale);
$height = int($height*$scale); $height = int($height*$scale);
$video_size = " ${width}x${height}"; $video_size = " ${width}x${height}";
} }
} } elsif ( $size ) {
elsif ( $size )
{
$video_size = $size; $video_size = $size;
} }
my $command = $Config{ZM_PATH_FFMPEG} my $command = $Config{ZM_PATH_FFMPEG}
@ -259,8 +240,7 @@ sub GenerateVideo {
my $output = qx($command); my $output = qx($command);
my $status = $? >> 8; my $status = $? >> 8;
if ( $status ) if ( $status ) {
{
Error( "Unable to generate video, check " Error( "Unable to generate video, check "
.$event_path."/ffmpeg.log for details" .$event_path."/ffmpeg.log for details"
); );

View File

@ -143,18 +143,15 @@ sub Execute {
my $sql = $self->Sql(); my $sql = $self->Sql();
if ( $self->{HasDiskPercent} ) if ( $self->{HasDiskPercent} ) {
{
my $disk_percent = getDiskPercent(); my $disk_percent = getDiskPercent();
$sql =~ s/zmDiskPercent/$disk_percent/g; $sql =~ s/zmDiskPercent/$disk_percent/g;
} }
if ( $self->{HasDiskBlocks} ) if ( $self->{HasDiskBlocks} ) {
{
my $disk_blocks = getDiskBlocks(); my $disk_blocks = getDiskBlocks();
$sql =~ s/zmDiskBlocks/$disk_blocks/g; $sql =~ s/zmDiskBlocks/$disk_blocks/g;
} }
if ( $self->{HasSystemLoad} ) if ( $self->{HasSystemLoad} ) {
{
my $load = getLoad(); my $load = getLoad();
$sql =~ s/zmSystemLoad/$load/g; $sql =~ s/zmSystemLoad/$load/g;
} }
@ -162,8 +159,7 @@ sub Execute {
my $sth = $$self{dbh}->prepare_cached( $sql ) my $sth = $$self{dbh}->prepare_cached( $sql )
or Fatal( "Can't prepare '$sql': ".$$self{dbh}->errstr() ); or Fatal( "Can't prepare '$sql': ".$$self{dbh}->errstr() );
my $res = $sth->execute(); my $res = $sth->execute();
if ( !$res ) if ( !$res ) {
{
Error( "Can't execute filter '$sql', ignoring: ".$sth->errstr() ); Error( "Can't execute filter '$sql', ignoring: ".$sth->errstr() );
return; return;
} }
@ -300,103 +296,69 @@ sub Sql {
} # end foreach term } # end foreach term
} # end if terms } # end if terms
if ( $self->{Sql} ) if ( $self->{Sql} ) {
{ if ( $self->{AutoMessage} ) {
if ( $self->{AutoMessage} )
{
# Include all events, including events that are still ongoing # Include all events, including events that are still ongoing
# and have no EndTime yet # and have no EndTime yet
$sql .= " and ( ".$self->{Sql}." )"; $sql .= " and ( ".$self->{Sql}." )";
} } else {
else
{
# Only include closed events (events with valid EndTime) # Only include closed events (events with valid EndTime)
$sql .= " where not isnull(E.EndTime) and ( ".$self->{Sql}." )"; $sql .= " where not isnull(E.EndTime) and ( ".$self->{Sql}." )";
} }
} }
my @auto_terms; my @auto_terms;
if ( $self->{AutoArchive} ) if ( $self->{AutoArchive} ) {
{
push( @auto_terms, "E.Archived = 0" ) push( @auto_terms, "E.Archived = 0" )
} }
if ( $self->{AutoVideo} ) if ( $self->{AutoVideo} ) {
{
push( @auto_terms, "E.Videoed = 0" ) push( @auto_terms, "E.Videoed = 0" )
} }
if ( $self->{AutoUpload} ) if ( $self->{AutoUpload} ) {
{
push( @auto_terms, "E.Uploaded = 0" ) push( @auto_terms, "E.Uploaded = 0" )
} }
if ( $self->{AutoEmail} ) if ( $self->{AutoEmail} ) {
{
push( @auto_terms, "E.Emailed = 0" ) push( @auto_terms, "E.Emailed = 0" )
} }
if ( $self->{AutoMessage} ) if ( $self->{AutoMessage} ) {
{
push( @auto_terms, "E.Messaged = 0" ) push( @auto_terms, "E.Messaged = 0" )
} }
if ( $self->{AutoExecute} ) if ( $self->{AutoExecute} ) {
{
push( @auto_terms, "E.Executed = 0" ) push( @auto_terms, "E.Executed = 0" )
} }
if ( @auto_terms ) if ( @auto_terms ) {
{
$sql .= " and ( ".join( " or ", @auto_terms )." )"; $sql .= " and ( ".join( " or ", @auto_terms )." )";
} }
if ( !$filter_expr->{sort_field} ) if ( !$filter_expr->{sort_field} ) {
{
$filter_expr->{sort_field} = 'StartTime'; $filter_expr->{sort_field} = 'StartTime';
$filter_expr->{sort_asc} = 0; $filter_expr->{sort_asc} = 0;
} }
my $sort_column = ''; my $sort_column = '';
if ( $filter_expr->{sort_field} eq 'Id' ) if ( $filter_expr->{sort_field} eq 'Id' ) {
{
$sort_column = "E.Id"; $sort_column = "E.Id";
} } elsif ( $filter_expr->{sort_field} eq 'MonitorName' ) {
elsif ( $filter_expr->{sort_field} eq 'MonitorName' )
{
$sort_column = "M.Name"; $sort_column = "M.Name";
} } elsif ( $filter_expr->{sort_field} eq 'Name' ) {
elsif ( $filter_expr->{sort_field} eq 'Name' )
{
$sort_column = "E.Name"; $sort_column = "E.Name";
} } elsif ( $filter_expr->{sort_field} eq 'StartTime' ) {
elsif ( $filter_expr->{sort_field} eq 'StartTime' )
{
$sort_column = "E.StartTime"; $sort_column = "E.StartTime";
} } elsif ( $filter_expr->{sort_field} eq 'Secs' ) {
elsif ( $filter_expr->{sort_field} eq 'Secs' )
{
$sort_column = "E.Length"; $sort_column = "E.Length";
} } elsif ( $filter_expr->{sort_field} eq 'Frames' ) {
elsif ( $filter_expr->{sort_field} eq 'Frames' )
{
$sort_column = "E.Frames"; $sort_column = "E.Frames";
} } elsif ( $filter_expr->{sort_field} eq 'AlarmFrames' ) {
elsif ( $filter_expr->{sort_field} eq 'AlarmFrames' )
{
$sort_column = "E.AlarmFrames"; $sort_column = "E.AlarmFrames";
} } elsif ( $filter_expr->{sort_field} eq 'TotScore' ) {
elsif ( $filter_expr->{sort_field} eq 'TotScore' )
{
$sort_column = "E.TotScore"; $sort_column = "E.TotScore";
} } elsif ( $filter_expr->{sort_field} eq 'AvgScore' ) {
elsif ( $filter_expr->{sort_field} eq 'AvgScore' )
{
$sort_column = "E.AvgScore"; $sort_column = "E.AvgScore";
} } elsif ( $filter_expr->{sort_field} eq 'MaxScore' ) {
elsif ( $filter_expr->{sort_field} eq 'MaxScore' )
{
$sort_column = "E.MaxScore"; $sort_column = "E.MaxScore";
} } else {
else
{
$sort_column = "E.StartTime"; $sort_column = "E.StartTime";
} }
my $sort_order = $filter_expr->{sort_asc}?"asc":"desc"; my $sort_order = $filter_expr->{sort_asc}?"asc":"desc";
$sql .= " order by ".$sort_column." ".$sort_order; $sql .= " order by ".$sort_column." ".$sort_order;
if ( $filter_expr->{limit} ) if ( $filter_expr->{limit} ) {
{
$sql .= " limit 0,".$filter_expr->{limit}; $sql .= " limit 0,".$filter_expr->{limit};
} }
Debug( "SQL:$sql\n" ); Debug( "SQL:$sql\n" );
@ -405,35 +367,31 @@ sub Sql {
return $self->{Sql}; return $self->{Sql};
} # end sub Sql } # end sub Sql
sub getDiskPercent sub getDiskPercent {
{
my $command = "df ."; my $command = "df .";
my $df = qx( $command ); my $df = qx( $command );
my $space = -1; my $space = -1;
if ( $df =~ /\s(\d+)%/ms ) if ( $df =~ /\s(\d+)%/ms ) {
{
$space = $1; $space = $1;
} }
return( $space ); return( $space );
} }
sub getDiskBlocks
{ sub getDiskBlocks {
my $command = "df ."; my $command = "df .";
my $df = qx( $command ); my $df = qx( $command );
my $space = -1; my $space = -1;
if ( $df =~ /\s(\d+)\s+\d+\s+\d+%/ms ) if ( $df =~ /\s(\d+)\s+\d+\s+\d+%/ms ) {
{
$space = $1; $space = $1;
} }
return( $space ); return( $space );
} }
sub getLoad
{ sub getLoad {
my $command = "uptime ."; my $command = "uptime .";
my $uptime = qx( $command ); my $uptime = qx( $command );
my $load = -1; my $load = -1;
if ( $uptime =~ /load average:\s+([\d.]+)/ms ) if ( $uptime =~ /load average:\s+([\d.]+)/ms ) {
{
$load = $1; $load = $1;
Info( "Load: $load" ); Info( "Load: $load" );
} }
@ -443,8 +401,7 @@ sub getLoad
# #
# More or less replicates the equivalent PHP function # More or less replicates the equivalent PHP function
# #
sub strtotime sub strtotime {
{
my $dt_str = shift; my $dt_str = shift;
return( Date::Manip::UnixDate( $dt_str, '%s' ) ); return( Date::Manip::UnixDate( $dt_str, '%s' ) );
} }
@ -452,20 +409,17 @@ sub strtotime
# #
# More or less replicates the equivalent PHP function # More or less replicates the equivalent PHP function
# #
sub str_repeat sub str_repeat {
{
my $string = shift; my $string = shift;
my $count = shift; my $count = shift;
return( ${string}x${count} ); return( ${string}x${count} );
} }
# Formats a date into MySQL format # Formats a date into MySQL format
sub DateTimeToSQL sub DateTimeToSQL {
{
my $dt_str = shift; my $dt_str = shift;
my $dt_val = strtotime( $dt_str ); my $dt_val = strtotime( $dt_str );
if ( !$dt_val ) if ( !$dt_val ) {
{
Error( "Unable to parse date string '$dt_str'\n" ); Error( "Unable to parse date string '$dt_str'\n" );
return( undef ); return( undef );
} }

View File

@ -76,13 +76,11 @@ use ZoneMinder::Database qw(:all);
use POSIX; use POSIX;
# For running general shell commands # For running general shell commands
sub executeShellCommand sub executeShellCommand {
{
my $command = shift; my $command = shift;
my $output = qx( $command ); my $output = qx( $command );
my $status = $? >> 8; my $status = $? >> 8;
if ( $status || logDebugging() ) if ( $status || logDebugging() ) {
{
Debug( "Command: $command\n" ); Debug( "Command: $command\n" );
chomp( $output ); chomp( $output );
Debug( "Output: $output\n" ); Debug( "Output: $output\n" );
@ -90,13 +88,11 @@ sub executeShellCommand
return( $status ); return( $status );
} }
sub getCmdFormat sub getCmdFormat {
{
Debug( "Testing valid shell syntax\n" ); Debug( "Testing valid shell syntax\n" );
my ( $name ) = getpwuid( $> ); my ( $name ) = getpwuid( $> );
if ( $name eq $Config{ZM_WEB_USER} ) if ( $name eq $Config{ZM_WEB_USER} ) {
{
Debug( "Running as '$name', su commands not needed\n" ); Debug( "Running as '$name', su commands not needed\n" );
return( "" ); return( "" );
} }
@ -109,13 +105,10 @@ sub getCmdFormat
Debug( "Testing \"$command\"\n" ); Debug( "Testing \"$command\"\n" );
my $output = qx($command); my $output = qx($command);
my $status = $? >> 8; my $status = $? >> 8;
if ( !$status ) if ( !$status ) {
{
Debug( "Test ok, using format \"$prefix<command>$suffix\"\n" ); Debug( "Test ok, using format \"$prefix<command>$suffix\"\n" );
return( $prefix, $suffix ); return( $prefix, $suffix );
} } else {
else
{
chomp( $output ); chomp( $output );
Debug( "Test failed, '$output'\n" ); Debug( "Test failed, '$output'\n" );
@ -125,13 +118,10 @@ sub getCmdFormat
Debug( "Testing \"$command\"\n" ); Debug( "Testing \"$command\"\n" );
my $output = qx($command); my $output = qx($command);
my $status = $? >> 8; my $status = $? >> 8;
if ( !$status ) if ( !$status ) {
{
Debug( "Test ok, using format \"$prefix<command>$suffix\"\n" ); Debug( "Test ok, using format \"$prefix<command>$suffix\"\n" );
return( $prefix, $suffix ); return( $prefix, $suffix );
} } else {
else
{
chomp( $output ); chomp( $output );
Debug( "Test failed, '$output'\n" ); Debug( "Test failed, '$output'\n" );
@ -141,13 +131,10 @@ sub getCmdFormat
Debug( "Testing \"$command\"\n" ); Debug( "Testing \"$command\"\n" );
$output = qx($command); $output = qx($command);
$status = $? >> 8; $status = $? >> 8;
if ( !$status ) if ( !$status ) {
{
Debug( "Test ok, using format \"$prefix<command>$suffix\"\n" ); Debug( "Test ok, using format \"$prefix<command>$suffix\"\n" );
return( $prefix, $suffix ); return( $prefix, $suffix );
} } else {
else
{
chomp( $output ); chomp( $output );
Debug( "Test failed, '$output'\n" ); Debug( "Test failed, '$output'\n" );
} }
@ -161,10 +148,8 @@ our $testedShellSyntax = 0;
our ( $cmdPrefix, $cmdSuffix ); our ( $cmdPrefix, $cmdSuffix );
# For running ZM daemons etc # For running ZM daemons etc
sub runCommand sub runCommand {
{ if ( !$testedShellSyntax ) {
if ( !$testedShellSyntax )
{
# Determine the appropriate syntax for the su command # Determine the appropriate syntax for the su command
( $cmdPrefix, $cmdSuffix ) = getCmdFormat(); ( $cmdPrefix, $cmdSuffix ) = getCmdFormat();
$testedShellSyntax = !undef; $testedShellSyntax = !undef;
@ -172,52 +157,43 @@ sub runCommand
my $command = shift; my $command = shift;
$command = $Config{ZM_PATH_BIN}."/".$command; $command = $Config{ZM_PATH_BIN}."/".$command;
if ( $cmdPrefix ) if ( $cmdPrefix ) {
{
$command = $cmdPrefix.$command.$cmdSuffix; $command = $cmdPrefix.$command.$cmdSuffix;
} }
Debug( "Command: $command\n" ); Debug( "Command: $command\n" );
my $output = qx($command); my $output = qx($command);
my $status = $? >> 8; my $status = $? >> 8;
chomp( $output ); chomp( $output );
if ( $status || logDebugging() ) if ( $status || logDebugging() ) {
{ if ( $status ) {
if ( $status )
{
Error( "Unable to run \"$command\", output is \"$output\"\n" ); Error( "Unable to run \"$command\", output is \"$output\"\n" );
exit( -1 ); exit( -1 );
} } else {
else
{
Debug( "Output: $output\n" ); Debug( "Output: $output\n" );
} }
} }
return( $output ); return( $output );
} }
sub getEventPath sub getEventPath {
{
my $event = shift; my $event = shift;
my $event_path = ""; my $event_path = "";
if ( $Config{ZM_USE_DEEP_STORAGE} ) if ( $Config{ZM_USE_DEEP_STORAGE} ) {
{
$event_path = $Config{ZM_DIR_EVENTS} $event_path = $Config{ZM_DIR_EVENTS}
.'/'.$event->{MonitorId} .'/'.$event->{MonitorId}
.'/'.strftime( "%y/%m/%d/%H/%M/%S", .'/'.strftime( "%y/%m/%d/%H/%M/%S",
localtime($event->{Time}) localtime($event->{Time})
) )
; ;
} } else {
else
{
$event_path = $Config{ZM_DIR_EVENTS} $event_path = $Config{ZM_DIR_EVENTS}
.'/'.$event->{MonitorId} .'/'.$event->{MonitorId}
.'/'.$event->{Id} .'/'.$event->{Id}
; ;
} }
if ( index($Config{ZM_DIR_EVENTS},'/') != 0 ){ if ( index($Config{ZM_DIR_EVENTS},'/') != 0 ) {
$event_path = $Config{ZM_PATH_WEB} $event_path = $Config{ZM_PATH_WEB}
.'/'.$event_path .'/'.$event_path
; ;
@ -225,8 +201,7 @@ sub getEventPath
return( $event_path ); return( $event_path );
} }
sub createEventPath sub createEventPath {
{
# #
# WARNING assumes running from events directory # WARNING assumes running from events directory
# #
@ -236,8 +211,7 @@ sub createEventPath
: ($Config{ZM_PATH_WEB}.'/'.$Config{ZM_DIR_EVENTS}); : ($Config{ZM_PATH_WEB}.'/'.$Config{ZM_DIR_EVENTS});
my $eventPath = $eventRootPath.'/'.$event->{MonitorId}; my $eventPath = $eventRootPath.'/'.$event->{MonitorId};
if ( $Config{ZM_USE_DEEP_STORAGE} ) if ( $Config{ZM_USE_DEEP_STORAGE} ) {
{
my @startTime = localtime( $event->{StartTime} ); my @startTime = localtime( $event->{StartTime} );
my @datetimeParts = (); my @datetimeParts = ();
@ -269,9 +243,7 @@ sub createEventPath
or Fatal( "Can't open $idFile: $!" ); or Fatal( "Can't open $idFile: $!" );
close( $ID_FP ); close( $ID_FP );
setFileOwner( $idFile ); setFileOwner( $idFile );
} } else {
else
{
makePath( $event->{Id}, $eventPath ); makePath( $event->{Id}, $eventPath );
$eventPath .= '/'.$event->{Id}; $eventPath .= '/'.$event->{Id};
@ -289,13 +261,10 @@ use Data::Dumper;
our $_setFileOwner = undef; our $_setFileOwner = undef;
our ( $_ownerUid, $_ownerGid ); our ( $_ownerUid, $_ownerGid );
sub _checkProcessOwner sub _checkProcessOwner {
{ if ( !defined($_setFileOwner) ) {
if ( !defined($_setFileOwner) )
{
my ( $processOwner ) = getpwuid( $> ); my ( $processOwner ) = getpwuid( $> );
if ( $processOwner ne $Config{ZM_WEB_USER} ) if ( $processOwner ne $Config{ZM_WEB_USER} ) {
{
# Not running as web user, so should be root in which case chown # Not running as web user, so should be root in which case chown
# the temporary directory # the temporary directory
( my $ownerName, my $ownerPass, $_ownerUid, $_ownerGid ) ( my $ownerName, my $ownerPass, $_ownerUid, $_ownerGid )
@ -304,21 +273,17 @@ sub _checkProcessOwner
.$Config{ZM_WEB_USER}."': $!" .$Config{ZM_WEB_USER}."': $!"
); );
$_setFileOwner = 1; $_setFileOwner = 1;
} } else {
else
{
$_setFileOwner = 0; $_setFileOwner = 0;
} }
} }
return( $_setFileOwner ); return( $_setFileOwner );
} }
sub setFileOwner sub setFileOwner {
{
my $file = shift; my $file = shift;
if ( _checkProcessOwner() ) if ( _checkProcessOwner() ) {
{
chown( $_ownerUid, $_ownerGid, $file ) chown( $_ownerUid, $_ownerGid, $file )
or Fatal( "Can't change ownership of file '$file' to '" or Fatal( "Can't change ownership of file '$file' to '"
.$Config{ZM_WEB_USER}.":".$Config{ZM_WEB_GROUP}."': $!" .$Config{ZM_WEB_USER}.":".$Config{ZM_WEB_GROUP}."': $!"
@ -328,12 +293,9 @@ sub setFileOwner
our $_hasImageInfo = undef; our $_hasImageInfo = undef;
sub _checkForImageInfo sub _checkForImageInfo {
{ if ( !defined($_hasImageInfo) ) {
if ( !defined($_hasImageInfo) ) my $result = eval {
{
my $result = eval
{
require Image::Info; require Image::Info;
Image::Info->import(); Image::Info->import();
}; };
@ -342,8 +304,7 @@ sub _checkForImageInfo
return( $_hasImageInfo ); return( $_hasImageInfo );
} }
sub createEvent sub createEvent {
{
my $event = shift; my $event = shift;
Debug( "Creating event" ); Debug( "Creating event" );
@ -353,12 +314,9 @@ sub createEvent
my $dbh = zmDbConnect(); my $dbh = zmDbConnect();
if ( $event->{monitor} ) if ( $event->{monitor} ) {
{
$event->{MonitorId} = $event->{monitor}->{Id}; $event->{MonitorId} = $event->{monitor}->{Id};
} } elsif ( $event->{MonitorId} ) {
elsif ( $event->{MonitorId} )
{
my $sql = "select * from Monitors where Id = ?"; my $sql = "select * from Monitors where Id = ?";
my $sth = $dbh->prepare_cached( $sql ) my $sth = $dbh->prepare_cached( $sql )
or Fatal( "Can't prepare sql '$sql': ".$dbh->errstr() ); or Fatal( "Can't prepare sql '$sql': ".$dbh->errstr() );
@ -369,9 +327,7 @@ sub createEvent
.$event->{MonitorId}."'" .$event->{MonitorId}."'"
); );
$sth->finish(); $sth->finish();
} } else {
else
{
Fatal( "Unable to create event, no monitor or monitor id supplied" ); Fatal( "Unable to create event, no monitor or monitor id supplied" );
} }
$event->{Name} = "New Event" unless( $event->{Name} ); $event->{Name} = "New Event" unless( $event->{Name} );
@ -379,21 +335,15 @@ sub createEvent
$event->{TotScore} = $event->{MaxScore} = 0; $event->{TotScore} = $event->{MaxScore} = 0;
my $lastTimestamp = 0.0; my $lastTimestamp = 0.0;
foreach my $frame ( @{$event->{frames}} ) foreach my $frame ( @{$event->{frames}} ) {
{ if ( !$event->{Width} ) {
if ( !$event->{Width} ) if ( $_hasImageInfo ) {
{
if ( $_hasImageInfo )
{
my $imageInfo = Image::Info::image_info( $frame->{imagePath} ); my $imageInfo = Image::Info::image_info( $frame->{imagePath} );
if ( $imageInfo->{error} ) if ( $imageInfo->{error} ) {
{
Error( "Unable to extract image info from '" Error( "Unable to extract image info from '"
.$frame->{imagePath}."': ".$imageInfo->{error} .$frame->{imagePath}."': ".$imageInfo->{error}
); );
} } else {
else
{
( $event->{Width}, $event->{Height} ) = Image::Info::dim( $imageInfo ); ( $event->{Width}, $event->{Height} ) = Image::Info::dim( $imageInfo );
} }
} }
@ -418,8 +368,7 @@ sub createEvent
); );
my ( @fields, @formats, @values ); my ( @fields, @formats, @values );
while ( my ( $field, $value ) = each( %$event ) ) while ( my ( $field, $value ) = each( %$event ) ) {
{
next unless $field =~ /^[A-Z]/; next unless $field =~ /^[A-Z]/;
push( @fields, $field ); push( @fields, $field );
push( @formats, ($formats{$field} or '?') ); push( @formats, ($formats{$field} or '?') );
@ -436,8 +385,7 @@ sub createEvent
$event->{Id} = $dbh->{mysql_insertid}; $event->{Id} = $dbh->{mysql_insertid};
Info( "Created event ".$event->{Id} ); Info( "Created event ".$event->{Id} );
if ( $event->{EndTime} ) if ( $event->{EndTime} ) {
{
$event->{Name} = $event->{monitor}->{EventPrefix}.$event->{Id} $event->{Name} = $event->{monitor}->{EventPrefix}.$event->{Id}
if ( $event->{Name} eq 'New Event' ); if ( $event->{Name} eq 'New Event' );
my $sql = "update Events set Name = ? where Id = ?"; my $sql = "update Events set Name = ? where Id = ?";
@ -453,14 +401,12 @@ sub createEvent
TimeStamp => 'from_unixtime(?)', TimeStamp => 'from_unixtime(?)',
); );
my $frameId = 1; my $frameId = 1;
foreach my $frame ( @{$event->{frames}} ) foreach my $frame ( @{$event->{frames}} ) {
{
$frame->{EventId} = $event->{Id}; $frame->{EventId} = $event->{Id};
$frame->{FrameId} = $frameId++; $frame->{FrameId} = $frameId++;
my ( @fields, @formats, @values ); my ( @fields, @formats, @values );
while ( my ( $field, $value ) = each( %$frame ) ) while ( my ( $field, $value ) = each( %$frame ) ) {
{
next unless $field =~ /^[A-Z]/; next unless $field =~ /^[A-Z]/;
push( @fields, $field ); push( @fields, $field );
push( @formats, ($frameFormats{$field} or '?') ); push( @formats, ($frameFormats{$field} or '?') );
@ -475,8 +421,7 @@ sub createEvent
my $res = $sth->execute( @values ) my $res = $sth->execute( @values )
or Fatal( "Can't execute sql '$sql': ".$sth->errstr() ); or Fatal( "Can't execute sql '$sql': ".$sth->errstr() );
#$frame->{FrameId} = $dbh->{mysql_insertid}; #$frame->{FrameId} = $dbh->{mysql_insertid};
if ( $frame->{imagePath} ) if ( $frame->{imagePath} ) {
{
$frame->{capturePath} = sprintf( $frame->{capturePath} = sprintf(
"%s/%0".$Config{ZM_EVENT_IMAGE_DIGITS} "%s/%0".$Config{ZM_EVENT_IMAGE_DIGITS}
."d-capture.jpg" ."d-capture.jpg"
@ -488,8 +433,7 @@ sub createEvent
." to ".$frame->{capturePath}.": $!" ." to ".$frame->{capturePath}.": $!"
); );
setFileOwner( $frame->{capturePath} ); setFileOwner( $frame->{capturePath} );
if ( 0 && $Config{ZM_CREATE_ANALYSIS_IMAGES} ) if ( 0 && $Config{ZM_CREATE_ANALYSIS_IMAGES} ) {
{
$frame->{analysePath} = sprintf( $frame->{analysePath} = sprintf(
"%s/%0".$Config{ZM_EVENT_IMAGE_DIGITS} "%s/%0".$Config{ZM_EVENT_IMAGE_DIGITS}
."d-analyse.jpg" ."d-analyse.jpg"
@ -506,20 +450,17 @@ sub createEvent
} }
} }
sub addEventImage sub addEventImage {
{
my $event = shift; my $event = shift;
my $frame = shift; my $frame = shift;
# TBD # TBD
} }
sub updateEvent sub updateEvent {
{
my $event = shift; my $event = shift;
if ( !$event->{EventId} ) if ( !$event->{EventId} ) {
{
Error( "Unable to update event, no event id supplied" ); Error( "Unable to update event, no event id supplied" );
return( 0 ); return( 0 );
} }
@ -535,8 +476,7 @@ sub updateEvent
); );
my ( @values, @sets ); my ( @values, @sets );
while ( my ( $field, $value ) = each( %$event ) ) while ( my ( $field, $value ) = each( %$event ) ) {
{
next if ( $field eq 'Id' ); next if ( $field eq 'Id' );
push( @values, $event->{$field} ); push( @values, $event->{$field} );
push( @sets, $field." = ".($formats{$field} or '?') ); push( @sets, $field." = ".($formats{$field} or '?') );
@ -550,8 +490,7 @@ sub updateEvent
or Fatal( "Can't execute sql '$sql': ".$sth->errstr() ); or Fatal( "Can't execute sql '$sql': ".$sth->errstr() );
} }
sub deleteEventFiles sub deleteEventFiles {
{
# #
# WARNING assumes running from events directory # WARNING assumes running from events directory
# #
@ -559,14 +498,12 @@ sub deleteEventFiles
my $monitor_id = shift; my $monitor_id = shift;
$monitor_id = '*' if ( !defined($monitor_id) ); $monitor_id = '*' if ( !defined($monitor_id) );
if ( $Config{ZM_USE_DEEP_STORAGE} ) if ( $Config{ZM_USE_DEEP_STORAGE} ) {
{
my $link_path = $monitor_id."/*/*/*/.".$event_id; my $link_path = $monitor_id."/*/*/*/.".$event_id;
#Debug( "LP1:$link_path" ); #Debug( "LP1:$link_path" );
my @links = glob($link_path); my @links = glob($link_path);
#Debug( "L:".$links[0].": $!" ); #Debug( "L:".$links[0].": $!" );
if ( @links ) if ( @links ) {
{
( $link_path ) = ( $links[0] =~ /^(.*)$/ ); # De-taint ( $link_path ) = ( $links[0] =~ /^(.*)$/ ); # De-taint
#Debug( "LP2:$link_path" ); #Debug( "LP2:$link_path" );
@ -581,8 +518,7 @@ sub deleteEventFiles
unlink( $link_path ) or Error( "Unable to unlink '$link_path': $!" ); unlink( $link_path ) or Error( "Unable to unlink '$link_path': $!" );
my @path_parts = split( /\//, $event_path ); my @path_parts = split( /\//, $event_path );
for ( my $i = int(@path_parts)-2; $i >= 1; $i-- ) for ( my $i = int(@path_parts)-2; $i >= 1; $i-- ) {
{
my $delete_path = join( '/', @path_parts[0..$i] ); my $delete_path = join( '/', @path_parts[0..$i] );
#Debug( "DP$i:$delete_path" ); #Debug( "DP$i:$delete_path" );
my @has_files = glob( $delete_path."/*" ); my @has_files = glob( $delete_path."/*" );
@ -595,16 +531,13 @@ sub deleteEventFiles
executeShellCommand( $command ); executeShellCommand( $command );
} }
} }
} } else {
else
{
my $command = "/bin/rm -rf $monitor_id/$event_id"; my $command = "/bin/rm -rf $monitor_id/$event_id";
executeShellCommand( $command ); executeShellCommand( $command );
} }
} }
sub makePath sub makePath {
{
my $path = shift; my $path = shift;
my $root = shift; my $root = shift;
$root = (( $path =~ m|^/| )?'':'.' ) unless( $root ); $root = (( $path =~ m|^/| )?'':'.' ) unless( $root );
@ -612,17 +545,12 @@ sub makePath
Debug( "Creating path '$path' in $root'\n" ); Debug( "Creating path '$path' in $root'\n" );
my @parts = split( '/', $path ); my @parts = split( '/', $path );
my $fullPath = $root; my $fullPath = $root;
foreach my $dir ( @parts ) foreach my $dir ( @parts ) {
{
$fullPath .= '/'.$dir; $fullPath .= '/'.$dir;
if ( !-d $fullPath ) if ( !-d $fullPath ) {
{ if ( -e $fullPath ) {
if ( -e $fullPath )
{
Fatal( "Can't create '$fullPath', already exists as non directory" ); Fatal( "Can't create '$fullPath', already exists as non directory" );
} } else {
else
{
Debug( "Creating '$fullPath'\n" ); Debug( "Creating '$fullPath'\n" );
mkdir( $fullPath, 0755 ) or Fatal( "Can't mkdir '$fullPath': $!" ); mkdir( $fullPath, 0755 ) or Fatal( "Can't mkdir '$fullPath': $!" );
setFileOwner( $fullPath ); setFileOwner( $fullPath );
@ -635,11 +563,9 @@ sub makePath
our $testedJSON = 0; our $testedJSON = 0;
our $hasJSONAny = 0; our $hasJSONAny = 0;
sub _testJSON sub _testJSON {
{
return if ( $testedJSON ); return if ( $testedJSON );
my $result = eval my $result = eval {
{
require JSON::Any; require JSON::Any;
JSON::Any->import(); JSON::Any->import();
}; };
@ -647,8 +573,7 @@ sub _testJSON
$hasJSONAny = 1 if ( $result ); $hasJSONAny = 1 if ( $result );
} }
sub _getJSONType sub _getJSONType {
{
my $value = shift; my $value = shift;
return( 'null' ) unless( defined($value) ); return( 'null' ) unless( defined($value) );
return( 'integer' ) if ( $value =~ /^\d+$/ ); return( 'integer' ) if ( $value =~ /^\d+$/ );
@ -660,64 +585,46 @@ sub _getJSONType
sub jsonEncode; sub jsonEncode;
sub jsonEncode sub jsonEncode {
{
my $value = shift; my $value = shift;
_testJSON(); _testJSON();
if ( $hasJSONAny ) if ( $hasJSONAny ) {
{
my $string = eval { JSON::Any->objToJson( $value ) }; my $string = eval { JSON::Any->objToJson( $value ) };
Fatal( "Unable to encode object to JSON: $@" ) unless( $string ); Fatal( "Unable to encode object to JSON: $@" ) unless( $string );
return( $string ); return( $string );
} }
my $type = _getJSONType($value); my $type = _getJSONType($value);
if ( $type eq 'integer' || $type eq 'double' ) if ( $type eq 'integer' || $type eq 'double' ) {
{
return( $value ); return( $value );
} } elsif ( $type eq 'boolean' ) {
elsif ( $type eq 'boolean' )
{
return( $value?'true':'false' ); return( $value?'true':'false' );
} } elsif ( $type eq 'string' ) {
elsif ( $type eq 'string' )
{
$value =~ s|(["\\/])|\\$1|g; $value =~ s|(["\\/])|\\$1|g;
$value =~ s|\r?\n|\n|g; $value =~ s|\r?\n|\n|g;
return( '"'.$value.'"' ); return( '"'.$value.'"' );
} } elsif ( $type eq 'null' ) {
elsif ( $type eq 'null' )
{
return( 'null' ); return( 'null' );
} } elsif ( $type eq 'array' ) {
elsif ( $type eq 'array' )
{
return( '['.join( ',', map { jsonEncode( $_ ) } @$value ).']' ); return( '['.join( ',', map { jsonEncode( $_ ) } @$value ).']' );
} } elsif ( $type eq 'hash' ) {
elsif ( $type eq 'hash' )
{
my $result = '{'; my $result = '{';
while ( my ( $subKey=>$subValue ) = each( %$value ) ) while ( my ( $subKey=>$subValue ) = each( %$value ) ) {
{
$result .= ',' if ( $result ne '{' ); $result .= ',' if ( $result ne '{' );
$result .= '"'.$subKey.'":'.jsonEncode( $subValue ); $result .= '"'.$subKey.'":'.jsonEncode( $subValue );
} }
return( $result.'}' ); return( $result.'}' );
} } else {
else
{
Fatal( "Unexpected type '$type'" ); Fatal( "Unexpected type '$type'" );
} }
} }
sub jsonDecode sub jsonDecode {
{
my $value = shift; my $value = shift;
_testJSON(); _testJSON();
if ( $hasJSONAny ) if ( $hasJSONAny ) {
{
my $object = eval { JSON::Any->jsonToObj( $value ) }; my $object = eval { JSON::Any->jsonToObj( $value ) };
Fatal( "Unable to decode JSON string '$value': $@" ) unless( $object ); Fatal( "Unable to decode JSON string '$value': $@" ) unless( $object );
return( $object ); return( $object );
@ -727,41 +634,27 @@ sub jsonDecode
my $unescape = 0; my $unescape = 0;
my $out = ''; my $out = '';
my @chars = split( //, $value ); my @chars = split( //, $value );
for ( my $i = 0; $i < @chars; $i++ ) for ( my $i = 0; $i < @chars; $i++ ) {
{ if ( !$comment ) {
if ( !$comment ) if ( $chars[$i] eq ':' ) {
{
if ( $chars[$i] eq ':' )
{
$out .= '=>'; $out .= '=>';
} } else {
else
{
$out .= $chars[$i]; $out .= $chars[$i];
} }
} } elsif ( !$unescape ) {
elsif ( !$unescape ) if ( $chars[$i] eq '\\' ) {
{
if ( $chars[$i] eq '\\' )
{
$unescape = 1; $unescape = 1;
} } else {
else
{
$out .= $chars[$i]; $out .= $chars[$i];
} }
} } else {
else if ( $chars[$i] ne '/' ) {
{
if ( $chars[$i] ne '/' )
{
$out .= '\\'; $out .= '\\';
} }
$out .= $chars[$i]; $out .= $chars[$i];
$unescape = 0; $unescape = 0;
} }
if ( $chars[$i] eq '"' ) if ( $chars[$i] eq '"' ) {
{
$comment = !$comment; $comment = !$comment;
} }
} }

View File

@ -128,8 +128,7 @@ our %priorities = (
our $logger; our $logger;
our $LOGFILE; our $LOGFILE;
sub new sub new {
{
my $class = shift; my $class = shift;
my $this = {}; my $this = {};
@ -160,12 +159,10 @@ sub new
return $this; return $this;
} }
sub BEGIN sub BEGIN {
{
# Fake the config variables that are used in case they are not defined yet # Fake the config variables that are used in case they are not defined yet
# Only really necessary to support upgrade from previous version # Only really necessary to support upgrade from previous version
if ( !eval('defined($Config{ZM_LOG_DEBUG})') ) if ( !eval('defined($Config{ZM_LOG_DEBUG})') ) {
{
no strict 'subs'; no strict 'subs';
no strict 'refs'; no strict 'refs';
my %dbgConfig = ( my %dbgConfig = (
@ -177,8 +174,7 @@ sub BEGIN
ZM_LOG_DEBUG_LEVEL => 1, ZM_LOG_DEBUG_LEVEL => 1,
ZM_LOG_DEBUG_FILE => "" ZM_LOG_DEBUG_FILE => ""
); );
while ( my ( $name, $value ) = each( %dbgConfig ) ) while ( my ( $name, $value ) = each( %dbgConfig ) ) {
{
*{$name} = sub { $value }; *{$name} = sub { $value };
} }
use strict 'subs'; use strict 'subs';
@ -186,14 +182,12 @@ sub BEGIN
} }
} }
sub DESTROY sub DESTROY {
{
my $this = shift; my $this = shift;
$this->terminate(); $this->terminate();
} }
sub initialise( @ ) sub initialise( @ ) {
{
my $this = shift; my $this = shift;
my %options = @_; my %options = @_;
@ -204,8 +198,7 @@ sub initialise( @ )
my $tempLogFile; my $tempLogFile;
$tempLogFile = $this->{logPath}."/".$this->{id}.".log"; $tempLogFile = $this->{logPath}."/".$this->{id}.".log";
$tempLogFile = $options{logFile} if ( defined($options{logFile}) ); $tempLogFile = $options{logFile} if ( defined($options{logFile}) );
if ( my $logFile = $this->getTargettedEnv('LOG_FILE') ) if ( my $logFile = $this->getTargettedEnv('LOG_FILE') ) {
{
$tempLogFile = $logFile; $tempLogFile = $logFile;
} }
@ -216,33 +209,23 @@ sub initialise( @ )
my $tempSyslogLevel = $this->{syslogLevel}; my $tempSyslogLevel = $this->{syslogLevel};
$tempTermLevel = $options{termLevel} if ( defined($options{termLevel}) ); $tempTermLevel = $options{termLevel} if ( defined($options{termLevel}) );
if ( defined($options{databaseLevel}) ) if ( defined($options{databaseLevel}) ) {
{
$tempDatabaseLevel = $options{databaseLevel}; $tempDatabaseLevel = $options{databaseLevel};
} } else {
else
{
$tempDatabaseLevel = $Config{ZM_LOG_LEVEL_DATABASE}; $tempDatabaseLevel = $Config{ZM_LOG_LEVEL_DATABASE};
} }
if ( defined($options{fileLevel}) ) if ( defined($options{fileLevel}) ) {
{
$tempFileLevel = $options{fileLevel}; $tempFileLevel = $options{fileLevel};
} } else {
else
{
$tempFileLevel = $Config{ZM_LOG_LEVEL_FILE}; $tempFileLevel = $Config{ZM_LOG_LEVEL_FILE};
} }
if ( defined($options{syslogLevel}) ) if ( defined($options{syslogLevel}) ) {
{
$tempSyslogLevel = $options{syslogLevel}; $tempSyslogLevel = $options{syslogLevel};
} } else {
else
{
$tempSyslogLevel = $Config{ZM_LOG_LEVEL_SYSLOG}; $tempSyslogLevel = $Config{ZM_LOG_LEVEL_SYSLOG};
} }
if ( defined($ENV{'LOG_PRINT'}) ) if ( defined($ENV{'LOG_PRINT'}) ) {
{
$tempTermLevel = $ENV{'LOG_PRINT'}? DEBUG : NOLOG; $tempTermLevel = $ENV{'LOG_PRINT'}? DEBUG : NOLOG;
} }
@ -254,22 +237,17 @@ sub initialise( @ )
$tempFileLevel = $level if ( defined($level = $this->getTargettedEnv('LOG_LEVEL_FILE')) ); $tempFileLevel = $level if ( defined($level = $this->getTargettedEnv('LOG_LEVEL_FILE')) );
$tempSyslogLevel = $level if ( defined($level = $this->getTargettedEnv('LOG_LEVEL_SYSLOG')) ); $tempSyslogLevel = $level if ( defined($level = $this->getTargettedEnv('LOG_LEVEL_SYSLOG')) );
if ( $Config{ZM_LOG_DEBUG} ) if ( $Config{ZM_LOG_DEBUG} ) {
{ foreach my $target ( split( /\|/, $Config{ZM_LOG_DEBUG_TARGET} ) ) {
foreach my $target ( split( /\|/, $Config{ZM_LOG_DEBUG_TARGET} ) )
{
if ( $target eq $this->{id} if ( $target eq $this->{id}
|| $target eq "_".$this->{id} || $target eq "_".$this->{id}
|| $target eq $this->{idRoot} || $target eq $this->{idRoot}
|| $target eq "_".$this->{idRoot} || $target eq "_".$this->{idRoot}
|| $target eq "" || $target eq ""
) ) {
{ if ( $Config{ZM_LOG_DEBUG_LEVEL} > NOLOG ) {
if ( $Config{ZM_LOG_DEBUG_LEVEL} > NOLOG )
{
$tempLevel = $this->limit( $Config{ZM_LOG_DEBUG_LEVEL} ); $tempLevel = $this->limit( $Config{ZM_LOG_DEBUG_LEVEL} );
if ( $Config{ZM_LOG_DEBUG_FILE} ne "" ) if ( $Config{ZM_LOG_DEBUG_FILE} ne "" ) {
{
$tempLogFile = $Config{ZM_LOG_DEBUG_FILE}; $tempLogFile = $Config{ZM_LOG_DEBUG_FILE};
$tempFileLevel = $tempLevel; $tempFileLevel = $tempLevel;
} }
@ -303,8 +281,7 @@ sub initialise( @ )
); );
} }
sub terminate sub terminate {
{
my $this = shift; my $this = shift;
return unless ( $this->{initialised} ); return unless ( $this->{initialised} );
$this->syslogLevel( NOLOG ); $this->syslogLevel( NOLOG );
@ -313,8 +290,7 @@ sub terminate
$this->termLevel( NOLOG ); $this->termLevel( NOLOG );
} }
sub reinitialise sub reinitialise {
{
my $this = shift; my $this = shift;
return unless ( $this->{initialised} ); return unless ( $this->{initialised} );
@ -335,8 +311,7 @@ sub reinitialise
$this->databaseLevel( $databaseLevel ) if ( $databaseLevel > NOLOG ); $this->databaseLevel( $databaseLevel ) if ( $databaseLevel > NOLOG );
} }
sub limit sub limit {
{
my $this = shift; my $this = shift;
my $level = shift; my $level = shift;
return( DEBUG ) if ( $level > DEBUG ); return( DEBUG ) if ( $level > DEBUG );
@ -344,55 +319,45 @@ sub limit
return( $level ); return( $level );
} }
sub getTargettedEnv sub getTargettedEnv {
{
my $this = shift; my $this = shift;
my $name = shift; my $name = shift;
my $envName = $name."_".$this->{id}; my $envName = $name."_".$this->{id};
my $value; my $value;
$value = $ENV{$envName} if ( defined($ENV{$envName}) ); $value = $ENV{$envName} if ( defined($ENV{$envName}) );
if ( !defined($value) && $this->{id} ne $this->{idRoot} ) if ( !defined($value) && $this->{id} ne $this->{idRoot} ) {
{
$envName = $name."_".$this->{idRoot}; $envName = $name."_".$this->{idRoot};
$value = $ENV{$envName} if ( defined($ENV{$envName}) ); $value = $ENV{$envName} if ( defined($ENV{$envName}) );
} }
if ( !defined($value) ) if ( !defined($value) ) {
{
$value = $ENV{$name} if ( defined($ENV{$name}) ); $value = $ENV{$name} if ( defined($ENV{$name}) );
} }
if ( defined($value) ) if ( defined($value) ) {
{
( $value ) = $value =~ m/(.*)/; ( $value ) = $value =~ m/(.*)/;
} }
return( $value ); return( $value );
} }
sub fetch sub fetch {
{ if ( !$logger ) {
if ( !$logger )
{
$logger = ZoneMinder::Logger->new(); $logger = ZoneMinder::Logger->new();
$logger->initialise( 'syslogLevel'=>INFO, 'databaseLevel'=>INFO ); $logger->initialise( 'syslogLevel'=>INFO, 'databaseLevel'=>INFO );
} }
return( $logger ); return( $logger );
} }
sub id sub id {
{
my $this = shift; my $this = shift;
my $id = shift; my $id = shift;
if ( defined($id) && $this->{id} ne $id ) if ( defined($id) && $this->{id} ne $id ) {
{
# Remove whitespace # Remove whitespace
$id =~ s/\S//g; $id =~ s/\S//g;
# Replace non-alphanum with underscore # Replace non-alphanum with underscore
$id =~ s/[^a-zA-Z_]/_/g; $id =~ s/[^a-zA-Z_]/_/g;
if ( $this->{id} ne $id ) if ( $this->{id} ne $id ) {
{
$this->{id} = $this->{idRoot} = $id; $this->{id} = $this->{idRoot} = $id;
if ( $id =~ /^([^_]+)_(.+)$/ ) if ( $id =~ /^([^_]+)_(.+)$/ ) {
{
$this->{idRoot} = $1; $this->{idRoot} = $1;
$this->{idArgs} = $2; $this->{idArgs} = $2;
} }
@ -401,12 +366,10 @@ sub id
return( $this->{id} ); return( $this->{id} );
} }
sub level sub level {
{
my $this = shift; my $this = shift;
my $level = shift; my $level = shift;
if ( defined($level) ) if ( defined($level) ) {
{
$this->{level} = $this->limit( $level ); $this->{level} = $this->limit( $level );
$this->{effectiveLevel} = NOLOG; $this->{effectiveLevel} = NOLOG;
$this->{effectiveLevel} = $this->{termLevel} if ( $this->{termLevel} > $this->{effectiveLevel} ); $this->{effectiveLevel} = $this->{termLevel} if ( $this->{termLevel} > $this->{effectiveLevel} );
@ -418,64 +381,48 @@ sub level
return( $this->{level} ); return( $this->{level} );
} }
sub debugOn sub debugOn {
{
my $this = shift; my $this = shift;
return( $this->{effectiveLevel} >= DEBUG ); return( $this->{effectiveLevel} >= DEBUG );
} }
sub trace sub trace {
{
my $this = shift; my $this = shift;
$this->{trace} = $_[0] if ( @_ ); $this->{trace} = $_[0] if ( @_ );
return( $this->{trace} ); return( $this->{trace} );
} }
sub termLevel sub termLevel {
{
my $this = shift; my $this = shift;
my $termLevel = shift; my $termLevel = shift;
if ( defined($termLevel) ) if ( defined($termLevel) ) {
{
$termLevel = NOLOG if ( !$this->{hasTerm} ); $termLevel = NOLOG if ( !$this->{hasTerm} );
$termLevel = $this->limit( $termLevel ); $termLevel = $this->limit( $termLevel );
if ( $this->{termLevel} != $termLevel ) if ( $this->{termLevel} != $termLevel ) {
{
$this->{termLevel} = $termLevel; $this->{termLevel} = $termLevel;
} }
} }
return( $this->{termLevel} ); return( $this->{termLevel} );
} }
sub databaseLevel sub databaseLevel {
{
my $this = shift; my $this = shift;
my $databaseLevel = shift; my $databaseLevel = shift;
if ( defined($databaseLevel) ) if ( defined($databaseLevel) ) {
{
$databaseLevel = $this->limit( $databaseLevel ); $databaseLevel = $this->limit( $databaseLevel );
if ( $this->{databaseLevel} != $databaseLevel ) if ( $this->{databaseLevel} != $databaseLevel ) {
{ if ( $databaseLevel > NOLOG && $this->{databaseLevel} <= NOLOG ) {
if ( $databaseLevel > NOLOG && $this->{databaseLevel} <= NOLOG ) if ( !$this->{dbh} ) {
{
if ( !$this->{dbh} )
{
my $socket; my $socket;
my ( $host, $portOrSocket ) = ( $Config{ZM_DB_HOST} =~ /^([^:]+)(?::(.+))?$/ ); my ( $host, $portOrSocket ) = ( $Config{ZM_DB_HOST} =~ /^([^:]+)(?::(.+))?$/ );
if ( defined($portOrSocket) ) if ( defined($portOrSocket) ) {
{ if ( $portOrSocket =~ /^\// ) {
if ( $portOrSocket =~ /^\// )
{
$socket = ";mysql_socket=".$portOrSocket; $socket = ";mysql_socket=".$portOrSocket;
} } else {
else
{
$socket = ";host=".$host.";port=".$portOrSocket; $socket = ";host=".$host.";port=".$portOrSocket;
} }
} } else {
else
{
$socket = ";host=".$Config{ZM_DB_HOST}; $socket = ";host=".$Config{ZM_DB_HOST};
} }
$this->{dbh} = DBI->connect( "DBI:mysql:database=".$Config{ZM_DB_NAME} $this->{dbh} = DBI->connect( "DBI:mysql:database=".$Config{ZM_DB_NAME}
@ -483,8 +430,7 @@ sub databaseLevel
, $Config{ZM_DB_USER} , $Config{ZM_DB_USER}
, $Config{ZM_DB_PASS} , $Config{ZM_DB_PASS}
); );
if ( !$this->{dbh} ) if ( !$this->{dbh} ) {
{
$databaseLevel = NOLOG; $databaseLevel = NOLOG;
Error( "Unable to write log entries to DB, can't connect to database '" Error( "Unable to write log entries to DB, can't connect to database '"
.$Config{ZM_DB_NAME} .$Config{ZM_DB_NAME}
@ -492,9 +438,7 @@ sub databaseLevel
.$Config{ZM_DB_HOST} .$Config{ZM_DB_HOST}
."'" ."'"
); );
} } else {
else
{
$this->{dbh}->{AutoCommit} = 1; $this->{dbh}->{AutoCommit} = 1;
Fatal( "Can't set AutoCommit on in database connection" ) Fatal( "Can't set AutoCommit on in database connection" )
unless( $this->{dbh}->{AutoCommit} ); unless( $this->{dbh}->{AutoCommit} );
@ -504,11 +448,8 @@ sub databaseLevel
$this->{dbh}->trace( 0 ); $this->{dbh}->trace( 0 );
} }
} }
} } elsif ( $databaseLevel <= NOLOG && $this->{databaseLevel} > NOLOG ) {
elsif ( $databaseLevel <= NOLOG && $this->{databaseLevel} > NOLOG ) if ( $this->{dbh} ) {
{
if ( $this->{dbh} )
{
$this->{dbh}->disconnect(); $this->{dbh}->disconnect();
undef($this->{dbh}); undef($this->{dbh});
} }
@ -519,15 +460,12 @@ sub databaseLevel
return( $this->{databaseLevel} ); return( $this->{databaseLevel} );
} }
sub fileLevel sub fileLevel {
{
my $this = shift; my $this = shift;
my $fileLevel = shift; my $fileLevel = shift;
if ( defined($fileLevel) ) if ( defined($fileLevel) ) {
{
$fileLevel = $this->limit($fileLevel); $fileLevel = $this->limit($fileLevel);
if ( $this->{fileLevel} != $fileLevel ) if ( $this->{fileLevel} != $fileLevel ) {
{
$this->closeFile() if ( $this->{fileLevel} > NOLOG ); $this->closeFile() if ( $this->{fileLevel} > NOLOG );
$this->{fileLevel} = $fileLevel; $this->{fileLevel} = $fileLevel;
$this->openFile() if ( $this->{fileLevel} > NOLOG ); $this->openFile() if ( $this->{fileLevel} > NOLOG );
@ -536,15 +474,12 @@ sub fileLevel
return( $this->{fileLevel} ); return( $this->{fileLevel} );
} }
sub syslogLevel sub syslogLevel {
{
my $this = shift; my $this = shift;
my $syslogLevel = shift; my $syslogLevel = shift;
if ( defined($syslogLevel) ) if ( defined($syslogLevel) ) {
{
$syslogLevel = $this->limit($syslogLevel); $syslogLevel = $this->limit($syslogLevel);
if ( $this->{syslogLevel} != $syslogLevel ) if ( $this->{syslogLevel} != $syslogLevel ) {
{
$this->closeSyslog() if ( $syslogLevel <= NOLOG && $this->{syslogLevel} > NOLOG ); $this->closeSyslog() if ( $syslogLevel <= NOLOG && $this->{syslogLevel} > NOLOG );
$this->openSyslog() if ( $syslogLevel > NOLOG && $this->{syslogLevel} <= NOLOG ); $this->openSyslog() if ( $syslogLevel > NOLOG && $this->{syslogLevel} <= NOLOG );
$this->{syslogLevel} = $syslogLevel; $this->{syslogLevel} = $syslogLevel;
@ -553,70 +488,56 @@ sub syslogLevel
return( $this->{syslogLevel} ); return( $this->{syslogLevel} );
} }
sub openSyslog sub openSyslog {
{
my $this = shift; my $this = shift;
openlog( $this->{id}, "pid", "local1" ); openlog( $this->{id}, "pid", "local1" );
} }
sub closeSyslog sub closeSyslog {
{
my $this = shift; my $this = shift;
#closelog(); #closelog();
} }
sub logFile sub logFile {
{
my $this = shift; my $this = shift;
my $logFile = shift; my $logFile = shift;
if ( $logFile =~ /^(.+)\+$/ ) if ( $logFile =~ /^(.+)\+$/ ) {
{
$this->{logFile} = $1.'.'.$$; $this->{logFile} = $1.'.'.$$;
} } else {
else
{
$this->{logFile} = $logFile; $this->{logFile} = $logFile;
} }
} }
sub openFile sub openFile {
{
my $this = shift; my $this = shift;
if ( open( $LOGFILE, ">>", $this->{logFile} ) ) if ( open( $LOGFILE, ">>", $this->{logFile} ) ) {
{
$LOGFILE->autoflush() if ( $this->{autoFlush} ); $LOGFILE->autoflush() if ( $this->{autoFlush} );
my $webUid = (getpwnam( $Config{ZM_WEB_USER} ))[2]; my $webUid = (getpwnam( $Config{ZM_WEB_USER} ))[2];
my $webGid = (getgrnam( $Config{ZM_WEB_GROUP} ))[2]; my $webGid = (getgrnam( $Config{ZM_WEB_GROUP} ))[2];
if ( $> == 0 ) if ( $> == 0 ) {
{
chown( $webUid, $webGid, $this->{logFile} ) chown( $webUid, $webGid, $this->{logFile} )
or Fatal( "Can't change permissions on log file '" or Fatal( "Can't change permissions on log file '"
.$this->{logFile}."': $!" .$this->{logFile}."': $!"
) )
} }
} } else {
else
{
$this->fileLevel( NOLOG ); $this->fileLevel( NOLOG );
Error( "Can't open log file '".$this->{logFile}."': $!" ); Error( "Can't open log file '".$this->{logFile}."': $!" );
} }
} }
sub closeFile sub closeFile {
{
my $this = shift; my $this = shift;
close( $LOGFILE ) if ( fileno($LOGFILE) ); close( $LOGFILE ) if ( fileno($LOGFILE) );
} }
sub logPrint sub logPrint {
{
my $this = shift; my $this = shift;
my $level = shift; my $level = shift;
my $string = shift; my $string = shift;
if ( $level <= $this->{effectiveLevel} ) if ( $level <= $this->{effectiveLevel} ) {
{
$string =~ s/[\r\n]+$//g; $string =~ s/[\r\n]+$//g;
my $code = $codes{$level}; my $code = $codes{$level};
@ -633,23 +554,19 @@ sub logPrint
, $code , $code
, $string , $string
); );
if ( $this->{trace} ) if ( $this->{trace} ) {
{
$message = Carp::shortmess( $message ); $message = Carp::shortmess( $message );
} } else {
else
{
$message = $message."\n"; $message = $message."\n";
} }
syslog( $priorities{$level}, $code." [%s]", $string ) if ( $level <= $this->{syslogLevel} ) {
if ( $level <= $this->{syslogLevel} ); syslog( $priorities{$level}, $code." [%s]", $string );
}
print( $LOGFILE $message ) if ( $level <= $this->{fileLevel} ); print( $LOGFILE $message ) if ( $level <= $this->{fileLevel} );
if ( $level <= $this->{databaseLevel} ) if ( $level <= $this->{databaseLevel} ) {
{
my $sql = "insert into Logs ( TimeKey, Component, Pid, Level, Code, Message, File, Line ) values ( ?, ?, ?, ?, ?, ?, ?, NULL )"; my $sql = "insert into Logs ( TimeKey, Component, Pid, Level, Code, Message, File, Line ) values ( ?, ?, ?, ?, ?, ?, ?, NULL )";
$this->{sth} = $this->{dbh}->prepare_cached( $sql ); $this->{sth} = $this->{dbh}->prepare_cached( $sql );
if ( !$this->{sth} ) if ( !$this->{sth} ) {
{
$this->{databaseLevel} = NOLOG; $this->{databaseLevel} = NOLOG;
Fatal( "Can't prepare log entry '$sql': ".$this->{dbh}->errstr() ); Fatal( "Can't prepare log entry '$sql': ".$this->{dbh}->errstr() );
} }
@ -661,8 +578,7 @@ sub logPrint
, $string , $string
, $this->{fileName} , $this->{fileName}
); );
if ( !$res ) if ( !$res ) {
{
$this->{databaseLevel} = NOLOG; $this->{databaseLevel} = NOLOG;
Fatal( "Can't execute log entry '$sql': ".$this->{sth}->errstr() ); Fatal( "Can't execute log entry '$sql': ".$this->{sth}->errstr() );
} }
@ -671,27 +587,23 @@ sub logPrint
} }
} }
sub logInit( ;@ ) sub logInit( ;@ ) {
{
my %options = @_ ? @_ : (); my %options = @_ ? @_ : ();
$logger = ZoneMinder::Logger->new() if ( !$logger ); $logger = ZoneMinder::Logger->new() if ( !$logger );
$logger->initialise( %options ); $logger->initialise( %options );
} }
sub logReinit sub logReinit {
{
fetch()->reinitialise(); fetch()->reinitialise();
} }
sub logTerm sub logTerm {
{
return unless ( $logger ); return unless ( $logger );
$logger->terminate(); $logger->terminate();
$logger = undef; $logger = undef;
} }
sub logHupHandler sub logHupHandler {
{
my $savedErrno = $!; my $savedErrno = $!;
return unless( $logger ); return unless( $logger );
fetch()->reinitialise(); fetch()->reinitialise();
@ -699,90 +611,74 @@ sub logHupHandler
$! = $savedErrno; $! = $savedErrno;
} }
sub logSetSignal sub logSetSignal {
{
$SIG{HUP} = \&logHupHandler; $SIG{HUP} = \&logHupHandler;
} }
sub logClearSignal sub logClearSignal {
{
$SIG{HUP} = 'DEFAULT'; $SIG{HUP} = 'DEFAULT';
} }
sub logLevel sub logLevel {
{
return( fetch()->level( @_ ) ); return( fetch()->level( @_ ) );
} }
sub logDebugging sub logDebugging {
{
return( fetch()->debugOn() ); return( fetch()->debugOn() );
} }
sub logTermLevel sub logTermLevel {
{
return( fetch()->termLevel( @_ ) ); return( fetch()->termLevel( @_ ) );
} }
sub logDatabaseLevel sub logDatabaseLevel {
{
return( fetch()->databaseLevel( @_ ) ); return( fetch()->databaseLevel( @_ ) );
} }
sub logFileLevel sub logFileLevel {
{
return( fetch()->fileLevel( @_ ) ); return( fetch()->fileLevel( @_ ) );
} }
sub logSyslogLevel sub logSyslogLevel {
{
return( fetch()->syslogLevel( @_ ) ); return( fetch()->syslogLevel( @_ ) );
} }
sub Mark sub Mark {
{
my $level = shift; my $level = shift;
$level = DEBUG unless( defined($level) ); $level = DEBUG unless( defined($level) );
my $tag = "Mark"; my $tag = "Mark";
fetch()->logPrint( $level, $tag ); fetch()->logPrint( $level, $tag );
} }
sub Dump sub Dump {
{
my $var = shift; my $var = shift;
my $label = shift; my $label = shift;
$label = "VAR" unless( defined($label) ); $label = "VAR" unless( defined($label) );
fetch()->logPrint( DEBUG, Data::Dumper->Dump( [ $var ], [ $label ] ) ); fetch()->logPrint( DEBUG, Data::Dumper->Dump( [ $var ], [ $label ] ) );
} }
sub Debug( @ ) sub Debug( @ ) {
{
fetch()->logPrint( DEBUG, @_ ); fetch()->logPrint( DEBUG, @_ );
} }
sub Info( @ ) sub Info( @ ) {
{
fetch()->logPrint( INFO, @_ ); fetch()->logPrint( INFO, @_ );
} }
sub Warning( @ ) sub Warning( @ ) {
{
fetch()->logPrint( WARNING, @_ ); fetch()->logPrint( WARNING, @_ );
} }
sub Error( @ ) sub Error( @ ) {
{
fetch()->logPrint( ERROR, @_ ); fetch()->logPrint( ERROR, @_ );
} }
sub Fatal( @ ) sub Fatal( @ ) {
{
fetch()->logPrint( FATAL, @_ ); fetch()->logPrint( FATAL, @_ );
exit( -1 ); exit( -1 );
} }
sub Panic( @ ) sub Panic( @ ) {
{
fetch()->logPrint( PANIC, @_ ); fetch()->logPrint( PANIC, @_ );
confess( $_[0] ); confess( $_[0] );
} }

View File

@ -115,13 +115,11 @@ use constant TRIGGER_OFF => 2;
use Storable qw( freeze thaw ); use Storable qw( freeze thaw );
if ( "@ENABLE_MMAP@" eq 'yes' ) # 'yes' if memory is mmapped if ( "@ENABLE_MMAP@" eq 'yes' ) {
{ # 'yes' if memory is mmapped
require ZoneMinder::Memory::Mapped; require ZoneMinder::Memory::Mapped;
ZoneMinder::Memory::Mapped->import(); ZoneMinder::Memory::Mapped->import();
} } else {
else
{
require ZoneMinder::Memory::Shared; require ZoneMinder::Memory::Shared;
ZoneMinder::Memory::Shared->import(); ZoneMinder::Memory::Shared->import();
} }
@ -142,8 +140,7 @@ our $arch = 32 + 32*( qx(uname -m) =~ /64/ );
our $native = $arch/8; our $native = $arch/8;
our $mem_seq = 0; our $mem_seq = 0;
our $mem_data = our $mem_data = {
{
"shared_data" => { "type"=>"SharedData", "seq"=>$mem_seq++, "contents"=> { "shared_data" => { "type"=>"SharedData", "seq"=>$mem_seq++, "contents"=> {
"size" => { "type"=>"uint32", "seq"=>$mem_seq++ }, "size" => { "type"=>"uint32", "seq"=>$mem_seq++ },
"last_write_index" => { "type"=>"uint32", "seq"=>$mem_seq++ }, "last_write_index" => { "type"=>"uint32", "seq"=>$mem_seq++ },
@ -185,73 +182,54 @@ our $mem_data =
our $mem_size = 0; our $mem_size = 0;
our $mem_verified = {}; our $mem_verified = {};
sub zmMemInit sub zmMemInit {
{
my $offset = 0; my $offset = 0;
foreach my $section_data ( sort { $a->{seq} <=> $b->{seq} } values( %$mem_data ) ) foreach my $section_data ( sort { $a->{seq} <=> $b->{seq} } values( %$mem_data ) ) {
{
$section_data->{offset} = $offset; $section_data->{offset} = $offset;
$section_data->{align} = 0; $section_data->{align} = 0;
if ( $section_data->{align} > 1 ) if ( $section_data->{align} > 1 ) {
{
my $rem = $offset % $section_data->{align}; my $rem = $offset % $section_data->{align};
if ( $rem > 0 ) if ( $rem > 0 ) {
{
$offset += ($section_data->{align} - $rem); $offset += ($section_data->{align} - $rem);
} }
} }
foreach my $member_data ( sort { $a->{seq} <=> $b->{seq} } values( %{$section_data->{contents}} ) ) foreach my $member_data ( sort { $a->{seq} <=> $b->{seq} } values( %{$section_data->{contents}} ) ) {
{
if ( $member_data->{type} eq "long" if ( $member_data->{type} eq "long"
|| $member_data->{type} eq "ulong" || $member_data->{type} eq "ulong"
|| $member_data->{type} eq "size_t" || $member_data->{type} eq "size_t"
) ) {
{
$member_data->{size} = $member_data->{align} = $native; $member_data->{size} = $member_data->{align} = $native;
} } elsif ( $member_data->{type} eq "int64"
elsif( $member_data->{type} eq "int64"
|| $member_data->{type} eq "uint64" || $member_data->{type} eq "uint64"
|| $member_data->{type} eq "time_t64" || $member_data->{type} eq "time_t64"
) ) {
{
$member_data->{size} = $member_data->{align} = 8; $member_data->{size} = $member_data->{align} = 8;
} } elsif ( $member_data->{type} eq "int32"
elsif ( $member_data->{type} eq "int32"
|| $member_data->{type} eq "uint32" || $member_data->{type} eq "uint32"
|| $member_data->{type} eq "bool4" || $member_data->{type} eq "bool4"
) ) {
{
$member_data->{size} = $member_data->{align} = 4; $member_data->{size} = $member_data->{align} = 4;
} } elsif ($member_data->{type} eq "int16"
elsif ($member_data->{type} eq "int16"
|| $member_data->{type} eq "uint16" || $member_data->{type} eq "uint16"
) ) {
{
$member_data->{size} = $member_data->{align} = 2; $member_data->{size} = $member_data->{align} = 2;
} } elsif ( $member_data->{type} eq "int8"
elsif ( $member_data->{type} eq "int8"
|| $member_data->{type} eq "uint8" || $member_data->{type} eq "uint8"
|| $member_data->{type} eq "bool1" || $member_data->{type} eq "bool1"
) ) {
{
$member_data->{size} = $member_data->{align} = 1; $member_data->{size} = $member_data->{align} = 1;
} } elsif ( $member_data->{type} =~ /^u?int8\[(\d+)\]$/ ) {
elsif ( $member_data->{type} =~ /^u?int8\[(\d+)\]$/ )
{
$member_data->{size} = $1; $member_data->{size} = $1;
$member_data->{align} = 1; $member_data->{align} = 1;
} } else {
else
{
Fatal( "Unexpected type '".$member_data->{type} Fatal( "Unexpected type '".$member_data->{type}
."' found in shared data definition." ."' found in shared data definition."
); );
} }
if ( $member_data->{align} > 1 && ($offset%$member_data->{align}) > 0 ) if ( $member_data->{align} > 1 && ($offset%$member_data->{align}) > 0 ) {
{
$offset += ($member_data->{align} - ($offset%$member_data->{align})); $offset += ($member_data->{align} - ($offset%$member_data->{align}));
} }
$member_data->{offset} = $offset; $member_data->{offset} = $offset;
@ -265,22 +243,17 @@ sub zmMemInit
&zmMemInit(); &zmMemInit();
sub zmMemVerify sub zmMemVerify {
{
my $monitor = shift; my $monitor = shift;
if ( !zmMemAttach( $monitor, $mem_size ) ) if ( !zmMemAttach( $monitor, $mem_size ) ) {
{
return( undef ); return( undef );
} }
my $mem_key = zmMemKey( $monitor ); my $mem_key = zmMemKey( $monitor );
if ( !defined($mem_verified->{$mem_key}) ) if ( !defined($mem_verified->{$mem_key}) ) {
{
my $sd_size = zmMemRead( $monitor, "shared_data:size", 1 ); my $sd_size = zmMemRead( $monitor, "shared_data:size", 1 );
if ( $sd_size != $mem_data->{shared_data}->{size} ) if ( $sd_size != $mem_data->{shared_data}->{size} ) {
{ if ( $sd_size ) {
if ( $sd_size )
{
Error( "Shared data size conflict in shared_data for monitor " Error( "Shared data size conflict in shared_data for monitor "
.$monitor->{Name} .$monitor->{Name}
.", expected " .", expected "
@ -288,9 +261,7 @@ sub zmMemVerify
.", got " .", got "
.$sd_size .$sd_size
); );
} } else {
else
{
Debug( "Shared data size conflict in shared_data for monitor " Debug( "Shared data size conflict in shared_data for monitor "
.$monitor->{Name} .$monitor->{Name}
.", expected " .", expected "
@ -301,10 +272,8 @@ sub zmMemVerify
return( undef ); return( undef );
} }
my $td_size = zmMemRead( $monitor, "trigger_data:size", 1 ); my $td_size = zmMemRead( $monitor, "trigger_data:size", 1 );
if ( $td_size != $mem_data->{trigger_data}->{size} ) if ( $td_size != $mem_data->{trigger_data}->{size} ) {
{ if ( $td_size ) {
if ( $td_size )
{
Error( "Shared data size conflict in trigger_data for monitor " Error( "Shared data size conflict in trigger_data for monitor "
.$monitor->{Name} .$monitor->{Name}
.", expected " .", expected "
@ -312,9 +281,7 @@ sub zmMemVerify
.", got " .", got "
.$td_size .$td_size
); );
} } else {
else
{
Debug( "Shared data size conflict in trigger_data for monitor " Debug( "Shared data size conflict in trigger_data for monitor "
.$monitor->{Name} .$monitor->{Name}
.", expected " .", expected "
@ -330,24 +297,20 @@ sub zmMemVerify
return( !undef ); return( !undef );
} }
sub zmMemRead sub zmMemRead {
{
my $monitor = shift; my $monitor = shift;
my $fields = shift; my $fields = shift;
my $nocheck = shift; my $nocheck = shift;
if ( !($nocheck || zmMemVerify( $monitor )) ) if ( !($nocheck || zmMemVerify( $monitor )) ) {
{
return( undef ); return( undef );
} }
if ( !ref($fields) ) if ( !ref($fields) ) {
{
$fields = [ $fields ]; $fields = [ $fields ];
} }
my @values; my @values;
foreach my $field ( @$fields ) foreach my $field ( @$fields ) {
{
my ( $section, $element ) = split( /[\/:.]/, $field ); my ( $section, $element ) = split( /[\/:.]/, $field );
Fatal( "Invalid shared data selector '$field'" ) if ( !$section || !$element ); Fatal( "Invalid shared data selector '$field'" ) if ( !$section || !$element );
@ -356,171 +319,113 @@ sub zmMemRead
my $size = $mem_data->{$section}->{contents}->{$element}->{size}; my $size = $mem_data->{$section}->{contents}->{$element}->{size};
my $data = zmMemGet( $monitor, $offset, $size ); my $data = zmMemGet( $monitor, $offset, $size );
if ( !defined($data) ) if ( !defined($data) ) {
{
Error( "Unable to read '$field' from memory for monitor ".$monitor->{Id} ); Error( "Unable to read '$field' from memory for monitor ".$monitor->{Id} );
zmMemInvalidate( $monitor ); zmMemInvalidate( $monitor );
return( undef ); return( undef );
} }
my $value; my $value;
if ( $type eq "long" ) if ( $type eq "long" ) {
{
( $value ) = unpack( "l!", $data ); ( $value ) = unpack( "l!", $data );
} } elsif ( $type eq "ulong" || $type eq "size_t" ) {
elsif ( $type eq "ulong" || $type eq "size_t" )
{
( $value ) = unpack( "L!", $data ); ( $value ) = unpack( "L!", $data );
} } elsif ( $type eq "int64" || $type eq "time_t64" ) {
elsif ( $type eq "int64" || $type eq "time_t64" )
{
# The "q" type is only available on 64bit platforms, so use native. # The "q" type is only available on 64bit platforms, so use native.
( $value ) = unpack( "l!", $data ); ( $value ) = unpack( "l!", $data );
} } elsif ( $type eq "uint64" ) {
elsif ( $type eq "uint64" )
{
# The "q" type is only available on 64bit platforms, so use native. # The "q" type is only available on 64bit platforms, so use native.
( $value ) = unpack( "L!", $data ); ( $value ) = unpack( "L!", $data );
} } elsif ( $type eq "int32" ) {
elsif ( $type eq "int32" )
{
( $value ) = unpack( "l", $data ); ( $value ) = unpack( "l", $data );
} } elsif ( $type eq "uint32" || $type eq "bool4" ) {
elsif ( $type eq "uint32" || $type eq "bool4" )
{
( $value ) = unpack( "L", $data ); ( $value ) = unpack( "L", $data );
} } elsif ( $type eq "int16" ) {
elsif ( $type eq "int16" )
{
( $value ) = unpack( "s", $data ); ( $value ) = unpack( "s", $data );
} } elsif ( $type eq "uint16" ) {
elsif ( $type eq "uint16" )
{
( $value ) = unpack( "S", $data ); ( $value ) = unpack( "S", $data );
} } elsif ( $type eq "int8" ) {
elsif ( $type eq "int8" )
{
( $value ) = unpack( "c", $data ); ( $value ) = unpack( "c", $data );
} } elsif ( $type eq "uint8" || $type eq "bool1" ) {
elsif ( $type eq "uint8" || $type eq "bool1" )
{
( $value ) = unpack( "C", $data ); ( $value ) = unpack( "C", $data );
} } elsif ( $type =~ /^int8\[\d+\]$/ ) {
elsif ( $type =~ /^int8\[\d+\]$/ )
{
( $value ) = unpack( "Z".$size, $data ); ( $value ) = unpack( "Z".$size, $data );
} } elsif ( $type =~ /^uint8\[\d+\]$/ ) {
elsif ( $type =~ /^uint8\[\d+\]$/ )
{
( $value ) = unpack( "C".$size, $data ); ( $value ) = unpack( "C".$size, $data );
} } else {
else
{
Fatal( "Unexpected type '".$type."' found for '".$field."'" ); Fatal( "Unexpected type '".$type."' found for '".$field."'" );
} }
push( @values, $value ); push( @values, $value );
} }
if ( wantarray() ) if ( wantarray() ) {
{
return( @values ) return( @values )
} }
return( $values[0] ); return( $values[0] );
} }
sub zmMemInvalidate sub zmMemInvalidate {
{
my $monitor = shift; my $monitor = shift;
my $mem_key = zmMemKey($monitor); my $mem_key = zmMemKey($monitor);
if ( $mem_key ) if ( $mem_key ) {
{
delete $mem_verified->{$mem_key}; delete $mem_verified->{$mem_key};
zmMemDetach( $monitor ); zmMemDetach( $monitor );
} }
} }
sub zmMemTidy sub zmMemTidy {
{
zmMemClean(); zmMemClean();
} }
sub zmMemWrite sub zmMemWrite {
{
my $monitor = shift; my $monitor = shift;
my $field_values = shift; my $field_values = shift;
my $nocheck = shift; my $nocheck = shift;
if ( !($nocheck || zmMemVerify( $monitor )) ) if ( !($nocheck || zmMemVerify( $monitor )) ) {
{
return( undef ); return( undef );
} }
while ( my ( $field, $value ) = each( %$field_values ) ) while ( my ( $field, $value ) = each( %$field_values ) ) {
{
my ( $section, $element ) = split( /[\/:.]/, $field ); my ( $section, $element ) = split( /[\/:.]/, $field );
Fatal( "Invalid shared data selector '$field'" ) if ( !$section || !$element ) {
if ( !$section || !$element ); Fatal( "Invalid shared data selector '$field'" );
}
my $offset = $mem_data->{$section}->{contents}->{$element}->{offset}; my $offset = $mem_data->{$section}->{contents}->{$element}->{offset};
my $type = $mem_data->{$section}->{contents}->{$element}->{type}; my $type = $mem_data->{$section}->{contents}->{$element}->{type};
my $size = $mem_data->{$section}->{contents}->{$element}->{size}; my $size = $mem_data->{$section}->{contents}->{$element}->{size};
my $data; my $data;
if ( $type eq "long" ) if ( $type eq "long" ) {
{
$data = pack( "l!", $value ); $data = pack( "l!", $value );
} } elsif ( $type eq "ulong" || $type eq "size_t" ) {
elsif ( $type eq "ulong" || $type eq "size_t" )
{
$data = pack( "L!", $value ); $data = pack( "L!", $value );
} } elsif ( $type eq "int64" || $type eq "time_t64" ) {
elsif ( $type eq "int64" || $type eq "time_t64" )
{
# The "q" type is only available on 64bit platforms, so use native. # The "q" type is only available on 64bit platforms, so use native.
$data = pack( "l!", $value ); $data = pack( "l!", $value );
} } elsif ( $type eq "uint64" ) {
elsif ( $type eq "uint64" )
{
# The "q" type is only available on 64bit platforms, so use native. # The "q" type is only available on 64bit platforms, so use native.
$data = pack( "L!", $value ); $data = pack( "L!", $value );
} } elsif ( $type eq "int32" ) {
elsif ( $type eq "int32" )
{
$data = pack( "l", $value ); $data = pack( "l", $value );
} } elsif ( $type eq "uint32" || $type eq "bool4" ) {
elsif ( $type eq "uint32" || $type eq "bool4" )
{
$data = pack( "L", $value ); $data = pack( "L", $value );
} } elsif ( $type eq "int16" ) {
elsif ( $type eq "int16" )
{
$data = pack( "s", $value ); $data = pack( "s", $value );
} } elsif ( $type eq "uint16" ) {
elsif ( $type eq "uint16" )
{
$data = pack( "S", $value ); $data = pack( "S", $value );
} } elsif ( $type eq "int8" ) {
elsif ( $type eq "int8" )
{
$data = pack( "c", $value ); $data = pack( "c", $value );
} } elsif ( $type eq "uint8" || $type eq "bool1" ) {
elsif ( $type eq "uint8" || $type eq "bool1" )
{
$data = pack( "C", $value ); $data = pack( "C", $value );
} } elsif ( $type =~ /^int8\[\d+\]$/ ) {
elsif ( $type =~ /^int8\[\d+\]$/ )
{
$data = pack( "Z".$size, $value ); $data = pack( "Z".$size, $value );
} } elsif ( $type =~ /^uint8\[\d+\]$/ ) {
elsif ( $type =~ /^uint8\[\d+\]$/ )
{
$data = pack( "C".$size, $value ); $data = pack( "C".$size, $value );
} } else {
else
{
Fatal( "Unexpected type '".$type."' found for '".$field."'" ); Fatal( "Unexpected type '".$type."' found for '".$field."'" );
} }
if ( !zmMemPut( $monitor, $offset, $size, $data ) ) if ( !zmMemPut( $monitor, $offset, $size, $data ) ) {
{
Error( "Unable to write '$value' to '$field' in memory for monitor " Error( "Unable to write '$value' to '$field' in memory for monitor "
.$monitor->{Id} .$monitor->{Id}
); );
@ -531,52 +436,45 @@ sub zmMemWrite
return( !undef ); return( !undef );
} }
sub zmGetMonitorState sub zmGetMonitorState {
{
my $monitor = shift; my $monitor = shift;
return( zmMemRead( $monitor, "shared_data:state" ) ); return( zmMemRead( $monitor, "shared_data:state" ) );
} }
sub zmGetAlarmLocation sub zmGetAlarmLocation {
{
my $monitor = shift; my $monitor = shift;
return( zmMemRead( $monitor, [ "shared_data:alarm_x", "shared_data:alarm_y" ] ) ); return( zmMemRead( $monitor, [ "shared_data:alarm_x", "shared_data:alarm_y" ] ) );
} }
sub zmSetControlState sub zmSetControlState {
{
my $monitor = shift; my $monitor = shift;
my $control_state = shift; my $control_state = shift;
zmMemWrite( $monitor, { "shared_data:control_state" => $control_state } ); zmMemWrite( $monitor, { "shared_data:control_state" => $control_state } );
} }
sub zmGetControlState sub zmGetControlState {
{
my $monitor = shift; my $monitor = shift;
return( zmMemRead( $monitor, "shared_data:control_state" ) ); return( zmMemRead( $monitor, "shared_data:control_state" ) );
} }
sub zmSaveControlState sub zmSaveControlState {
{
my $monitor = shift; my $monitor = shift;
my $control_state = shift; my $control_state = shift;
zmSetControlState( $monitor, freeze( $control_state ) ); zmSetControlState( $monitor, freeze( $control_state ) );
} }
sub zmRestoreControlState sub zmRestoreControlState {
{
my $monitor = shift; my $monitor = shift;
return( thaw( zmGetControlState( $monitor ) ) ); return( thaw( zmGetControlState( $monitor ) ) );
} }
sub zmIsAlarmed sub zmIsAlarmed {
{
my $monitor = shift; my $monitor = shift;
my $state = zmGetMonitorState( $monitor ); my $state = zmGetMonitorState( $monitor );
@ -584,8 +482,7 @@ sub zmIsAlarmed
return( $state == STATE_ALARM ); return( $state == STATE_ALARM );
} }
sub zmInAlarm sub zmInAlarm {
{
my $monitor = shift; my $monitor = shift;
my $state = zmGetMonitorState( $monitor ); my $state = zmGetMonitorState( $monitor );
@ -593,8 +490,7 @@ sub zmInAlarm
return( $state == STATE_ALARM || $state == STATE_ALERT ); return( $state == STATE_ALARM || $state == STATE_ALERT );
} }
sub zmHasAlarmed sub zmHasAlarmed {
{
my $monitor = shift; my $monitor = shift;
my $last_event_id = shift; my $last_event_id = shift;
@ -603,47 +499,39 @@ sub zmHasAlarmed
] ]
); );
if ( $state == STATE_ALARM || $state == STATE_ALERT ) if ( $state == STATE_ALARM || $state == STATE_ALERT ) {
{
return( $last_event ); return( $last_event );
} } elsif( $last_event != $last_event_id ) {
elsif( $last_event != $last_event_id )
{
return( $last_event ); return( $last_event );
} }
return( undef ); return( undef );
} }
sub zmGetLastEvent sub zmGetLastEvent {
{
my $monitor = shift; my $monitor = shift;
return( zmMemRead( $monitor, "shared_data:last_event" ) ); return( zmMemRead( $monitor, "shared_data:last_event" ) );
} }
sub zmGetLastWriteTime sub zmGetLastWriteTime {
{
my $monitor = shift; my $monitor = shift;
return( zmMemRead( $monitor, "shared_data:last_write_time" ) ); return( zmMemRead( $monitor, "shared_data:last_write_time" ) );
} }
sub zmGetLastReadTime sub zmGetLastReadTime {
{
my $monitor = shift; my $monitor = shift;
return( zmMemRead( $monitor, "shared_data:last_read_time" ) ); return( zmMemRead( $monitor, "shared_data:last_read_time" ) );
} }
sub zmGetMonitorActions sub zmGetMonitorActions {
{
my $monitor = shift; my $monitor = shift;
return( zmMemRead( $monitor, "shared_data:action" ) ); return( zmMemRead( $monitor, "shared_data:action" ) );
} }
sub zmMonitorEnable sub zmMonitorEnable {
{
my $monitor = shift; my $monitor = shift;
my $action = zmMemRead( $monitor, "shared_data:action" ); my $action = zmMemRead( $monitor, "shared_data:action" );
@ -651,8 +539,7 @@ sub zmMonitorEnable
zmMemWrite( $monitor, { "shared_data:action" => $action } ); zmMemWrite( $monitor, { "shared_data:action" => $action } );
} }
sub zmMonitorDisable sub zmMonitorDisable {
{
my $monitor = shift; my $monitor = shift;
my $action = zmMemRead( $monitor, "shared_data:action" ); my $action = zmMemRead( $monitor, "shared_data:action" );
@ -660,8 +547,7 @@ sub zmMonitorDisable
zmMemWrite( $monitor, { "shared_data:action" => $action } ); zmMemWrite( $monitor, { "shared_data:action" => $action } );
} }
sub zmMonitorSuspend sub zmMonitorSuspend {
{
my $monitor = shift; my $monitor = shift;
my $action = zmMemRead( $monitor, "shared_data:action" ); my $action = zmMemRead( $monitor, "shared_data:action" );
@ -669,8 +555,7 @@ sub zmMonitorSuspend
zmMemWrite( $monitor, { "shared_data:action" => $action } ); zmMemWrite( $monitor, { "shared_data:action" => $action } );
} }
sub zmMonitorResume sub zmMonitorResume {
{
my $monitor = shift; my $monitor = shift;
my $action = zmMemRead( $monitor, "shared_data:action" ); my $action = zmMemRead( $monitor, "shared_data:action" );
@ -678,15 +563,13 @@ sub zmMonitorResume
zmMemWrite( $monitor, { "shared_data:action" => $action } ); zmMemWrite( $monitor, { "shared_data:action" => $action } );
} }
sub zmGetTriggerState sub zmGetTriggerState {
{
my $monitor = shift; my $monitor = shift;
return( zmMemRead( $monitor, "trigger_data:trigger_state" ) ); return( zmMemRead( $monitor, "trigger_data:trigger_state" ) );
} }
sub zmTriggerEventOn sub zmTriggerEventOn {
{
my $monitor = shift; my $monitor = shift;
my $score = shift; my $score = shift;
my $cause = shift; my $cause = shift;
@ -701,11 +584,10 @@ sub zmTriggerEventOn
$values->{"trigger_data:trigger_showtext"} = $showtext if ( defined($showtext) ); $values->{"trigger_data:trigger_showtext"} = $showtext if ( defined($showtext) );
$values->{"trigger_data:trigger_state"} = TRIGGER_ON; # Write state last so event not read incomplete $values->{"trigger_data:trigger_state"} = TRIGGER_ON; # Write state last so event not read incomplete
zmMemWrite( $monitor, $values ); zmMemWrite( $monitor, $values );
} }
sub zmTriggerEventOff sub zmTriggerEventOff {
{
my $monitor = shift; my $monitor = shift;
my $values = { my $values = {
@ -719,8 +601,7 @@ sub zmTriggerEventOff
zmMemWrite( $monitor, $values ); zmMemWrite( $monitor, $values );
} }
sub zmTriggerEventCancel sub zmTriggerEventCancel {
{
my $monitor = shift; my $monitor = shift;
my $values = { my $values = {
@ -734,8 +615,7 @@ sub zmTriggerEventCancel
zmMemWrite( $monitor, $values ); zmMemWrite( $monitor, $values );
} }
sub zmTriggerShowtext sub zmTriggerShowtext {
{
my $monitor = shift; my $monitor = shift;
my $showtext = shift; my $showtext = shift;
@ -758,11 +638,9 @@ ZoneMinder::MappedMem - ZoneMinder Mapped Memory access module
use ZoneMinder::MappedMem; use ZoneMinder::MappedMem;
use ZoneMinder::MappedMem qw(:all); use ZoneMinder::MappedMem qw(:all);
if ( zmMemVerify( $monitor ) ) if ( zmMemVerify( $monitor ) ) {
{
$state = zmGetMonitorState( $monitor ); $state = zmGetMonitorState( $monitor );
if ( $state == STATE_ALARM ) if ( $state == STATE_ALARM ) {
{
... ...
} }
} }

View File

@ -87,6 +87,10 @@ while( 1 )
{ {
next if $monitor->{Function} eq 'None'; next if $monitor->{Function} eq 'None';
my $restart = 0; my $restart = 0;
# Prevent open handles building up if we have connect to shared memory
# Many of our error checks below do a next without closing the mem handle.
# zmMemInvalidate will just return of nothing is open, so we can just do this here.
zmMemInvalidate( $monitor );
if ( zmMemVerify( $monitor ) if ( zmMemVerify( $monitor )
&& zmMemRead( $monitor, "shared_data:valid" ) && zmMemRead( $monitor, "shared_data:valid" )
) )

View File

@ -3989,20 +3989,32 @@ void MonitorStream::runStream()
// 15 is the max length for the swap path suffix, /zmswap-whatever, assuming max 6 digits for monitor id // 15 is the max length for the swap path suffix, /zmswap-whatever, assuming max 6 digits for monitor id
const int max_swap_len_suffix = 15; const int max_swap_len_suffix = 15;
int swap_path_length = strlen(config.path_swap)+1; // +1 for NULL terminator int swap_path_length = strlen(config.path_swap) + 1; // +1 for NULL terminator
int subfolder1_length = snprintf(NULL, 0, "/zmswap-m%d", monitor->Id() ) + 1;
int subfolder2_length = snprintf(NULL, 0, "/zmswap-q%06d", connkey ) + 1;
int total_swap_path_length = swap_path_length + subfolder1_length + subfolder2_length;
if ( connkey && playback_buffer > 0 ) { if ( connkey && playback_buffer > 0 ) {
if ( swap_path_length + max_swap_len_suffix > PATH_MAX ) { if ( total_swap_path_length + max_swap_len_suffix > PATH_MAX ) {
Error( "Swap Path is too long. %d > %d ", swap_path_length+max_swap_len_suffix, PATH_MAX ); Error( "Swap Path is too long. %d > %d ", total_swap_path_length+max_swap_len_suffix, PATH_MAX );
} else { } else {
swap_path = (char *)malloc( swap_path_length+max_swap_len_suffix ); swap_path = (char *)malloc( total_swap_path_length+max_swap_len_suffix );
Debug( 3, "Checking swap image path %s", config.path_swap );
strncpy( swap_path, config.path_swap, swap_path_length ); strncpy( swap_path, config.path_swap, swap_path_length );
Debug( 3, "Checking swap path folder: %s", swap_path );
if ( checkSwapPath( swap_path, false ) ) { if ( checkSwapPath( swap_path, false ) ) {
snprintf( &(swap_path[swap_path_length]), max_swap_len_suffix, "/zmswap-m%d", monitor->Id() ); // Append the subfolder name /zmswap-m{monitor-id} to the end of swap_path
int ndx = swap_path_length - 1; // Array index of the NULL terminator
snprintf( &(swap_path[ndx]), subfolder1_length, "/zmswap-m%d", monitor->Id() );
Debug( 4, "Checking swap path subfolder: %s", swap_path );
if ( checkSwapPath( swap_path, true ) ) { if ( checkSwapPath( swap_path, true ) ) {
snprintf( &(swap_path[swap_path_length]), max_swap_len_suffix, "/zmswap-q%06d", connkey ); // Append the subfolder name /zmswap-q{connection key} to the end of swap_path
ndx = swap_path_length+subfolder1_length - 2; // Array index of the NULL terminator
snprintf( &(swap_path[ndx]), subfolder2_length, "/zmswap-q%06d", connkey );
Debug( 4, "Checking swap path subfolder: %s", swap_path );
if ( checkSwapPath( swap_path, true ) ) { if ( checkSwapPath( swap_path, true ) ) {
buffered_playback = true; buffered_playback = true;
} }
@ -4204,9 +4216,6 @@ void MonitorStream::runStream()
} }
if ( buffered_playback ) if ( buffered_playback )
{ {
char swap_path[PATH_MAX] = "";
snprintf( swap_path, sizeof(swap_path), "%s/zmswap-m%d/zmswap-q%06d", config.path_swap, monitor->Id(), connkey );
Debug( 1, "Cleaning swap files from %s", swap_path ); Debug( 1, "Cleaning swap files from %s", swap_path );
struct stat stat_buf; struct stat stat_buf;
if ( stat( swap_path, &stat_buf ) < 0 ) if ( stat( swap_path, &stat_buf ) < 0 )

View File

@ -19,6 +19,7 @@
// //
// ZoneMinder Dutch Translation by Alco (a.k. nightcrawler) // ZoneMinder Dutch Translation by Alco (a.k. nightcrawler)
// Updated by Bernardus Jansen (bajansen)
// Notes for Translators // Notes for Translators
// 0. Get some credit, put your name in the line above (optional) // 0. Get some credit, put your name in the line above (optional)
@ -72,37 +73,37 @@
// Simple String Replacements // Simple String Replacements
$SLANG = array( $SLANG = array(
'24BitColour' => '24 bits kleuren', '24BitColour' => '24 bits kleuren',
'32BitColour' => '32 bit colour', // Added - 2015-04-18 '32BitColour' => '32 bits kleuren',
'8BitGrey' => '8 bits grijstinten', '8BitGrey' => '8 bits grijstinten',
'Action' => 'Actie', 'Action' => 'Actie',
'Actual' => 'Aktueel', 'Actual' => 'Origineel',
'AddNewControl' => 'Nieuwe controle toevoegen', 'AddNewControl' => 'Nieuwe controle toevoegen',
'AddNewMonitor' => 'Nieuwe monitor toevoegen', 'AddNewMonitor' => 'Nieuwe monitor toevoegen',
'AddNewUser' => 'Nieuwe gebruiker toevoegen', 'AddNewUser' => 'Nieuwe gebruiker toevoegen',
'AddNewZone' => 'Nieuw gebied toevoegen', 'AddNewZone' => 'Nieuw gebied toevoegen',
'Alarm' => 'Alarm', 'Alarm' => 'Alarm',
'AlarmBrFrames' => 'Alarm<br/>Frames', 'AlarmBrFrames' => 'Alarm-<br/>frames',
'AlarmFrame' => 'Alarm Frame', 'AlarmFrame' => 'Alarmframe',
'AlarmFrameCount' => 'Alarm Frame Aantal', 'AlarmFrameCount' => 'Aantal alarmframes',
'AlarmLimits' => 'Alarm Limieten', 'AlarmLimits' => 'Alarmlimieten',
'AlarmMaximumFPS' => 'Alarm Maximum FPS', 'AlarmMaximumFPS' => 'Alarm Maximum FPS',
'AlarmPx' => 'Alarm Px', 'AlarmPx' => 'Alarm Px',
'AlarmRGBUnset' => 'U moet een RGB alarm kleur keizen', 'AlarmRGBUnset' => 'U moet een RGB alarmkleur kiezen',
'AlarmRefImageBlendPct'=> 'Alarm Reference Image Blend %ge', // Added - 2015-04-18 'AlarmRefImageBlendPct'=> 'Alarm Reference Image Blend %ge',
'Alert' => 'Waarschuwing', 'Alert' => 'Alert',
'All' => 'Alle', 'All' => 'Alle',
'AnalysisFPS' => 'Analysis FPS', // Added - 2015-07-22 'AnalysisFPS' => 'Analyse FPS',
'AnalysisUpdateDelay' => 'Analysis Update Delay', // Added - 2015-07-23 'AnalysisUpdateDelay' => 'Analyse Update Vertraging',
'Apply' => 'Voer uit', 'Apply' => 'Toepassen',
'ApplyingStateChange' => 'Status verandering aan het uitvoeren', 'ApplyingStateChange' => 'Statusverandering wordt uitgevoerd',
'ArchArchived' => 'Alleen gearchiveerd', 'ArchArchived' => 'Alleen gearchiveerd',
'ArchUnarchived' => 'Alleen ongearchiveerd', 'ArchUnarchived' => 'Alleen ongearchiveerd',
'Archive' => 'Archief', 'Archive' => 'Archiveren',
'Archived' => 'Archived', 'Archived' => 'Gearchiveerd',
'Area' => 'Gebied', 'Area' => 'Gebied',
'AreaUnits' => 'Gebied (px/%)', 'AreaUnits' => 'Gebied (px/%)',
'AttrAlarmFrames' => 'Alarm frames', 'AttrAlarmFrames' => 'Alarmframes',
'AttrArchiveStatus' => 'Archief status', 'AttrArchiveStatus' => 'Archiefstatus',
'AttrAvgScore' => 'Gem. score', 'AttrAvgScore' => 'Gem. score',
'AttrCause' => 'Oorzaak', 'AttrCause' => 'Oorzaak',
'AttrDate' => 'Datum', 'AttrDate' => 'Datum',
@ -117,55 +118,55 @@ $SLANG = array(
'AttrMonitorName' => 'Monitor Naam', 'AttrMonitorName' => 'Monitor Naam',
'AttrName' => 'Naam', 'AttrName' => 'Naam',
'AttrNotes' => 'Notities', 'AttrNotes' => 'Notities',
'AttrSystemLoad' => 'System Belasting', 'AttrSystemLoad' => 'Systembelasting',
'AttrTime' => 'Tijd', 'AttrTime' => 'Tijd',
'AttrTotalScore' => 'Totale Score', 'AttrTotalScore' => 'Totale Score',
'AttrWeekday' => 'Weekdag', 'AttrWeekday' => 'Weekdag',
'Auto' => 'Auto', 'Auto' => 'Auto',
'AutoStopTimeout' => 'Auto Stop Timeout', 'AutoStopTimeout' => 'Auto Stop Timeout',
'Available' => 'Beschikbaar', // Added - 2009-03-31 'Available' => 'Beschikbaar',
'AvgBrScore' => 'Gem.<br/>score', 'AvgBrScore' => 'Gem.<br/>score',
'Background' => 'Achtergrond', 'Background' => 'Achtergrond',
'BackgroundFilter' => 'Run filter in achtergrond', 'BackgroundFilter' => 'Voer filter uit op achtergrond',
'BadAlarmFrameCount' => 'Alarm frame moet een getal zijn van 1 of meer', 'BadAlarmFrameCount' => 'Aantal alarmframes moet een getal zijn van 1 of meer',
'BadAlarmMaxFPS' => 'Alarm Maximum FPS moet een positiev getal zijn of een floating point waarde', 'BadAlarmMaxFPS' => 'Alarm Maximum FPS moet een positieve waarde zijn',
'BadAnalysisFPS' => 'Analysis FPS must be a positive integer or floating point value', // Added - 2015-07-22 'BadAnalysisFPS' => 'Analyse FPS moet een positieve waarde zijn',
'BadAnalysisUpdateDelay'=> 'Analysis update delay must be set to an integer of zero or more', // Added - 2015-07-23 'BadAnalysisUpdateDelay'=> 'Analyse updatevertraging moet een getal van nul of groter zijn',
'BadChannel' => 'Kanaal moet een getal zijn van 1 of meer', 'BadChannel' => 'Kanaal moet een getal zijn van 1 of meer',
'BadColours' => 'Target colour must be set to a valid value', // Added - 2015-04-18 'BadColours' => 'Doelkleur moet een geldige waarde zijn',
'BadDevice' => 'Apparaat moet een bestaande waarde krijgen', 'BadDevice' => 'Apparaat moet een geldige waarde zijn',
'BadFPSReportInterval' => 'FPS rapport interval buffer en aantal moet een nummer groter dan nul zijn', 'BadFPSReportInterval' => 'FPS rapport interval buffer aantal moet een getal groter dan nul zijn',
'BadFormat' => 'Formaat moet een nummer nul of groter zijn', 'BadFormat' => 'Formaat moet een getal van nul of groter zijn',
'BadFrameSkip' => 'Frame skip aantal moet een nummer nul of groter zijn', 'BadFrameSkip' => 'Frame skip aantal moet een getal van nul of groter zijn',
'BadHeight' => 'Hoogte moet een geldige waarde zijn', 'BadHeight' => 'Hoogte moet een geldige waarde zijn',
'BadHost' => 'Host moet een juiste address or hostname zijn, laat http:// weg ', 'BadHost' => 'Host moet een juist adres of hostname zijn, laat http:// weg',
'BadImageBufferCount' => 'Foto buffer groote moet een nummer 10 of groter zijn', 'BadImageBufferCount' => 'Buffergrootte moet een getal van 10 of groter zijn',
'BadLabelX' => 'Label X co-ordinate moet een nummer nul of groter zijn', 'BadLabelX' => 'Label X-coördinaat moet een getal van nul of groter zijn',
'BadLabelY' => 'Label Y co-ordinate moet een nummer nul of groter zijn', 'BadLabelY' => 'Label Y-coördinaat moet een getal van nul of groter zijn',
'BadMaxFPS' => 'Maximum FPS moet een positieve integer of floating point waarde zijn', 'BadMaxFPS' => 'Maximum FPS moet een positieve waarde zijn',
'BadMotionFrameSkip' => 'Motion Frame skip count must be an integer of zero or more', 'BadMotionFrameSkip' => 'Motion Frame skip count dient een getal van nul of groter te zijn',
'BadNameChars' => 'Namen mogen alleen alpha numerieke karakters, ruimten bevatten plus hyphens en underscores', 'BadNameChars' => 'Namen mogen alleen letters en cijfers bevatten plus spaties, streepjes, en liggende streepjes',
'BadPalette' => 'Palette moet een geldige waarde zijn', // Added - 2009-03-31 'BadPalette' => 'Palet moet een geldige waarde zijn',
'BadPath' => 'Pad moet een geldige waarde zijn', 'BadPath' => 'Pad moet een geldige waarde zijn',
'BadPort' => 'Port moet een geldige nummer zijn', 'BadPort' => 'Poort moet een geldige nummer zijn',
'BadPostEventCount' => 'Post gebeurtenis foto aantal moet een geldige waarde van nul of groter zijn', 'BadPostEventCount' => 'Aantal post-gebeurtenisframes moet een getal van nul of groter zijn',
'BadPreEventCount' => 'Pre gebeurtenis aantal moe minimaal nul en lager dan de buffert grote', 'BadPreEventCount' => 'Aantal pre-gebeurtenisframes moet een getal zijn van minimaal nul en minder dan de buffergrootte',
'BadRefBlendPerc' => 'Reference blend percentage moet een geldige waarde van nul of groter zijn', 'BadRefBlendPerc' => 'Reference blend percentage moet een geldige waarde van nul of groter zijn',
'BadSectionLength' => 'Selectie lengte moet een integer van 30 of meer zijn', 'BadSectionLength' => 'Sectielengte moet een getal van 30 of groter zijn',
'BadSignalCheckColour' => 'Signaal controle kleur moet een geldige RGB waarde zijn', 'BadSignalCheckColour' => 'Signaalcontrolekleur moet een geldige RGB waarde zijn',
'BadStreamReplayBuffer'=> 'Stream replay buffer moet een geldige waarde van nul of groter zijn', 'BadStreamReplayBuffer'=> 'Stream replay buffer moet een geldige waarde van nul of groter zijn',
'BadWarmupCount' => 'Warmop frames moet een geldige waarde van nul of groter zijn', 'BadWarmupCount' => 'Opwarm frames moet een geldig getal van nul of groter zijn',
'BadWebColour' => 'Web kleur moeten een geldige webkleurwaarde bevatten', 'BadWebColour' => 'Webkleur moet een geldige webkleurwaarde bevatten',
'BadWidth' => 'Breedte moet ingevuld worden', 'BadWidth' => 'Breedte moet een geldige waarde zijn',
'Bandwidth' => 'Bandbreedte', 'Bandwidth' => 'Bandbreedte',
'BandwidthHead' => 'Bandwidth', // This is the end of the bandwidth status on the top of the console, different in many language due to phrasing 'BandwidthHead' => 'bandbreedte', // This is the end of the bandwidth status on the top of the console, different in many language due to phrasing
'BlobPx' => 'Blob px', 'BlobPx' => 'Blob px',
'BlobSizes' => 'Blob grootte', 'BlobSizes' => 'Blobgrootte',
'Blobs' => 'Blobs', 'Blobs' => 'Blobs',
'Brightness' => 'Helderheid', 'Brightness' => 'Helderheid',
'Buffer' => 'Buffer', // Added - 2015-04-18 'Buffer' => 'Buffer',
'Buffers' => 'Buffers', 'Buffers' => 'Buffers',
'CSSDescription' => 'Change the default css for this computer', // Added - 2015-04-18 'CSSDescription' => 'Wijzig de standaard CSS voor deze computer',
'CanAutoFocus' => 'Can Auto Focus', 'CanAutoFocus' => 'Can Auto Focus',
'CanAutoGain' => 'Can Auto Gain', 'CanAutoGain' => 'Can Auto Gain',
'CanAutoIris' => 'Can Auto Iris', 'CanAutoIris' => 'Can Auto Iris',
@ -204,138 +205,138 @@ $SLANG = array(
'CanZoomAbs' => 'Can Zoom Absoluut', 'CanZoomAbs' => 'Can Zoom Absoluut',
'CanZoomCon' => 'Can Zoom Continue', 'CanZoomCon' => 'Can Zoom Continue',
'CanZoomRel' => 'Can Zoom Relatief', 'CanZoomRel' => 'Can Zoom Relatief',
'Cancel' => 'Afbreken', 'Cancel' => 'Annuleren',
'CancelForcedAlarm' => 'Afbreken geforceerd alarm', 'CancelForcedAlarm' => 'Geforceerd alarm annuleren',
'CaptureHeight' => 'Opname hoogte', 'CaptureHeight' => 'Hoogte van opname',
'CaptureMethod' => 'Opname Methode', // Added - 2009-02-08 'CaptureMethod' => 'Opnamemethode',
'CapturePalette' => 'Opname pallet', 'CapturePalette' => 'Kleurpalet opname',
'CaptureResolution' => 'Capture Resolution', // Added - 2015-04-18 'CaptureResolution' => 'Opnameresolutie',
'CaptureWidth' => 'Opname breedte', 'CaptureWidth' => 'Breedte van opname',
'Cause' => 'Oorzaak', 'Cause' => 'Oorzaak',
'CheckMethod' => 'Alarm controle Methode', 'CheckMethod' => 'Alarmcontrolemethode',
'ChooseDetectedCamera' => 'Kies gedetecteerde Camera', // Added - 2009-03-31 'ChooseDetectedCamera' => 'Kies gedetecteerde Camera',
'ChooseFilter' => 'Kies filter', 'ChooseFilter' => 'Kies filter',
'ChooseLogFormat' => 'Kies en log formaat', // Added - 2011-06-17 'ChooseLogFormat' => 'Kies een logformaat',
'ChooseLogSelection' => 'Kies een log selectie', // Added - 2011-06-17 'ChooseLogSelection' => 'Kies een logselectie',
'ChoosePreset' => 'Kies voorkeur', 'ChoosePreset' => 'Kies voorkeur',
'Clear' => 'Leeg', // Added - 2011-06-16 'Clear' => 'Legen',
'Close' => 'Sluit', 'Close' => 'Sluiten',
'Colour' => 'Kleur', 'Colour' => 'Kleur',
'Command' => 'Commando', 'Command' => 'Commando',
'Component' => 'Component', // Added - 2011-06-16 'Component' => 'Component',
'Config' => 'Configuratie', 'Config' => 'Configuratie',
'ConfiguredFor' => 'Geconfigureerd voor', 'ConfiguredFor' => 'Geconfigureerd voor',
'ConfirmDeleteEvents' => 'Weet uw zeker dat uw deze gebeurtenissen wil verwijderen?', 'ConfirmDeleteEvents' => 'Weet u zeker dat u deze gebeurtenissen wilt verwijderen?',
'ConfirmPassword' => 'Bevestig wachtwoord', 'ConfirmPassword' => 'Bevestig wachtwoord',
'ConjAnd' => 'en', 'ConjAnd' => 'en',
'ConjOr' => 'of', 'ConjOr' => 'of',
'Console' => 'Console', 'Console' => 'Console',
'ContactAdmin' => 'Neem A.U.B. contact op met uw beheerder voor details.', 'ContactAdmin' => 'Neem a.u.b. contact op met uw beheerder voor details.',
'Continue' => 'Continue', 'Continue' => 'Doorgaan',
'Contrast' => 'Contrast', 'Contrast' => 'Contrast',
'Control' => 'Bestuur', 'Control' => 'Bestuur',
'ControlAddress' => 'Bestuur adres', 'ControlAddress' => 'Bestuuradres',
'ControlCap' => 'Bestuur mogelijkheid', 'ControlCap' => 'Bestuurmogelijkheid',
'ControlCaps' => 'Bestuur mogelijkheden', 'ControlCaps' => 'Bestuurmogelijkheden',
'ControlDevice' => 'Bestuur apparaat', 'ControlDevice' => 'Bestuurapparaat',
'ControlType' => 'Bestuur Type', 'ControlType' => 'Bestuurtype',
'Controllable' => 'Bestuurbaar', 'Controllable' => 'Bestuurbaar',
'Current' => 'Current', // Added - 2015-04-18 'Current' => 'Huidig',
'Cycle' => 'Cyclus', 'Cycle' => 'Cyclus',
'CycleWatch' => 'Observeer cyclus', 'CycleWatch' => 'Observeer cyclus',
'DateTime' => 'Datum/Tijd', // Added - 2011-06-16 'DateTime' => 'Datum/Tijd',
'Day' => 'Dag', 'Day' => 'Dag',
'Debug' => 'Debug', 'Debug' => 'Debug',
'DefaultRate' => 'Standaard Radius', 'DefaultRate' => 'Standaard Radius',
'DefaultScale' => 'Standaard Schaal', 'DefaultScale' => 'Standaard Schaal',
'DefaultView' => 'Standaard scherm', 'DefaultView' => 'Standaard scherm',
'Deinterlacing' => 'Deinterlacing', // Added - 2015-04-18 'Deinterlacing' => 'Deinterlacing', // Added - 2015-04-18
'Delay' => 'Delay', // Added - 2015-04-18 'Delay' => 'Vertraging',
'Delete' => 'verwijder', 'Delete' => 'Verwijder',
'DeleteAndNext' => 'verwijder &amp; volgende', 'DeleteAndNext' => 'verwijder &amp; volgende',
'DeleteAndPrev' => 'verwijder &amp; vorige', 'DeleteAndPrev' => 'verwijder &amp; vorige',
'DeleteSavedFilter' => 'verwijder opgeslagen filter', 'DeleteSavedFilter' => 'verwijder opgeslagen filter',
'Description' => 'Omschrijving', 'Description' => 'Omschrijving',
'DetectedCameras' => 'Gedetecteerde Cameras', // Added - 2009-03-31 'DetectedCameras' => 'Gedetecteerde camera\'s',
'DetectedProfiles' => 'Detected Profiles', // Added - 2015-04-18 'DetectedProfiles' => 'Gedetecteerde profielen',
'Device' => 'Apparaat', // Added - 2009-02-08 'Device' => 'Apparaat',
'DeviceChannel' => 'Apparaat kanaal', 'DeviceChannel' => 'Apparaatkanaal',
'DeviceFormat' => 'Apparaat formaat', 'DeviceFormat' => 'Apparaatformaat',
'DeviceNumber' => 'Apparaat nummer', 'DeviceNumber' => 'Apparaatnummer',
'DevicePath' => 'Apparaat pad', 'DevicePath' => 'Apparaatpad',
'Devices' => 'Apparaten', 'Devices' => 'Apparaten',
'Dimensions' => 'Afmetingen', 'Dimensions' => 'Afmetingen',
'DisableAlarms' => 'Alarmen uitschakelen', 'DisableAlarms' => 'Alarmen uitschakelen',
'Disk' => 'Schijf', 'Disk' => 'Schijf',
'Display' => 'Weergave', // Added - 2011-01-30 'Display' => 'Weergave',
'Displaying' => 'Weergaven', // Added - 2011-06-16 'Displaying' => 'Weergaven',
'DoNativeMotionDetection'=> 'Do Native Motion Detection', // Added - 2015-04-18 'DoNativeMotionDetection'=> 'Do Native Motion Detection', // Added - 2015-04-18
'Donate' => 'A.U.B geef ons een donatie', 'Donate' => 'Geef a.u.b. een donatie',
'DonateAlready' => 'Nee, ik heb al gedoneerd', 'DonateAlready' => 'Nee, ik heb al gedoneerd',
'DonateEnticement' => 'U gebruikt Zoneminder nu voor een geruime tijd, hopelijk vindt je het een nuttige toevoeging voor u huis of werkplek beveiliging. Natuurlijk is en blijft Zoneminder gratis en open source software. Maar het kost geld om te ontwikkelen en support te onderhouden. Ik vraag u dan ook om er over na te denken om een donatie te doen om zo de ontwikkeling en support te ondersteunen. Natuurlijk bent u hier vrij in, en elke donatie hoe klein dan ook wordt erg gewaardeerd. <br><br> Als u wilt donderen geef dat hier onder dan aan of ga naar http://www.zoneminder.com/dontate.html in uw browser.<br><br>Bedankt voor het gebruiken van Zoneminder en vergeet niet om ons forum op ZoneMinder.com te bezoeken voor ondersteuning of suggesties waarmee u ZoneMinder beleving nog beter wordt.', 'DonateEnticement' => 'U gebruikt ZoneMinder nu voor een geruime tijd, hopelijk vindt u het een nuttige toevoeging voor uw huis- of werkplekbeveiliging. Natuurlijk is en blijft ZoneMinder gratis en open source software, maar het kost geld om te ontwikkelen, ondersteunen, en te onderhouden. Wij vragen u dan ook om er over na te denken een donatie te doen om zo de ontwikkeling van ZoneMinder te ondersteunen. Natuurlijk bent u hier vrij in, en elke donatie hoe klein dan ook wordt erg gewaardeerd. <br><br> Als u wilt doneren geef dat hieronder dan aan of ga naar http://www.zoneminder.com/donate.html in uw browser.<br><br>Bedankt voor het gebruiken van ZoneMinder en vergeet niet om ons forum op ZoneMinder.com te bezoeken voor ondersteuning of suggesties waarmee uw ZoneMinder beleving nog beter wordt.',
'DonateRemindDay' => 'Nu niet, herinner mij over 1 dag hieraan', 'DonateRemindDay' => 'Nu niet, herinner mij over 1 dag hieraan',
'DonateRemindHour' => 'Nu niet, herinner mij over een uur hieraan', 'DonateRemindHour' => 'Nu niet, herinner mij over een uur hieraan',
'DonateRemindMonth' => 'Nu niet, herinner mij over een maand hieraan', 'DonateRemindMonth' => 'Nu niet, herinner mij over een maand hieraan',
'DonateRemindNever' => 'Nee, ik hiervoor wil niet doneren', 'DonateRemindNever' => 'Nee, ik wil niet doneren',
'DonateRemindWeek' => 'Nu niet, herinner mij over een week hieraan', 'DonateRemindWeek' => 'Nu niet, herinner mij over een week hieraan',
'DonateYes' => 'Ja, ik wil nu doneren', 'DonateYes' => 'Ja, ik wil nu doneren',
'Download' => 'Download', 'Download' => 'Downloaden',
'DuplicateMonitorName' => 'Duplicaat Monitor Naam', // Added - 2009-03-31 'DuplicateMonitorName' => 'Kopieer monitornaam',
'Duration' => 'Duur', 'Duration' => 'Duur',
'Edit' => 'Bewerk', 'Edit' => 'Bewerken',
'Email' => 'Email', 'Email' => 'Email',
'EnableAlarms' => 'Enable Alarms', 'EnableAlarms' => 'Alarmen inschakelen',
'Enabled' => 'Ingeschakeld', 'Enabled' => 'Ingeschakeld',
'EnterNewFilterName' => 'Voer nieuwe filter naam in', 'EnterNewFilterName' => 'Voer nieuwe filternaam in',
'Error' => 'Fout', 'Error' => 'Fout',
'ErrorBrackets' => 'Fout, controleer of je even veel openings als afsluiting brackets hebt gebruikt', 'ErrorBrackets' => 'Fout, controleer of je evenveel openings- als afsluitingsbrackets hebt gebruikt',
'ErrorValidValue' => 'Fout, Controleer of alle termen een geldige waarde hebben', 'ErrorValidValue' => 'Fout, Controleer of alle termen een geldige waarde hebben',
'Etc' => 'etc', 'Etc' => 'etc',
'Event' => 'Gebeurtenis', 'Event' => 'Gebeurtenis',
'EventFilter' => 'Gebeurtenis filter', 'EventFilter' => 'Gebeurtenisfilter',
'EventId' => 'Gebeurtenis Id', 'EventId' => 'Gebeurtenis Id',
'EventName' => 'Gebeurtenis Name', 'EventName' => 'Gebeurtenisnaam',
'EventPrefix' => 'Gebeurtenis Prefix', 'EventPrefix' => 'Gebeurtenisprefix',
'Events' => 'Gebeurtenissen', 'Events' => 'Gebeurtenissen',
'Exclude' => 'Sluit uit', 'Exclude' => 'Uitsluiten',
'Execute' => 'Execute', 'Execute' => 'Uitvoeren',
'Export' => 'Exporteer', 'Export' => 'Exporteren',
'ExportDetails' => 'Exporteer Gebeurtenis Details', 'ExportDetails' => 'Exporteer gebeurtenisdetails',
'ExportFailed' => 'Exporteer gefaald', 'ExportFailed' => 'Exporteren mislukt',
'ExportFormat' => 'Exporteer File Formaat', 'ExportFormat' => 'Formaat exporteerbestand',
'ExportFormatTar' => 'Tar', 'ExportFormatTar' => 'Tar',
'ExportFormatZip' => 'Zip', 'ExportFormatZip' => 'Zip',
'ExportFrames' => 'Exporteer Frame Details', 'ExportFrames' => 'Exporteer framedetails',
'ExportImageFiles' => 'Exporteer foto bestanden', 'ExportImageFiles' => 'Exporteer fotobestanden',
'ExportLog' => 'Exporteer Log', // Added - 2011-06-17 'ExportLog' => 'Exporteer log',
'ExportMiscFiles' => 'Exporteer andere bestanden (wanneer aanwezig)', 'ExportMiscFiles' => 'Exporteer andere bestanden (wanneer aanwezig)',
'ExportOptions' => 'Exporteer Opties', 'ExportOptions' => 'Exporteeropties',
'ExportSucceeded' => 'Exporteren geslaagd', // Added - 2009-02-08 'ExportSucceeded' => 'Exporteren geslaagd',
'ExportVideoFiles' => 'Exporteer Video bestanden (wanneer aanwezig)', 'ExportVideoFiles' => 'Exporteer videobestanden (wanneer aanwezig)',
'Exporting' => 'Exporteerd', 'Exporting' => 'Exporteren',
'FPS' => 'fps', 'FPS' => 'fps',
'FPSReportInterval' => 'FPS rapportage interval', 'FPSReportInterval' => 'FPS rapportage interval',
'FTP' => 'FTP', 'FTP' => 'FTP',
'Far' => 'Far', 'Far' => 'Ver',
'FastForward' => 'Snel vooruit', 'FastForward' => 'Doorspoelen',
'Feed' => 'toevoer', 'Feed' => 'toevoer',
'Ffmpeg' => 'Ffmpeg', // Added - 2009-02-08 'Ffmpeg' => 'Ffmpeg',
'File' => 'Bestand', 'File' => 'Bestand',
'Filter' => 'Filter', // Added - 2015-04-18 'Filter' => 'Filter',
'FilterArchiveEvents' => 'Archiveer alle overeenkomsten', 'FilterArchiveEvents' => 'Archiveer alle overeenkomsten',
'FilterDeleteEvents' => 'Verwijder alle overeenkomsten', 'FilterDeleteEvents' => 'Verwijder alle overeenkomsten',
'FilterEmailEvents' => 'Email de details van alle overeenkomsten', 'FilterEmailEvents' => 'Email de details van alle overeenkomsten',
'FilterExecuteEvents' => 'Voer opdrachten op alle overeenkomsten uit', 'FilterExecuteEvents' => 'Voer opdrachten uit op alle overeenkomsten',
'FilterLog' => 'Filter log', // Added - 2015-04-18 'FilterLog' => 'Filterlog',
'FilterMessageEvents' => 'Bericht de details van alle overeenkomsten', 'FilterMessageEvents' => 'Bericht de details van alle overeenkomsten',
'FilterPx' => 'Filter px', 'FilterPx' => 'Filter px',
'FilterUnset' => 'Je moet de filter hoogte en breedte opgeven', 'FilterUnset' => 'Je moet de filterhoogte en -breedte opgeven',
'FilterUploadEvents' => 'Verstuur alle overeenkomsten', 'FilterUploadEvents' => 'Verstuur alle overeenkomsten',
'FilterVideoEvents' => 'Maak video voor alle matches', 'FilterVideoEvents' => 'Maak video voor alle overeenkomsten',
'Filters' => 'Filters', 'Filters' => 'Filters',
'First' => 'Eerste', 'First' => 'Eerste',
'FlippedHori' => 'Horizontaal gedraait', 'FlippedHori' => 'Horizontaal gedraaid',
'FlippedVert' => 'Vertikaal gedraait', 'FlippedVert' => 'Verticaal gedraaid',
'FnMocord' => 'Mocord', // Added 2013.08.16. 'FnMocord' => 'Mocord', // Added 2013.08.16.
'FnModect' => 'Modect', // Added 2013.08.16. 'FnModect' => 'Modect', // Added 2013.08.16.
'FnMonitor' => 'Monitor', // Added 2013.08.16. 'FnMonitor' => 'Monitor', // Added 2013.08.16.
@ -343,19 +344,19 @@ $SLANG = array(
'FnNone' => 'None', // Added 2013.08.16. 'FnNone' => 'None', // Added 2013.08.16.
'FnRecord' => 'Record', // Added 2013.08.16. 'FnRecord' => 'Record', // Added 2013.08.16.
'Focus' => 'Focus', 'Focus' => 'Focus',
'ForceAlarm' => 'Forceeer alarm', 'ForceAlarm' => 'Forceer alarm',
'Format' => 'Formaat', 'Format' => 'Formaat',
'Frame' => 'Frame', 'Frame' => 'Frame',
'FrameId' => 'Frame id', 'FrameId' => 'Frame id',
'FrameRate' => 'Frame rate', 'FrameRate' => 'Framerate',
'FrameSkip' => 'Frame overgeslagen', 'FrameSkip' => 'Frame overgeslagen',
'Frames' => 'Frames', 'Frames' => 'Frames',
'Func' => 'Func', 'Func' => 'Func',
'Function' => 'Functie', 'Function' => 'Functie',
'Gain' => 'Gain', 'Gain' => 'Gain',
'General' => 'Generiek', 'General' => 'Algemeen',
'GenerateVideo' => 'Genereer Video', 'GenerateVideo' => 'Genereer Video',
'GeneratingVideo' => 'Genereren Video', 'GeneratingVideo' => 'Video wordt gegenereerd',
'GoToZoneMinder' => 'Ga naar ZoneMinder.com', 'GoToZoneMinder' => 'Ga naar ZoneMinder.com',
'Grey' => 'Grijs', 'Grey' => 'Grijs',
'Group' => 'Groep', 'Group' => 'Groep',
@ -366,53 +367,53 @@ $SLANG = array(
'HasIrisSpeed' => 'Heeft Iris Snelheid', 'HasIrisSpeed' => 'Heeft Iris Snelheid',
'HasPanSpeed' => 'Heeft Pan Snelheid', 'HasPanSpeed' => 'Heeft Pan Snelheid',
'HasPresets' => 'Heeft Voorkeuren', 'HasPresets' => 'Heeft Voorkeuren',
'HasTiltSpeed' => 'Heeft Tilt Snelheid', 'HasTiltSpeed' => 'Heeft Tiltsnelheid',
'HasTurboPan' => 'Heeft Turbo Pan', 'HasTurboPan' => 'Heeft Turbo Pan',
'HasTurboTilt' => 'Heeft Turbo Tilt', 'HasTurboTilt' => 'Heeft Turbo Tilt',
'HasWhiteSpeed' => 'Heeft White Bal. Snelheid', 'HasWhiteSpeed' => 'Heeft White Bal. Snelheid',
'HasZoomSpeed' => 'Heeft Zoom Snelheid', 'HasZoomSpeed' => 'Heeft Zoomsnelheid',
'High' => 'Hoog', 'High' => 'Hoog',
'HighBW' => 'Hoog&nbsp;B/W', 'HighBW' => 'Hoog&nbsp;B/W',
'Home' => 'Home', 'Home' => 'Home',
'Hour' => 'Uur', 'Hour' => 'Uur',
'Hue' => 'Hue', 'Hue' => 'Hue',
'Id' => 'Id', 'Id' => 'Id',
'Idle' => 'Ongebruikt', 'Idle' => 'Inactief',
'Ignore' => 'Negeer', 'Ignore' => 'Negeren',
'Image' => 'Foto', 'Image' => 'Beeld',
'ImageBufferSize' => 'Foto buffer grootte (frames)', 'ImageBufferSize' => 'Beeldbuffergrootte (frames)',
'Images' => 'Fotos', 'Images' => 'Beelden',
'In' => 'In', 'In' => 'In',
'Include' => 'voeg in', 'Include' => 'voeg in',
'Inverted' => 'Omgedraaid', 'Inverted' => 'Geïnverteerd',
'Iris' => 'Iris', 'Iris' => 'Iris',
'KeyString' => 'Sleutel waarde', 'KeyString' => 'Sleutel waarde',
'Label' => 'Label', 'Label' => 'Label',
'Language' => 'Taal', 'Language' => 'Taal',
'Last' => 'Laatste', 'Last' => 'Laatste',
'Layout' => 'Layout', // Added - 2009-02-08 'Layout' => 'Layout',
'Level' => 'Nivo', // Added - 2011-06-16 'Level' => 'Niveau',
'Libvlc' => 'Libvlc', 'Libvlc' => 'Libvlc',
'LimitResultsPost' => 'resultaten;', // This is used at the end of the phrase 'Limit to first N results only' 'LimitResultsPost' => 'resultaten;', // This is used at the end of the phrase 'Limit to first N results only'
'LimitResultsPre' => 'beperk tot eerste', // This is used at the beginning of the phrase 'Limit to first N results only' 'LimitResultsPre' => 'beperk tot eerste', // This is used at the beginning of the phrase 'Limit to first N results only'
'Line' => 'Lijn', // Added - 2011-06-16 'Line' => 'Lijn',
'LinkedMonitors' => 'Gekoppelde monitoren', 'LinkedMonitors' => 'Gekoppelde monitoren',
'List' => 'Lijst', 'List' => 'Lijst',
'Load' => 'Belasting', 'Load' => 'Systeemlast',
'Local' => 'Lokaal', 'Local' => 'Lokaal',
'Log' => 'Log', // Added - 2011-06-16 'Log' => 'Log',
'LoggedInAs' => 'Aangemeld als', 'LoggedInAs' => 'Aangemeld als',
'Logging' => 'Logging', // Added - 2011-06-16 'Logging' => 'Logging', // Added - 2011-06-16
'LoggingIn' => 'Aanmelden..', 'LoggingIn' => 'Aanmelden..',
'Login' => 'Aanmelden', 'Login' => 'Aanmelden',
'Logout' => 'Afmelden', 'Logout' => 'Afmelden',
'Logs' => 'Logs', // Added - 2011-06-17 'Logs' => 'Logs',
'Low' => 'Laag', 'Low' => 'Laag',
'LowBW' => 'Laag&nbsp;B/W', 'LowBW' => 'Laag&nbsp;B/W',
'Main' => 'Main', 'Main' => 'Main',
'Man' => 'Man', 'Man' => 'Man',
'Manual' => 'Handmatig', 'Manual' => 'Handmatig',
'Mark' => 'Markeer', 'Mark' => 'Markeren',
'Max' => 'Max', 'Max' => 'Max',
'MaxBandwidth' => 'Max Bandbreedte', 'MaxBandwidth' => 'Max Bandbreedte',
'MaxBrScore' => 'Max.<br/>score', 'MaxBrScore' => 'Max.<br/>score',
@ -438,19 +439,19 @@ $SLANG = array(
'MaxZoomSpeed' => 'Max Zoom Snelheid', 'MaxZoomSpeed' => 'Max Zoom Snelheid',
'MaxZoomStep' => 'Max Zoom Stap', 'MaxZoomStep' => 'Max Zoom Stap',
'MaximumFPS' => 'Maximum FPS', 'MaximumFPS' => 'Maximum FPS',
'Medium' => 'Medium', 'Medium' => 'Gemiddeld',
'MediumBW' => 'Medium&nbsp;B/W', 'MediumBW' => 'Gemiddelde&nbsp;B/W',
'Message' => 'Message', // Added - 2011-06-16 'Message' => 'Bericht',
'MinAlarmAreaLtMax' => 'Minimum alarm moet kleiner dan het maximum', 'MinAlarmAreaLtMax' => 'Minimum alarmgebied moet kleiner zijn dan het maximum',
'MinAlarmAreaUnset' => 'Specificeer het minimaal aantal alarm pixels', 'MinAlarmAreaUnset' => 'Specificeer het minimaal aantal alarmpixels',
'MinBlobAreaLtMax' => 'minimum blob gebied moet kleiner zijn dan maximum blob gebied', 'MinBlobAreaLtMax' => 'Minimum blobgebied moet kleiner zijn dan maximum blobgebied',
'MinBlobAreaUnset' => 'Specificeer het minimaal aantal blob pixels', 'MinBlobAreaUnset' => 'Specificeer het minimaal aantal blobpixels',
'MinBlobLtMinFilter' => 'Minimum blob gebied moet kleiner of gelijk aan het minimale filter gebied zijn', 'MinBlobLtMinFilter' => 'Minimum blobgebied moet kleiner of gelijk zijn aan het minimale filtergebied',
'MinBlobsLtMax' => 'Minimum blobs moet kleiner zijn dan maximum blobs', 'MinBlobsLtMax' => 'Minimum aantal blobs moet kleiner zijn dan maximum aantal blobs',
'MinBlobsUnset' => 'Specificeer het minimaal blob aantal', 'MinBlobsUnset' => 'Specificeer het minimaal aantal blobs',
'MinFilterAreaLtMax' => 'Minimum filter gebied moet minder dan het maximum zijn', 'MinFilterAreaLtMax' => 'Minimum filtergebied moet minder dan het maximum zijn',
'MinFilterAreaUnset' => 'Specificeer het minimaal aantal filter pixels', 'MinFilterAreaUnset' => 'Specificeer het minimaal aantal filterpixels',
'MinFilterLtMinAlarm' => 'Minimum filter gebied moet kleiner of gelijk aan het minimale alarm gebied zijn', 'MinFilterLtMinAlarm' => 'Minimum filtergebied moet kleiner of gelijk zijn aan het minimale alarmgebied',
'MinFocusRange' => 'Min Focus Bereik', 'MinFocusRange' => 'Min Focus Bereik',
'MinFocusSpeed' => 'Min Focus Snelheid', 'MinFocusSpeed' => 'Min Focus Snelheid',
'MinFocusStep' => 'Min Focus Step', 'MinFocusStep' => 'Min Focus Step',
@ -474,46 +475,46 @@ $SLANG = array(
'MinZoomRange' => 'Min Zoom Bereik', 'MinZoomRange' => 'Min Zoom Bereik',
'MinZoomSpeed' => 'Min Zoom Snelheid', 'MinZoomSpeed' => 'Min Zoom Snelheid',
'MinZoomStep' => 'Min Zoom Step', 'MinZoomStep' => 'Min Zoom Step',
'Misc' => 'Misc', 'Misc' => 'Etc.',
'Mode' => 'Mode', // Added - 2015-04-18 'Mode' => 'Modus',
'Monitor' => 'Monitor', 'Monitor' => 'Monitor',
'MonitorIds' => 'Monitor&nbsp;Ids', 'MonitorIds' => 'Monitor&nbsp;Ids',
'MonitorPreset' => 'Monitor Preset', 'MonitorPreset' => 'Monitor Preset',
'MonitorPresetIntro' => 'Selecteer een preset uit de lijst.<br><br>let op dit overschrijft de reeds ingevoerde waarden voor deze monitor!<br><br>', 'MonitorPresetIntro' => 'Selecteer een voorinstelling uit de lijst.<br><br>let op, dit overschrijft de reeds ingevoerde waarden voor deze monitor!<br><br>',
'MonitorProbe' => 'Monitor Probe', // Added - 2009-03-31 'MonitorProbe' => 'Monitor Probe', // Added - 2009-03-31
'MonitorProbeIntro' => 'Deze lijst toont gedeteerde analoge en netwerk cameras en of deze al ingebruik of beschikbaar zijn.<br/><br/>Selecteer de gewenste waarde uit de lijst hier beneden.<br/><br/>Let er op dat het mogelijk is dat niet alle cameras hier worden weer gegeven, en dat alle ingevoerde waarden voor de huidige monitor worden overschreven.<br/><br/>', // Added - 2009-03-31 'MonitorProbeIntro' => 'Deze lijst toont gedeteerde analoge en netwerk cameras en of deze al in gebruik of beschikbaar zijn.<br/><br/>Selecteer de gewenste waarde uit de lijst hieronder.<br/><br/>Let op dat mogelijk niet alle cameras hier worden weergegeven en dat alle ingevoerde waarden voor de huidige monitor zullen worden overschreven.<br/><br/>',
'Monitors' => 'Monitoren', 'Monitors' => 'Monitoren',
'Montage' => 'Montage', 'Montage' => 'Montage',
'Month' => 'Maand', 'Month' => 'Maand',
'More' => 'Meer', // Added - 2011-06-16 'More' => 'Meer',
'MotionFrameSkip' => 'Motion Frame Skip', 'MotionFrameSkip' => 'Motion Frame Skip',
'Move' => 'Verplaats', 'Move' => 'Verplaats',
'Mtg2widgrd' => '2-wide grid', // Added 2013.08.15. 'Mtg2widgrd' => '2-wide grid', // Added 2013.08.15.
'Mtg3widgrd' => '3-wide grid', // Added 2013.08.15. 'Mtg3widgrd' => '3-wide grid', // Added 2013.08.15.
'Mtg3widgrx' => '3-wide grid, scaled, enlarge on alarm', // Added 2013.08.15. 'Mtg3widgrx' => '3-wide grid, scaled, enlarge on alarm', // Added 2013.08.15.
'Mtg4widgrd' => '4-wide grid', // Added 2013.08.15. 'Mtg4widgrd' => '4-wide grid', // Added 2013.08.15.
'MtgDefault' => 'Default', // Added 2013.08.15. 'MtgDefault' => 'Standaard', // Added 2013.08.15.
'MustBeGe' => 'Moet groter zijn of gelijk aan', 'MustBeGe' => 'Moet groter zijn of gelijk aan',
'MustBeLe' => 'Moet kleiner zijn of gelijk aan', 'MustBeLe' => 'Moet kleiner zijn of gelijk aan',
'MustConfirmPassword' => 'Je moet je wachtwoord bevestigen', 'MustConfirmPassword' => 'Bevestig uw wachtwoord',
'MustSupplyPassword' => 'Je moet een wachtwoord geven', 'MustSupplyPassword' => 'Geef een wachtwoord op',
'MustSupplyUsername' => 'Je moet een gebruikersnaam geven', 'MustSupplyUsername' => 'Geef een gebruikersnaam op',
'Name' => 'Naam', 'Name' => 'Naam',
'Near' => 'Dichtbij', 'Near' => 'Dichtbij',
'Network' => 'Netwerk', 'Network' => 'Netwerk',
'New' => 'Nieuw', 'New' => 'Nieuw',
'NewGroup' => 'Niew Groep', 'NewGroup' => 'Nieuwe groep',
'NewLabel' => 'Niew Label', 'NewLabel' => 'Nieuw label',
'NewPassword' => 'Nieuw wachtwoord', 'NewPassword' => 'Nieuw wachtwoord',
'NewState' => 'Nieuwe status', 'NewState' => 'Nieuwe status',
'NewUser' => 'Nieuwe gebruiker', 'NewUser' => 'Nieuwe gebruiker',
'Next' => 'Volgende', 'Next' => 'Volgende',
'No' => 'Nee', 'No' => 'Nee',
'NoDetectedCameras' => 'Geen cameras gedeteceerd', // Added - 2009-03-31 'NoDetectedCameras' => 'Geen cameras gedetecteerd',
'NoFramesRecorded' => 'Er zijn geen frames opgenomen voor deze gebeurtenis', 'NoFramesRecorded' => 'Er zijn geen beelden opgenomen voor deze gebeurtenis',
'NoGroup' => 'Geeb Groep', 'NoGroup' => 'Geen Groep',
'NoSavedFilters' => 'Geen Opgeslagen Filters', 'NoSavedFilters' => 'Geen Opgeslagen Filters',
'NoStatisticsRecorded' => 'Er zijn geen statistieken opgenomen voor deze gebeurenis', 'NoStatisticsRecorded' => 'Er zijn geen statistieken opgenomen voor deze gebeurtenis',
'None' => 'Geen', 'None' => 'Geen',
'NoneAvailable' => 'Geen beschikbaar', 'NoneAvailable' => 'Geen beschikbaar',
'Normal' => 'Normaal', 'Normal' => 'Normaal',
@ -521,25 +522,25 @@ $SLANG = array(
'NumPresets' => 'Num Voorkeuren', 'NumPresets' => 'Num Voorkeuren',
'Off' => 'Uit', 'Off' => 'Uit',
'On' => 'Aan', 'On' => 'Aan',
'OnvifCredentialsIntro'=> 'Please supply user name and password for the selected camera.<br/>If no user has been created for the camera then the user given here will be created with the given password.<br/><br/>', // Added - 2015-04-18 'OnvifCredentialsIntro'=> 'Geef een gebruikersnaam en wachtwoord op voor de geselecteerde camera.<br/>Als er geen gebruiker bestaat vor de camera zal de hier opgegeven gebruiker met het aangegeven wachtwoord worden aangemaakt.<br/><br/>',
'OnvifProbe' => 'ONVIF', // Added - 2015-04-18 'OnvifProbe' => 'ONVIF',
'OnvifProbeIntro' => 'The list below shows detected ONVIF cameras and whether they are already being used or available for selection.<br/><br/>Select the desired entry from the list below.<br/><br/>Please note that not all cameras may be detected and that choosing a camera here may overwrite any values you already have configured for the current monitor.<br/><br/>', // Added - 2015-04-18 'OnvifProbeIntro' => 'De lijst hieronder geeft gedetecteerde ONVIF camera\'s aan en of deze al worden gebruikt of beschikbaar zijn.<br/><br/>Selecteer de gewenste camera uit de lijst.<br/><br/>Let op dat het kan zijn dat niet alle camera\'s zijn gedetecteerd en dat het kiezen van een camera alle reeds ingestelde waarden voor de huidige monitor zal overschrijven.<br/><br/>',
'OpEq' => 'gelijk aan', 'OpEq' => 'gelijk aan',
'OpGt' => 'groter dan', 'OpGt' => 'groter dan',
'OpGtEq' => 'groter dan of gelijk aan', 'OpGtEq' => 'groter dan of gelijk aan',
'OpIn' => 'in set', 'OpIn' => 'in set',
'OpLt' => 'kleiner dan', 'OpLt' => 'kleiner dan',
'OpLtEq' => 'kleiner dan of gelijk aan', 'OpLtEq' => 'kleiner dan of gelijk aan',
'OpMatches' => 'Komt overeen', 'OpMatches' => 'Komt overeen met',
'OpNe' => 'niet gelijk aan', 'OpNe' => 'niet gelijk aan',
'OpNotIn' => 'niet in set', 'OpNotIn' => 'niet in set',
'OpNotMatches' => 'Komt niet overeen', 'OpNotMatches' => 'Komt niet overeen met',
'Open' => 'Open', 'Open' => 'Open',
'OptionHelp' => 'OptieHelp', 'OptionHelp' => 'OptieHelp',
'OptionRestartWarning' => 'Deze veranderingen passen niet aan\nals het systeem loopt. Als je\nKlaar bent met veranderen vergeet dan niet dat\nje ZoneMinder herstart.', 'OptionRestartWarning' => 'Deze veranderingen worden niet\ndoorgevoerd als het systeem loopt.\nVergeet niet ZoneMinder te herstarten\nwanneer u klaar bent.',
'Options' => 'Opties', 'Options' => 'Opties',
'OrEnterNewName' => 'of voer een nieuwe naam in', 'OrEnterNewName' => 'of voer een nieuwe naam in',
'Order' => 'Sorteer', 'Order' => 'Sorteren',
'Orientation' => 'Orientatie', 'Orientation' => 'Orientatie',
'Out' => 'Uit', 'Out' => 'Uit',
'OverwriteExisting' => 'Overschrijf bestaande', 'OverwriteExisting' => 'Overschrijf bestaande',
@ -555,30 +556,30 @@ $SLANG = array(
'Pause' => 'Pause', 'Pause' => 'Pause',
'Phone' => 'Telefoon', 'Phone' => 'Telefoon',
'PhoneBW' => 'Telefoon&nbsp;B/W', 'PhoneBW' => 'Telefoon&nbsp;B/W',
'Pid' => 'PID', // Added - 2011-06-16 'Pid' => 'PID',
'PixelDiff' => 'Pixel Diff', 'PixelDiff' => 'Pixel Diff',
'Pixels' => 'pixels', 'Pixels' => 'pixels',
'Play' => 'Speel', 'Play' => 'Afspelen',
'PlayAll' => 'Speel Alles', 'PlayAll' => 'Alles afspelen',
'PleaseWait' => 'Wacht A.U.B.', 'PleaseWait' => 'Wacht a.u.b.',
'Plugins' => 'Plugins', // Added - 2015-04-18 'Plugins' => 'Plugins',
'Point' => 'Punt', 'Point' => 'Punt',
'PostEventImageBuffer' => 'Post gebeurtenis foto Buffer', 'PostEventImageBuffer' => 'Post-gebeurtenis framebuffer',
'PreEventImageBuffer' => 'Pre gebeurtenis foto Buffer', 'PreEventImageBuffer' => 'Pre-gebeurtenis framebuffer',
'PreserveAspect' => 'Beeld verhouding bewaren', 'PreserveAspect' => 'Beeldverhouding behouden',
'Preset' => 'Voorkeur', 'Preset' => 'Voorkeur',
'Presets' => 'Voorkeuren', 'Presets' => 'Voorkeuren',
'Prev' => 'Vorige', 'Prev' => 'Vorige',
'Probe' => 'Scan', // Added - 2009-03-31 'Probe' => 'Scan', // Added - 2009-03-31
'ProfileProbe' => 'Stream Probe', // Added - 2015-04-18 'ProfileProbe' => 'Stream Probe', // Added - 2015-04-18
'ProfileProbeIntro' => 'The list below shows the existing stream profiles of the selected camera .<br/><br/>Select the desired entry from the list below.<br/><br/>Please note that ZoneMinder cannot configure additional profiles and that choosing a camera here may overwrite any values you already have configured for the current monitor.<br/><br/>', // Added - 2015-04-18 'ProfileProbeIntro' => 'The list below shows the existing stream profiles of the selected camera .<br/><br/>Select the desired entry from the list below.<br/><br/>Please note that ZoneMinder cannot configure additional profiles and that choosing a camera here may overwrite any values you already have configured for the current monitor.<br/><br/>', // Added - 2015-04-18
'Progress' => 'Progress', // Added - 2015-04-18 'Progress' => 'Voortgang',
'Protocol' => 'Protocol', 'Protocol' => 'Protocol',
'Rate' => 'Waardering', 'Rate' => 'Snelheid',
'Real' => 'Echte', 'Real' => 'Echte',
'Record' => 'Record', 'Record' => 'Record',
'RefImageBlendPct' => 'Referentie foto Blend %ge', 'RefImageBlendPct' => 'Referentie beeld blend percentage',
'Refresh' => 'Ververs', 'Refresh' => 'Verversen',
'Remote' => 'Remote', 'Remote' => 'Remote',
'RemoteHostName' => 'Remote Host Naam', 'RemoteHostName' => 'Remote Host Naam',
'RemoteHostPath' => 'Remote Host Pad', 'RemoteHostPath' => 'Remote Host Pad',
@ -592,55 +593,55 @@ $SLANG = array(
'ReplayAll' => 'Alle Gebeurtenissen', 'ReplayAll' => 'Alle Gebeurtenissen',
'ReplayGapless' => 'Opvolgende Gebeurtenissen', 'ReplayGapless' => 'Opvolgende Gebeurtenissen',
'ReplaySingle' => 'Enkele Gebeurtenis', 'ReplaySingle' => 'Enkele Gebeurtenis',
'Reset' => 'Herstel', 'Reset' => 'Resetten',
'ResetEventCounts' => 'Herstel gebeurtenis teller', 'ResetEventCounts' => 'Gebeurtenisteller resetten',
'Restart' => 'Herstart', 'Restart' => 'Herstart',
'Restarting' => 'Herstarten', 'Restarting' => 'Herstarten',
'RestrictedCameraIds' => 'Verboden Camera Ids', 'RestrictedCameraIds' => 'Verboden Camera Ids',
'RestrictedMonitors' => 'Beperkte Monitoren', 'RestrictedMonitors' => 'Beperkte Monitoren',
'ReturnDelay' => 'Return Delay', 'ReturnDelay' => 'Return Delay',
'ReturnLocation' => 'Return Locatie', 'ReturnLocation' => 'Return Locatie',
'Rewind' => 'Rewind', 'Rewind' => 'Terugspoelen',
'RotateLeft' => 'Draai linksom', 'RotateLeft' => 'Draai linksom',
'RotateRight' => 'Draai rechtsom', 'RotateRight' => 'Draai rechtsom',
'RunLocalUpdate' => 'Gebruik zmupdate.pl om up te daten', // Added - 2011-05-25 'RunLocalUpdate' => 'Gebruik zmupdate.pl om bij te werken',
'RunMode' => 'Draai Modus', 'RunMode' => 'Uitvoermodus',
'RunState' => 'Draai Status', 'RunState' => 'Uitvoerstatus',
'Running' => 'Werkend', 'Running' => 'Werkend',
'Save' => 'Opslaan', 'Save' => 'Opslaan',
'SaveAs' => 'Opslaan als', 'SaveAs' => 'Opslaan als',
'SaveFilter' => 'Opslaan Filter', 'SaveFilter' => 'Filter opslaan',
'Scale' => 'Schaal', 'Scale' => 'Schaal',
'Score' => 'Score', 'Score' => 'Score',
'Secs' => 'Secs', 'Secs' => 'Sec.',
'Sectionlength' => 'Sectie lengte', 'Sectionlength' => 'Sectielengte',
'Select' => 'Selecteer', 'Select' => 'Selecteer',
'SelectFormat' => 'Selecteer Formaat', // Added - 2011-06-17 'SelectFormat' => 'Selecteer Formaat',
'SelectLog' => 'Selecteer Log', // Added - 2011-06-17 'SelectLog' => 'Selecteer Log',
'SelectMonitors' => 'Selecteer Monitoren', 'SelectMonitors' => 'Selecteer Monitoren',
'SelfIntersecting' => 'Polygon randen moeten niet overlappen', 'SelfIntersecting' => 'Polygonranden moeten niet overlappen',
'Set' => 'Zet', 'Set' => 'Instellen',
'SetNewBandwidth' => 'Zet Nieuwe Bandbreedte', 'SetNewBandwidth' => 'Nieuwe Bandbreedte instellen',
'SetPreset' => 'Zet Preset', 'SetPreset' => 'Voorkeur instellen',
'Settings' => 'Instellingen', 'Settings' => 'Instellingen',
'ShowFilterWindow' => 'Toon Filter Venster', 'ShowFilterWindow' => 'Toon Filtervenster',
'ShowTimeline' => 'Toon Tijdslijn', 'ShowTimeline' => 'Toon Tijdlijn',
'SignalCheckColour' => 'Signaal controle kleur', 'SignalCheckColour' => 'Signaalcontrolekleur',
'Size' => 'Groote', 'Size' => 'Groote',
'SkinDescription' => 'Wijzig standaard uiterlijk voor deze computer', // Added - 2011-01-30 'SkinDescription' => 'Wijzig standaarduiterlijk voor deze computer',
'Sleep' => 'Slaap', 'Sleep' => 'Slaap',
'SortAsc' => 'Opl.', 'SortAsc' => 'Opl.',
'SortBy' => 'Sorteer op', 'SortBy' => 'Sorteer op',
'SortDesc' => 'Afl.', 'SortDesc' => 'Afl.',
'Source' => 'Bron', 'Source' => 'Bron',
'SourceColours' => 'Bron Colours', // Added - 2009-02-08 'SourceColours' => 'Bronkleuren',
'SourcePath' => 'Bron Path', // Added - 2009-02-08 'SourcePath' => 'Bronpad',
'SourceType' => 'Bron Type', 'SourceType' => 'Brontype',
'Speed' => 'Snelheid', 'Speed' => 'Snelheid',
'SpeedHigh' => 'Hoge Snelheid', 'SpeedHigh' => 'Hoge snelheid',
'SpeedLow' => 'Lage Snelheid', 'SpeedLow' => 'Lage snelheid',
'SpeedMedium' => 'Medium Snelheid', 'SpeedMedium' => 'Gemiddelde snelheid',
'SpeedTurbo' => 'Turbo Snelheid', 'SpeedTurbo' => 'Turbo snelheid',
'Start' => 'Start', 'Start' => 'Start',
'State' => 'Status', 'State' => 'Status',
'Stats' => 'Stats', 'Stats' => 'Stats',
@ -648,18 +649,18 @@ $SLANG = array(
'Step' => 'Stap', 'Step' => 'Stap',
'StepBack' => 'Stap Terug', 'StepBack' => 'Stap Terug',
'StepForward' => 'Stap Vooruit', 'StepForward' => 'Stap Vooruit',
'StepLarge' => 'Groten stap', 'StepLarge' => 'Grote stap',
'StepMedium' => 'Medium Stap', 'StepMedium' => 'Gemiddelde stap',
'StepNone' => 'Geen Stap', 'StepNone' => 'Geen stap',
'StepSmall' => 'Smalle Stap', 'StepSmall' => 'Kleine stap',
'Stills' => 'Plaatjes', 'Stills' => 'Beelden',
'Stop' => 'Stop', 'Stop' => 'Stoppen',
'Stopped' => 'Gestopt', 'Stopped' => 'Gestopt',
'Stream' => 'Stream', 'Stream' => 'Stream',
'StreamReplayBuffer' => 'Stream Replay foto Buffer', 'StreamReplayBuffer' => 'Stream Replay beeldbuffer',
'Submit' => 'Verzenden', 'Submit' => 'Verzenden',
'System' => 'Systeem', 'System' => 'Systeem',
'SystemLog' => 'Systeem Log', // Added - 2011-06-16 'SystemLog' => 'Systeemlog',
'TargetColorspace' => 'Target colorspace', // Added - 2015-04-18 'TargetColorspace' => 'Target colorspace', // Added - 2015-04-18
'Tele' => 'Tele', 'Tele' => 'Tele',
'Thumbnail' => 'Thumbnail', 'Thumbnail' => 'Thumbnail',
@ -667,38 +668,38 @@ $SLANG = array(
'Time' => 'Tijd', 'Time' => 'Tijd',
'TimeDelta' => 'Tijd Delta', 'TimeDelta' => 'Tijd Delta',
'TimeStamp' => 'Tijdstempel', 'TimeStamp' => 'Tijdstempel',
'Timeline' => 'Tijdslijn', 'Timeline' => 'Tijdlijn',
'TimelineTip1' => 'Pass your mouse over the graph to view a snapshot image and event details.', // Added 2013.08.15. 'TimelineTip1' => 'Beweeg de muis over de grafiek om een beeld en gebeurtenisdetails te bekijken.',
'TimelineTip2' => 'Click on the coloured sections of the graph, or the image, to view the event.', // Added 2013.08.15. 'TimelineTip2' => 'Klik op de gekleurde delen van de grafiek of de afbeelding om de gebeurtenis te bekijken.',
'TimelineTip3' => 'Click on the background to zoom in to a smaller time period based around your click.', // Added 2013.08.15. 'TimelineTip3' => 'Klik op de achtergrond om in te zoomen naar een smaller tijdsbestek rond de positie van de muis.',
'TimelineTip4' => 'Use the controls below to zoom out or navigate back and forward through the time range.', // Added 2013.08.15. 'TimelineTip4' => 'Gebruik de knoppen hieronder om uit te zoomen of voor- en achteruit te navigeren.',
'Timestamp' => 'Tijdstempel', 'Timestamp' => 'Tijdstempel',
'TimestampLabelFormat' => 'Tijdstempel Label Format', 'TimestampLabelFormat' => 'Formaat tijdstempel',
'TimestampLabelX' => 'Tijdstempel Label X', 'TimestampLabelX' => 'Tijdstempel X-positie',
'TimestampLabelY' => 'Tijdstempel Label Y', 'TimestampLabelY' => 'Tijdstempel Y-positie',
'Today' => 'Vandaag', 'Today' => 'Vandaag',
'Tools' => 'Gereedschappen', 'Tools' => 'Gereedschappen',
'Total' => 'Totaal', // Added - 2011-06-16 'Total' => 'Totaal',
'TotalBrScore' => 'Totaal<br/>Score', 'TotalBrScore' => 'Totaal-<br/>Score',
'TrackDelay' => 'Track Vertraging', 'TrackDelay' => 'Track Vertraging',
'TrackMotion' => 'Track Beweging', 'TrackMotion' => 'Track Beweging',
'Triggers' => 'Triggers', 'Triggers' => 'Triggers',
'TurboPanSpeed' => 'Turbo Pan Snelheid', 'TurboPanSpeed' => 'Turbo Pan Snelheid',
'TurboTiltSpeed' => 'Turbo Tilt Snelheid', 'TurboTiltSpeed' => 'Turbo Tilt Snelheid',
'Type' => 'Type', 'Type' => 'Type',
'Unarchive' => 'Dearchiveer', 'Unarchive' => 'Dearchiveren',
'Undefined' => 'Ongedefineerd', // Added - 2009-02-08 'Undefined' => 'Ongedefinieerd',
'Units' => 'Eenheden', 'Units' => 'Eenheden',
'Unknown' => 'Onbekend', 'Unknown' => 'Onbekend',
'Update' => 'Ververs', 'Update' => 'Bijwerken',
'UpdateAvailable' => 'Een update voor ZoneMinder is beschikbaar', 'UpdateAvailable' => 'Er is een nieuwe versie voor ZoneMinder beschikbaar',
'UpdateNotNecessary' => 'Geen update noodzakelijk', 'UpdateNotNecessary' => 'Geen update noodzakelijk',
'Updated' => 'Ververst', // Added - 2011-06-16 'Updated' => 'Bijwerken voltooid',
'Upload' => 'Upload', // Added - 2015-04-18 'Upload' => 'Uploaden',
'UseFilter' => 'Gebruik Filter', 'UseFilter' => 'Gebruik Filter',
'UseFilterExprsPost' => '&nbsp;filter&nbsp;expressies', // This is used at the end of the phrase 'use N filter expressions' 'UseFilterExprsPost' => '&nbsp;filter&nbsp;expressies', // This is used at the end of the phrase 'use N filter expressions'
'UseFilterExprsPre' => 'Gebruik&nbsp;', // This is used at the beginning of the phrase 'use N filter expressions' 'UseFilterExprsPre' => 'Gebruik&nbsp;', // This is used at the beginning of the phrase 'use N filter expressions'
'UsedPlugins' => 'Used Plugins', // Added - 2015-04-18 'UsedPlugins' => 'Gebruikte plugins',
'User' => 'Gebruiker', 'User' => 'Gebruiker',
'Username' => 'Gebruikersnaam', 'Username' => 'Gebruikersnaam',
'Users' => 'Gebruikers', 'Users' => 'Gebruikers',
@ -713,26 +714,26 @@ $SLANG = array(
'VersionRemindNever' => 'Herinner mij niet aan nieuwe versies', 'VersionRemindNever' => 'Herinner mij niet aan nieuwe versies',
'VersionRemindWeek' => 'Herinner mij na 1 week', 'VersionRemindWeek' => 'Herinner mij na 1 week',
'Video' => 'Video', 'Video' => 'Video',
'VideoFormat' => 'Video Formaat', 'VideoFormat' => 'Videoformaat',
'VideoGenFailed' => 'Video Generatie mislukt!', 'VideoGenFailed' => 'Videogeneratie mislukt!',
'VideoGenFiles' => 'Bestaande video bestanden', 'VideoGenFiles' => 'Bestaande videobestanden',
'VideoGenNoFiles' => 'Geen video bestanden gevonden', 'VideoGenNoFiles' => 'Geen videobestanden gevonden',
'VideoGenParms' => 'Video Generatie Parameters', 'VideoGenParms' => 'Videogeneratie Parameters',
'VideoGenSucceeded' => 'Video Generatie voltooid!', 'VideoGenSucceeded' => 'Videogeneratie voltooid!',
'VideoSize' => 'Video grootte', 'VideoSize' => 'Videogrootte',
'View' => 'Bekijk', 'View' => 'Bekijk',
'ViewAll' => 'Bekijk Alles', 'ViewAll' => 'Bekijk Alles',
'ViewEvent' => 'Bekijk Gebeurtenis', 'ViewEvent' => 'Bekijk Gebeurtenis',
'ViewPaged' => 'Bekijk Pagina', 'ViewPaged' => 'Bekijk Pagina',
'Wake' => 'Wakker', 'Wake' => 'Wakker',
'WarmupFrames' => 'Warmop Frames', 'WarmupFrames' => 'Opwarm frames',
'Watch' => 'Observeer', 'Watch' => 'Observeer',
'Web' => 'Web', 'Web' => 'Web',
'WebColour' => 'Web Kleur', 'WebColour' => 'Webkleur',
'Week' => 'Week', 'Week' => 'Week',
'White' => 'Wit', 'White' => 'Wit',
'WhiteBalance' => 'Wit Balance', 'WhiteBalance' => 'Witbalans',
'Wide' => 'Wijd', 'Wide' => 'Breed',
'X' => 'X', 'X' => 'X',
'X10' => 'X10', 'X10' => 'X10',
'X10ActivationString' => 'X10 Activatie Waarde', 'X10ActivationString' => 'X10 Activatie Waarde',
@ -746,13 +747,13 @@ $SLANG = array(
'ZoneArea' => 'Zone Gebied', 'ZoneArea' => 'Zone Gebied',
'ZoneExtendAlarmFrames' => 'Extend Alarm Frame Count', 'ZoneExtendAlarmFrames' => 'Extend Alarm Frame Count',
'ZoneFilterSize' => 'Filter Hoogte/Breedte (pixels)', 'ZoneFilterSize' => 'Filter Hoogte/Breedte (pixels)',
'ZoneMinMaxAlarmArea' => 'Min/Max Alarmeer Gebied', 'ZoneMinMaxAlarmArea' => 'Min/Max alarmgebied',
'ZoneMinMaxBlobArea' => 'Min/Max Blob Gebied', 'ZoneMinMaxBlobArea' => 'Min/Max Blobgebied',
'ZoneMinMaxBlobs' => 'Min/Max Blobs', 'ZoneMinMaxBlobs' => 'Min/Max Blobs',
'ZoneMinMaxFiltArea' => 'Min/Max Gefilterd Gebied', 'ZoneMinMaxFiltArea' => 'Min/Max Gefilterd gebied',
'ZoneMinMaxPixelThres' => 'Min/Max Pixel Threshold (0-255)', 'ZoneMinMaxPixelThres' => 'Min/Max Pixel drempelwaarde (0-255)',
'ZoneMinderLog' => 'ZoneMinder Log', // Added - 2011-06-17 'ZoneMinderLog' => 'ZoneMinder Log',
'ZoneOverloadFrames' => 'Overload Frame negeer aantal', 'ZoneOverloadFrames' => 'Negeer aantal overload frames',
'Zones' => 'Zones', 'Zones' => 'Zones',
'Zoom' => 'Zoom', 'Zoom' => 'Zoom',
'ZoomIn' => 'Zoom In', 'ZoomIn' => 'Zoom In',
@ -763,11 +764,11 @@ $SLANG = array(
$CLANG = array( $CLANG = array(
'CurrentLogin' => 'huidige login is \'%1$s\'', 'CurrentLogin' => 'huidige login is \'%1$s\'',
'EventCount' => '%1$s %2$s', // Als voorbeeld '37 gebeurtenissen' (from Vlang below) 'EventCount' => '%1$s %2$s', // Als voorbeeld '37 gebeurtenissen' (from Vlang below)
'LastEvents' => 'Last %1$s %2$s', // Als voorbeeld 'Laatste 37 gebeurtenissen' (from Vlang below) 'LastEvents' => 'Laatste %1$s %2$s', // Als voorbeeld 'Laatste 37 gebeurtenissen' (from Vlang below)
'LatestRelease' => 'de laatste release is v%1$s, jij hebt v%2$s.', 'LatestRelease' => 'de laatste release is v%1$s, jij hebt v%2$s.',
'MonitorCount' => '%1$s %2$s', // Als voorbeeld '4 Monitoren' (from Vlang below) 'MonitorCount' => '%1$s %2$s', // Als voorbeeld '4 Monitoren' (from Vlang below)
'MonitorFunction' => 'Monitor %1$s Functie', 'MonitorFunction' => 'Monitor %1$s Functie',
'RunningRecentVer' => 'U draait al met de laatste versie van ZoneMinder, v%s.', 'RunningRecentVer' => 'U draait al de meest recente versie van ZoneMinder, v%s.',
'VersionMismatch' => 'Versie verschil, systeem is versie %1$s, database is %2$s.', // Added - 2011-05-25 'VersionMismatch' => 'Versie verschil, systeem is versie %1$s, database is %2$s.', // Added - 2011-05-25
); );

View File

@ -30,7 +30,7 @@ function getControlCommands( $monitor )
$cmds['PresetGoto'] = "presetGoto"; $cmds['PresetGoto'] = "presetGoto";
$cmds['PresetHome'] = "presetHome"; $cmds['PresetHome'] = "presetHome";
if ( !empty($monitor->CanZoom) ) if ( !empty($monitor->CanZoom()) )
{ {
if ( $monitor->CanZoomCon() ) if ( $monitor->CanZoomCon() )
$cmds['ZoomRoot'] = "zoomCon"; $cmds['ZoomRoot'] = "zoomCon";
@ -45,7 +45,7 @@ function getControlCommands( $monitor )
$cmds['ZoomMan'] = "zoomMan"; $cmds['ZoomMan'] = "zoomMan";
} }
if ( !empty($monitor->CanFocus) ) if ( !empty($monitor->CanFocus()) )
{ {
if ( $monitor->CanFocusCon() ) if ( $monitor->CanFocusCon() )
$cmds['FocusRoot'] = "focusCon"; $cmds['FocusRoot'] = "focusCon";
@ -60,7 +60,7 @@ function getControlCommands( $monitor )
$cmds['FocusMan'] = "focusMan"; $cmds['FocusMan'] = "focusMan";
} }
if ( !empty($monitor->CanIris) ) if ( !empty($monitor->CanIris()) )
{ {
if ( $monitor->CanIrisCon() ) if ( $monitor->CanIrisCon() )
$cmds['IrisRoot'] = "irisCon"; $cmds['IrisRoot'] = "irisCon";
@ -75,7 +75,7 @@ function getControlCommands( $monitor )
$cmds['IrisMan'] = "irisMan"; $cmds['IrisMan'] = "irisMan";
} }
if ( !empty($monitor->CanWhite) ) if ( !empty($monitor->CanWhite()) )
{ {
if ( $monitor->CanWhiteCon() ) if ( $monitor->CanWhiteCon() )
$cmds['WhiteRoot'] = "whiteCon"; $cmds['WhiteRoot'] = "whiteCon";
@ -89,7 +89,7 @@ function getControlCommands( $monitor )
$cmds['WhiteMan'] = "whiteMan"; $cmds['WhiteMan'] = "whiteMan";
} }
if ( !empty($monitor->CanGain) ) if ( !empty($monitor->CanGain()) )
{ {
if ( $monitor->CanGainCon() ) if ( $monitor->CanGainCon() )
$cmds['GainRoot'] = "gainCon"; $cmds['GainRoot'] = "gainCon";
@ -103,7 +103,7 @@ function getControlCommands( $monitor )
$cmds['GainMan'] = "gainMan"; $cmds['GainMan'] = "gainMan";
} }
if ( !empty($monitor->CanMove) ) if ( !empty($monitor->CanMove()) )
{ {
if ( $monitor->CanMoveCon() ) if ( $monitor->CanMoveCon() )
{ {
@ -243,12 +243,12 @@ function controlPanTilt( $monitor, $cmds )
ob_start(); ob_start();
?> ?>
<div class="pantiltControls"> <div class="pantiltControls">
<div class="pantilLabel"><?php echo translate('PanTilt') ?></div> <div class="pantiltLabel"><?php echo translate('PanTilt') ?></div>
<div class="pantiltButtons"> <div class="pantiltButtons">
<?php <?php
$hasPan = $monitor->CanPan; $hasPan = $monitor->CanPan();
$hasTilt = $monitor->CanTilt; $hasTilt = $monitor->CanTilt();
$hasDiag = $hasPan && $hasTilt && $monitor->CanMoveDiag; $hasDiag = $hasPan && $hasTilt && $monitor->CanMoveDiag();
?> ?>
<div class="arrowBtn upLeftBtn<?php echo $hasDiag?'':' invisible' ?>" onclick="controlCmd('<?php echo $cmds['MoveUpLeft'] ?>',event,-1,-1)"></div> <div class="arrowBtn upLeftBtn<?php echo $hasDiag?'':' invisible' ?>" onclick="controlCmd('<?php echo $cmds['MoveUpLeft'] ?>',event,-1,-1)"></div>
<div class="arrowBtn upBtn<?php echo $hasTilt?'':' invisible' ?>" onclick="controlCmd('<?php echo $cmds['MoveUp'] ?>',event,0,-1)"></div> <div class="arrowBtn upBtn<?php echo $hasTilt?'':' invisible' ?>" onclick="controlCmd('<?php echo $cmds['MoveUp'] ?>',event,0,-1)"></div>
@ -278,7 +278,7 @@ function controlPresets( $monitor, $cmds )
$labels[$row['Preset']] = $row['Label']; $labels[$row['Preset']] = $row['Label'];
} }
$presetBreak = (int)(($monitor->NumPresets+1)/((int)(($monitor->NumPresets-1)/MAX_PRESETS)+1)); $presetBreak = (int)(($monitor->NumPresets()+1)/((int)(($monitor->NumPresets()-1)/MAX_PRESETS)+1));
ob_start(); ob_start();
?> ?>
@ -286,7 +286,7 @@ function controlPresets( $monitor, $cmds )
<!--<div><?php echo translate('Presets') ?></div>--> <!--<div><?php echo translate('Presets') ?></div>-->
<div> <div>
<?php <?php
for ( $i = 1; $i <= $monitor->NumPresets; $i++ ) for ( $i = 1; $i <= $monitor->NumPresets(); $i++ )
{ {
?><input type="button" class="ptzNumBtn" title="<?php echo isset($labels[$i])?$labels[$i]:"" ?>" value="<?php echo $i ?>" onclick="controlCmd('<?php echo $cmds['PresetGoto'] ?><?php echo $i ?>');"/><?php ?><input type="button" class="ptzNumBtn" title="<?php echo isset($labels[$i])?$labels[$i]:"" ?>" value="<?php echo $i ?>" onclick="controlCmd('<?php echo $cmds['PresetGoto'] ?><?php echo $i ?>');"/><?php
if ( $i && (($i%$presetBreak) == 0) ) if ( $i && (($i%$presetBreak) == 0) )

View File

@ -142,8 +142,6 @@ function exportEventDetail( $event, $exportFrames, $exportImages )
function exportEventFrames( $event, $exportDetail, $exportImages ) function exportEventFrames( $event, $exportDetail, $exportImages )
{ {
global $SLANG;
$sql = "SELECT *, unix_timestamp( TimeStamp ) AS UnixTimeStamp FROM Frames WHERE EventID = ? ORDER BY FrameId"; $sql = "SELECT *, unix_timestamp( TimeStamp ) AS UnixTimeStamp FROM Frames WHERE EventID = ? ORDER BY FrameId";
$frames = dbFetchAll( $sql, NULL, array( $event['Id'] ) ); $frames = dbFetchAll( $sql, NULL, array( $event['Id'] ) );
@ -230,8 +228,6 @@ function exportEventFrames( $event, $exportDetail, $exportImages )
function exportEventImages( $event, $exportDetail, $exportFrames, $myfilelist ) function exportEventImages( $event, $exportDetail, $exportFrames, $myfilelist )
{ {
global $SLANG;
ob_start(); ob_start();
exportHeader( translate('Images')." ".$event['Id'] ); exportHeader( translate('Images')." ".$event['Id'] );
@ -589,7 +585,6 @@ else if (document.layers) window.onload=start_slider;
function exportEventImagesMaster( $eids ) function exportEventImagesMaster( $eids )
{ {
global $SLANG;
ob_start(); ob_start();
exportHeader( translate('Images').' Master' ); exportHeader( translate('Images').' Master' );
?> ?>

View File

@ -28,5 +28,3 @@ var showVersionPopup = <?php echo isset($showVersionPopup )?'true':'false' ?>;
var showDonatePopup = <?php echo isset($showDonatePopup )?'true':'false' ?>; var showDonatePopup = <?php echo isset($showDonatePopup )?'true':'false' ?>;
var translatedAddText = "<?php echo translate('AddNewMonitor') ?>"; var translatedAddText = "<?php echo translate('AddNewMonitor') ?>";
var translatedCloneText = "<?php echo translate('CloneMonitor') ?>"; var translatedCloneText = "<?php echo translate('CloneMonitor') ?>";