From 5c2ae82598a028c1c36ac7f1b5893374d43e7fd9 Mon Sep 17 00:00:00 2001 From: betateilchen <> Date: Thu, 15 Jan 2015 09:50:15 +0000 Subject: [PATCH] configDB.pm: code cleanup git-svn-id: https://svn.fhem.de/fhem/trunk@7578 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/configDB.pm | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/fhem/configDB.pm b/fhem/configDB.pm index 5e899ecb6..53845a522 100644 --- a/fhem/configDB.pm +++ b/fhem/configDB.pm @@ -88,6 +88,11 @@ # # 2014-09-30 - added support for device based userattr # +# 2015-01-12 - changed use fhem function createUniqueId() +# instead of database calls +# +# 2015-01-15 - changed remove 99_Utils.pm from filelist +# ############################################################################## # @@ -548,8 +553,8 @@ sub cfgDB_FW_fileList($$@) { foreach my $f (@files) { next if( $f !~ m/^$dir/ ); $f =~ s,$dir\/,,; - next if($f !~ m,^$re$,); - push @ret, "$f.configDB" unless $f eq '99_Utils.pm'; + next if($f !~ m,^$re$, || $f eq '99_Utils.pm'); + push @ret, "$f.configDB"; } return @ret; } @@ -666,17 +671,6 @@ sub _cfgDB_Rotate($) { return $uuid; } -# return a UUID based on DB-model -#sub _cfgDB_Uuid() { -# my $fhem_dbh = _cfgDB_Connect; -# my $uuid; -# $uuid = $fhem_dbh->selectrow_array('select lower(hex(randomblob(16)))') if($cfgDB_dbtype eq 'SQLITE'); -# $uuid = $fhem_dbh->selectrow_array('select uuid()') if($cfgDB_dbtype eq 'MYSQL'); -# $uuid = $fhem_dbh->selectrow_array('select uuid_generate_v4()') if($cfgDB_dbtype eq 'POSTGRESQL'); -# $fhem_dbh->disconnect(); -# return $uuid; -#} - # 2015-01-12 use the fhem default function sub _cfgDB_Uuid() { return createUniqueId();