From: janw Date: Thu, 27 Nov 2008 16:40:33 +0000 (+0000) Subject: Brace fix. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f748fd94c723b59ace0506cc03dedc5b5ff11898;p=gosa.git Brace fix. references #586 git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13061 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-si/modules/DBsqlite.pm b/gosa-si/modules/DBsqlite.pm index a571a7bb6..875080d7c 100644 --- a/gosa-si/modules/DBsqlite.pm +++ b/gosa-si/modules/DBsqlite.pm @@ -33,33 +33,33 @@ sub new { sub create_table { - my $self = shift; - my $table_name = shift; - my $col_names_ref = shift; - my @col_names; - foreach my $col_name (@$col_names_ref) { - my @t = split(" ", $col_name); - $col_name = $t[0]; - push(@col_names, $col_name); - } + my $self = shift; + my $table_name = shift; + my $col_names_ref = shift; + my @col_names; + foreach my $col_name (@$col_names_ref) { + my @t = split(" ", $col_name); + $col_name = $t[0]; + push(@col_names, $col_name); + } - $col_names->{ $table_name } = $col_names_ref; - my $col_names_string = join("', '", @col_names); - my $sql_statement = "CREATE TABLE IF NOT EXISTS $table_name ( '$col_names_string' )"; + $col_names->{ $table_name } = $col_names_ref; + my $col_names_string = join("', '", @col_names); + my $sql_statement = "CREATE TABLE IF NOT EXISTS $table_name ( '$col_names_string' )"; eval { my $res = $self->{dbh}->do($sql_statement); }; if($@) { $self->{dbh}->do("ANALYZE"); - } - eval { - my $res = $self->{dbh}->do($sql_statement); - }; - if($@) { - &main::daemon_log("ERROR: $sql_statement failed with $@", 1); + eval { + my $res = $self->{dbh}->do($sql_statement); + }; + if($@) { + &main::daemon_log("ERROR: $sql_statement failed with $@", 1); + } } - return 0; + return 0; }