From f593fd87df697e132d92330c4e22584a614454e5 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Sat, 21 Jul 2007 18:11:04 +0000 Subject: * base work towards utf8-cleanness (it is now possible to handle vendor-OSes whose name contain UTF8-characters * fixed problem with locale-specific number format being used during DB- creation (fixes the problem that database access would only work once for de_DE-locales [reported by Detlef Schulz]) git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1266 95ad53e4-c205-0410-b2fa-d234c58c8868 --- config-db/OpenSLX/MetaDB/SQLite.pm | 8 ++++---- config-db/OpenSLX/MetaDB/mysql.pm | 8 ++++---- config-db/slxconfig | 2 +- config-db/slxconfig-demuxer | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) (limited to 'config-db') diff --git a/config-db/OpenSLX/MetaDB/SQLite.pm b/config-db/OpenSLX/MetaDB/SQLite.pm index f6b395d0..558aebf9 100644 --- a/config-db/OpenSLX/MetaDB/SQLite.pm +++ b/config-db/OpenSLX/MetaDB/SQLite.pm @@ -49,10 +49,10 @@ sub connect ## no critic (ProhibitBuiltinHomonyms) $dbSpec = "dbname=$dbPath/$openslxConfig{'db-name'}"; } vlog(1, "trying to connect to SQLite-database <$dbSpec>"); - $self->{'dbh'} = - DBI->connect("dbi:SQLite:$dbSpec", undef, undef, - {PrintError => 0, AutoCommit => 1}) - or die _tr("Cannot connect to database <%s> (%s)", $dbSpec, $DBI::errstr); + $self->{'dbh'} = DBI->connect( + "dbi:SQLite:$dbSpec", undef, undef, + {PrintError => 0, AutoCommit => 1, unicode => 1} + ) or die _tr("Cannot connect to database <%s> (%s)", $dbSpec, $DBI::errstr); return 1; } diff --git a/config-db/OpenSLX/MetaDB/mysql.pm b/config-db/OpenSLX/MetaDB/mysql.pm index 661b744d..8206ec2a 100644 --- a/config-db/OpenSLX/MetaDB/mysql.pm +++ b/config-db/OpenSLX/MetaDB/mysql.pm @@ -46,10 +46,10 @@ sub connect ## no critic (ProhibitBuiltinHomonyms) } my $user = (getpwuid($>))[0]; vlog(1, "trying to connect user <$user> to mysql-database <$dbSpec>"); - $self->{'dbh'} = - DBI->connect("dbi:mysql:$dbSpec", $user, '', {PrintError => 0}) - or die _tr("Cannot connect to database <%s> (%s)", $dbSpec, $DBI::errstr); - return; + $self->{'dbh'} = DBI->connect( + "dbi:mysql:$dbSpec", $user, 'secret', {PrintError => 0} + ) or die _tr("Cannot connect to database '%s' (%s)", $dbSpec, $DBI::errstr); + return 1; } sub schemaConvertTypeDescrToNative diff --git a/config-db/slxconfig b/config-db/slxconfig index 88eb2769..2887d3fa 100755 --- a/config-db/slxconfig +++ b/config-db/slxconfig @@ -1,4 +1,4 @@ -#! /usr/bin/perl +#! /usr/bin/perl -CLADS # ----------------------------------------------------------------------------- # Copyright (c) 2006, 2007 - OpenSLX GmbH # diff --git a/config-db/slxconfig-demuxer b/config-db/slxconfig-demuxer index 91a79849..bff7436e 100755 --- a/config-db/slxconfig-demuxer +++ b/config-db/slxconfig-demuxer @@ -1,4 +1,4 @@ -#! /usr/bin/perl +#! /usr/bin/perl -CLADS # ----------------------------------------------------------------------------- # Copyright (c) 2006, 2007 - OpenSLX GmbH # -- cgit v1.2.3-55-g7522