2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

configDB.pm:

use createUniqueId()
do not show 99_Utils.pm in "Edit files"

git-svn-id: https://svn.fhem.de/fhem/trunk@7543 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
betateilchen 2015-01-13 11:37:50 +00:00
parent 5a2aac47f8
commit 920e5b9064
2 changed files with 16 additions and 8 deletions

View File

@ -1,5 +1,7 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
# Do not insert empty lines here, update check depends on it.
- changed: configDB.pm use fhem function createUniqueId()
configDB.pm do not show 99_Utils.pm in „Edit files“
- fix: CUL_MAX: fix usage of advanced culfw features on non-CUL devices
- changed: 09_CUL_FHTTK: small update to the documentation in order to
simulate the same

View File

@ -100,6 +100,7 @@ use DBI;
#
sub AnalyzeCommandChain($$;$);
sub Log3($$$);
sub createUniqueId();
##################################################
# Forward declarations inside this library
@ -548,7 +549,7 @@ sub cfgDB_FW_fileList($$@) {
next if( $f !~ m/^$dir/ );
$f =~ s,$dir\/,,;
next if($f !~ m,^$re$,);
push @ret, "$f.configDB";
push @ret, "$f.configDB" unless $f eq '99_Utils.pm';
}
return @ret;
}
@ -666,14 +667,19 @@ sub _cfgDB_Rotate($) {
}
# 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() {
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;
return createUniqueId();
}
##################################################