Bug 301 - Added upgrade to 1.22.1, converts general alarm max FPS setting to

monitor specific.


git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@1905 e3e1d417-86f3-4887-817a-d78f3d33393f
pull/27/merge
stan 2006-03-31 12:50:29 +00:00
parent 8ddb996c14
commit 8b4ba55581
1 changed files with 27 additions and 0 deletions

View File

@ -566,6 +566,33 @@ if ( $version )
$cascade = !undef;
}
if ( $cascade || $version eq "1.22.0" )
{
# Patch the database
patchDB( $dbh, "1.22.0" );
# Check for maximum FPS setting and update alarm max fps settings
{
print( "Updating monitors. Please wait.\n" );
if ( ZM_NO_MAX_FPS_ON_ALARM )
{
# Update the individual monitor settings to match the previous global one
my $sql = "update Monitors set AlarmMaxFPS = NULL";
my $sth = $dbh->prepare_cached( $sql ) or die( "Can't prepare '$sql': ".$dbh->errstr() );
my $res = $sth->execute() or die( "Can't execute: ".$sth->errstr() );
}
else
{
# Update the individual monitor settings to match the previous global one
my $sql = "update Monitors set AlarmMaxFPS = MaxFPS";
my $sth = $dbh->prepare_cached( $sql ) or die( "Can't prepare '$sql': ".$dbh->errstr() );
my $res = $sth->execute() or die( "Can't execute: ".$sth->errstr() );
}
}
$cascade = !undef;
}
if ( $cascade )
{
my $installed_version = ZM_VERSION;