parse ZM_SERVER_HOST into ZM_SERVER

This commit is contained in:
Isaac Connor 2015-10-02 12:32:41 +00:00
parent 4edf997791
commit b0b69c5176
1 changed files with 12 additions and 0 deletions

View File

@ -102,6 +102,18 @@ BEGIN
}
$sth->finish();
#$dbh->disconnect();
if ( ! exists $Config{ZM_SERVER_ID} ) {
$sth = $dbh->prepare_cached( 'SELECT * FROM Servers WHERE Name=?' );
if ( $Config{ZM_SERVER_NAME} ) {
$res = $sth->execute( $Config{ZM_SERVER_NAME} );
} elsif ( $Config{ZM_SERVER_HOST} ) {
$res = $sth->execute( $Config{ZM_SERVER_HOST} );
} else {
}
my $result = $sth->fetchrow_hashref();
$Config{ZM_SERVER_ID} = $$result{Id};
}
}
1;