Merge branch 'master' into storageareas

pull/1624/head
Isaac Connor 2016-06-03 09:32:55 -04:00
commit b8c406f969
11 changed files with 45 additions and 125 deletions

View File

@ -4,7 +4,7 @@
#
cmake_minimum_required (VERSION 2.6)
project (zoneminder)
set(zoneminder_VERSION "1.30.2")
file (STRINGS "version" zoneminder_VERSION)
# make API version a minor of ZM version
set(zoneminder_API_VERSION "${zoneminder_VERSION}.1")

View File

@ -1,73 +1,5 @@
--
-- This updates a 1.29.0 database to 1.30.0
-- This updates a 1.29.1 database to 1.30.0
--
-- No changes required
--
SET @s = (SELECT IF(
(SELECT COUNT(*)
FROM INFORMATION_SCHEMA.COLUMNS
WHERE table_name = 'Monitors'
AND table_schema = DATABASE()
AND column_name = 'SaveJPEGs'
) > 0,
"SELECT 'Column SaveJPEGs exists in Monitors'",
"ALTER TABLE `Monitors` ADD `SaveJPEGs` TINYINT NOT NULL DEFAULT '3' AFTER `Deinterlacing`"
));
PREPARE stmt FROM @s;
EXECUTE stmt;
SET @s = (SELECT IF(
(SELECT COUNT(*)
FROM INFORMATION_SCHEMA.COLUMNS
WHERE table_name = 'Monitors'
AND table_schema = DATABASE()
AND column_name = 'VideoWriter'
) > 0,
"SELECT 'Column VideoWriter exists in Monitors'",
"ALTER TABLE `Monitors` ADD `VideoWriter` TINYINT NOT NULL DEFAULT '0' AFTER `SaveJPEGs`"
));
PREPARE stmt FROM @s;
EXECUTE stmt;
SET @s = (SELECT IF(
(SELECT COUNT(*)
FROM INFORMATION_SCHEMA.COLUMNS
WHERE table_name = 'Monitors'
AND table_schema = DATABASE()
AND column_name = 'EncoderParameters'
) > 0,
"SELECT 'Column EncoderParameters exists in Monitors'",
"ALTER TABLE `Monitors` ADD `EncoderParameters` TEXT NOT NULL AFTER `VideoWriter`"
));
PREPARE stmt FROM @s;
EXECUTE stmt;
SET @s = (SELECT IF(
(SELECT COUNT(*)
FROM INFORMATION_SCHEMA.COLUMNS
WHERE table_name = 'Events'
AND table_schema = DATABASE()
AND column_name = 'DefaultVideo'
) > 0,
"SELECT 'Column DefaultVideo exists in Events'",
"ALTER TABLE `Events` ADD `DefaultVideo` VARCHAR( 64 ) NOT NULL AFTER `AlarmFrames`"
));
PREPARE stmt FROM @s;
EXECUTE stmt;
SET @s = (SELECT IF(
(SELECT COUNT(*)
FROM INFORMATION_SCHEMA.COLUMNS
WHERE table_name = 'Monitors'
AND table_schema = DATABASE()
AND column_name = 'RecordAudio'
) > 0,
"SELECT 'Column RecordAudio exists in Monitors'",
"ALTER TABLE `Monitors` ADD `RecordAudio` TINYINT NOT NULL DEFAULT '0' AFTER `EncoderParameters`"
));
PREPARE stmt FROM @s;
EXECUTE stmt;

View File

@ -12,7 +12,6 @@ Alias /zm /usr/share/zoneminder/www
</IfModule>
<IfModule mod_php5.c>
<Directory /usr/share/zoneminder/www>
php_flag register_globals off
Options Indexes FollowSymLinks
<IfModule mod_dir.c>
DirectoryIndex index.php

View File

@ -49,10 +49,9 @@ New installs
Change ZM_DB_USER and ZM_DB_PASS to the values you created in the previous
step.
Additionally, you must also edit
/usr/share/zoneminder/www/api/app/Config/database.php in a similar manner.
Scroll down and change login and password to the values you created in the
previous step.
This version of zoneminder no longer requires you to make a similar change
to the credentials in /usr/share/zoneminder/www/api/app/Config/database.php
This now happens dynamically. Do *not* make any changes to this file.
4. Edit /etc/php.ini, uncomment the date.timezone line, and add your local
timezone. PHP will complain loudly if this is not set, or if it is set
@ -113,10 +112,9 @@ Upgrades
Compare /etc/zm/zm.conf to /etc/zm/zm.conf.rpmnew. Verify that zm.conf
contains any new config settings that may be in zm.conf.rpmnew.
Additionally, you must also edit
/usr/share/zoneminder/www/api/app/Config/database.php in a similar manner.
Scroll down and change login and password to the values you used
previsouly.
This version of zoneminder no longer requires you to make a similar change
to the credentials in /usr/share/zoneminder/www/api/app/Config/database.php
This now happens dynamically. Do *not* make any changes to this file.
2. Verify permissions of the zmuser account.

View File

