Undo ZM_VERSION changes
This commit is contained in:
parent
ffe46978d2
commit
8c7e633d8f
|
@ -165,7 +165,7 @@ if ( $check && $Config{ZM_CHECK_FOR_UPDATES} )
|
|||
|
||||
use LWP::UserAgent;
|
||||
my $ua = LWP::UserAgent->new;
|
||||
$ua->agent( "ZoneMinder Update Agent/".$Config{ZM_VERSION} );
|
||||
$ua->agent( "ZoneMinder Update Agent/".ZM_VERSION );
|
||||
if ( $Config{ZM_UPDATE_CHECK_PROXY} ) {
|
||||
$ua->proxy( "http", $Config{ZM_UPDATE_CHECK_PROXY} );
|
||||
}
|
||||
|
@ -374,13 +374,13 @@ if ( $version )
|
|||
my ( $detaint_version ) = $version =~ /^([\w.]+)$/;
|
||||
$version = $detaint_version;
|
||||
|
||||
if ( $Config{ZM_VERSION} eq $version )
|
||||
if ( ZM_VERSION eq $version )
|
||||
{
|
||||
print( "\nDatabase already at version $version, update aborted.\n\n" );
|
||||
exit( 0 );
|
||||
}
|
||||
|
||||
print( "\nInitiating database upgrade to version ".$Config{ZM_VERSION}." from version $version\n" );
|
||||
print( "\nInitiating database upgrade to version ".ZM_VERSION." from version $version\n" );
|
||||
if ( $interactive )
|
||||
{
|
||||
if ( $Config{ZM_DYN_DB_VERSION} && $Config{ZM_DYN_DB_VERSION} ne $version )
|
||||
|
@ -489,7 +489,7 @@ if ( $version )
|
|||
}
|
||||
|
||||
|
||||
print( "\nUpgrading database to version ".$Config{ZM_VERSION}."\n" );
|
||||
print( "\nUpgrading database to version ".ZM_VERSION."\n" );
|
||||
|
||||
# Update config first of all
|
||||
loadConfigFromDB();
|
||||
|
@ -1050,7 +1050,7 @@ if ( $version )
|
|||
|
||||
if ( $cascade )
|
||||
{
|
||||
my $installed_version = $Config{ZM_VERSION};
|
||||
my $installed_version = ZM_VERSION;
|
||||
my $sql = "update Config set Value = ? where Name = ?";
|
||||
my $sth = $dbh->prepare_cached( $sql ) or die( "Can't prepare '$sql': ".$dbh->errstr() );
|
||||
my $res = $sth->execute( "$installed_version", "ZM_DYN_DB_VERSION" ) or die( "Can't execute: ".$sth->errstr() );
|
||||
|
@ -1061,7 +1061,7 @@ if ( $version )
|
|||
zmDbDisconnect();
|
||||
die( "Can't find upgrade from version '$version'" );
|
||||
}
|
||||
print( "\nDatabase upgrade to version ".$Config{ZM_VERSION}." successful.\n\n" );
|
||||
print( "\nDatabase upgrade to version ".ZM_VERSION." successful.\n\n" );
|
||||
}
|
||||
zmDbDisconnect();
|
||||
exit( 0 );
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
// This section contains options substituted by the zmconfig.pl utility, do not edit these directly
|
||||
//
|
||||
define( "ZM_CONFIG", "@ZM_CONFIG@" ); // Path to config file
|
||||
define( "ZM_VERSION", "@VERSION@" ); // Version
|
||||
|
||||
$configFile = ZM_CONFIG;
|
||||
$localConfigFile = basename($configFile);
|
||||
|
@ -47,13 +48,6 @@ while ( !feof($cfg) )
|
|||
}
|
||||
fclose( $cfg );
|
||||
|
||||
// Define, and override any given in config file
|
||||
// to override, must be done AFTER asignment, cripes
|
||||
// @VERSION@ hasn't been defined in tests, perhaps configure.ac needs fix?
|
||||
if (!defined("ZM_VERSION")) { // avoid double definition warning
|
||||
define( "ZM_VERSION", "@VERSION@" ); // Version
|
||||
}
|
||||
|
||||
//
|
||||
// This section is options normally derived from other options or configuration
|
||||
//
|
||||
|
|
|
@ -48,6 +48,3 @@ ZM_DB_PASS=@ZM_DB_PASS@
|
|||
|
||||
# Host of this machine
|
||||
ZM_SERVER_HOST=
|
||||
|
||||
# Version of zoneminder - must be set
|
||||
ZM_VERSION=1.28.1
|
||||
|
|
Loading…
Reference in New Issue