Put back the code that populates ZM_SERVER_ID
This commit is contained in:
parent
3058dd9463
commit
419e67caa1
|
@ -102,6 +102,19 @@ BEGIN
|
|||
}
|
||||
$sth->finish();
|
||||
#$dbh->disconnect();
|
||||
if ( ! exists $Config{ZM_SERVER_ID} ) {
|
||||
$Config{ZM_SERVER_ID} = undef;
|
||||
$sth = $dbh->prepare_cached( 'SELECT * FROM Servers WHERE Name=?' );
|
||||
if ( $Config{ZM_SERVER_NAME} ) {
|
||||
$res = $sth->execute( $Config{ZM_SERVER_NAME} );
|
||||
my $result = $sth->fetchrow_hashref();
|
||||
$Config{ZM_SERVER_ID} = $$result{Id};
|
||||
} elsif ( $Config{ZM_SERVER_HOST} ) {
|
||||
$res = $sth->execute( $Config{ZM_SERVER_HOST} );
|
||||
my $result = $sth->fetchrow_hashref();
|
||||
$Config{ZM_SERVER_ID} = $$result{Id};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub loadConfigFromDB {
|
||||
|
|
Loading…
Reference in New Issue