@ -40,11 +40,6 @@ New installs
other than zmuser/zmpass then you must now edit /etc/zm.conf. Change
ZM_DB_USER and ZM_DB_PASS to the values you created in the previous step.
Additionally, you must also edit
/usr/share/zoneminder/www/api/app/Config/database.php in a similar manner.
Scroll down and change login and password to the values you created in the
previous step.
4. Edit /etc/php.ini, uncomment the date.timezone line, and add your local
timezone. PHP will complain loudly if this is not set, or if it is set
incorrectly, and these complaints will show up in the zoneminder logging
@ -89,9 +84,8 @@ New installs
Then point your web browser to http://<machine name or ip>/zm
================================================================================
UPGRADES
================================================================================
Upgrades
========
1. Verify /etc/zm.conf.
@ -105,11 +99,6 @@ New installs
Compare /etc/zm.conf to /etc/zm.conf.rpmnew. Verify that zm.conf
contains any new config settings that may be in zm.conf.rpmnew.
Additionally, you must also edit
/usr/share/zoneminder/www/api/app/Config/database.php in a similar manner.
Scroll down and change login and password to the values you used
previsouly.
2. Verify permissions of the zmuser account.
Over time, the database account permissions required for normal operation

View File

@ -47,10 +47,9 @@ New installs
Change ZM_DB_USER and ZM_DB_PASS to the values you created in the previous
step.
Additionally, you must also edit
/usr/share/zoneminder/www/api/app/Config/database.php in a similar manner.
Scroll down and change login and password to the values you created in the
previous step.
This version of zoneminder no longer requires you to make a similar change
to the credentials in /usr/share/zoneminder/www/api/app/Config/database.php
This now happens dynamically. Do *not* make any changes to this file.
4. Edit /etc/php.ini, uncomment the date.timezone line, and add your local
timezone. PHP will complain loudly if this is not set, or if it is set
@ -111,10 +110,9 @@ Upgrades
Compare /etc/zm/zm.conf to /etc/zm/zm.conf.rpmnew. Verify that zm.conf
contains any new config settings that may be in zm.conf.rpmnew.
Additionally, you must also edit
/usr/share/zoneminder/www/api/app/Config/database.php in a similar manner.
Scroll down and change login and password to the values you used
previsouly.
This version of zoneminder no longer requires you to make a similar change
to the credentials in /usr/share/zoneminder/www/api/app/Config/database.php
This now happens dynamically. Do *not* make any changes to this file.
2. Verify permissions of the zmuser account.

View File

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

View File

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

View File

@ -108,31 +108,37 @@ sub find_one {
}
sub getPath {
return Path( @_ );
return Path( @_ );
}
sub Path {
my $event = shift;
my $Storage = $event->Storage();
if ( ! $$event{Path} ) {
my $Storage = $event->Storage();
my $event_path = "";
if ( $Config{ZM_USE_DEEP_STORAGE} ) {
$event_path = join('/',
$Storage->Path(),
$event->{MonitorId},
strftime( "%y/%m/%d/%H/%M/%S",
localtime($event->Time())
),
);
} else {
$event_path = join('/',
$Storage->Path(),
$event->{MonitorId},
$event->{Id},
);
}
if ( $Config{ZM_USE_DEEP_STORAGE} ) {
if ( $event->Time() ) {
$$event{Path} = join('/',
$Storage->Path(),
$event->{MonitorId},
strftime( "%y/%m/%d/%H/%M/%S",
localtime($event->Time())
),
);
} else {
Error("Event $$event{Id} has no value for Time(), unable to determine path");
$$event{Path} = '';
}
} else {
$$event{Path} = join('/',
$Storage->Path(),
$event->{MonitorId},
$event->{Id},
);
}
} # end if
return( $event_path );
return $$event{Path};
}
sub GenerateVideo {

View File

@ -334,7 +334,7 @@ void StreamBase::openComms()
strncpy( loc_addr.sun_path, loc_sock_path, sizeof(loc_addr.sun_path) );
loc_addr.sun_family = AF_UNIX;
Debug(3, "Binding to %s", loc_sock_path );
if ( bind( sd, (struct sockaddr *)&loc_addr, strlen(loc_addr.sun_path)+sizeof(loc_addr.sun_family))+1 < 0 )
if ( bind( sd, (struct sockaddr *)&loc_addr, strlen(loc_addr.sun_path)+sizeof(loc_addr.sun_family)+1 ) < 0 )
{
Fatal( "Can't bind: %s", strerror(errno) );
}

View File

@ -256,7 +256,7 @@ echo $Storage->Name();
<?php
}
?>
<td class="colZones"><?php echo makePopupLink( '?view=zones&amp;mid='.$monitor['Id'], 'zmZones', array( 'zones', $monitor['Width'], $monitor['Height'] ), $monitor['ZoneCount'], canView( 'Monitors' ) ) ?></td>
<td class="colZones"><?php echo makePopupLink( '?view=zones&amp;mid='.$monitor['Id'], 'zmZones', array( 'zones', $monitor['Width'], $monitor['Height'] ), $monitor['ZoneCount'], $running && canView( 'Monitors' ) ) ?></td>
<?php
if ( canEdit('Monitors') )
{