mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
: minor code cleanup
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@21555 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
141cacdf0f
commit
4b8518af01
@ -241,17 +241,20 @@ sub CommandConfigdb {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub _cfgDB_readConfig() {
|
sub _cfgDB_readConfig() {
|
||||||
if(!open(my $CONFIG, '<', 'configDB.conf')) {
|
my ($conf,@config);
|
||||||
|
if(!open($conf, '<', 'configDB.conf')) {
|
||||||
Log3('configDB', 1, 'Cannot open database configuration file configDB.conf');
|
Log3('configDB', 1, 'Cannot open database configuration file configDB.conf');
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
my @config=<$CONFIG>;
|
my @config=<$conf>;
|
||||||
close($CONFIG);
|
close($conf);
|
||||||
|
|
||||||
use vars qw(%configDB);
|
use vars qw(%configDB);
|
||||||
|
|
||||||
my %dbconfig;
|
my %dbconfig;
|
||||||
eval { join("", @config) };
|
## no critic
|
||||||
|
eval join("", @config) ;
|
||||||
|
## critic
|
||||||
|
|
||||||
my $cfgDB_dbconn = $dbconfig{connection};
|
my $cfgDB_dbconn = $dbconfig{connection};
|
||||||
my $cfgDB_dbuser = $dbconfig{user};
|
my $cfgDB_dbuser = $dbconfig{user};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user