From: Moritz Bunkus Date: Fri, 1 Jun 2007 09:14:41 +0000 (+0000) Subject: Codevereinfachung X-Git-Tag: release-2.4.3^2~218 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=6e00b261a86eaa1ba0bc9da62bd2f42f94e1bac8;p=kivitendo-erp.git Codevereinfachung --- diff --git a/SL/LXDebug.pm b/SL/LXDebug.pm index 87bfd7f7c..d902e2ab2 100644 --- a/SL/LXDebug.pm +++ b/SL/LXDebug.pm @@ -151,15 +151,9 @@ sub dump_sql_result { return; } - my %column_lengths; - my $first_row = 1; + my %column_lengths = map { $_, length $_ } keys %{ $results->[0] }; foreach my $row (@{ $results }) { - if ($first_row) { - map { $column_lengths{$_} = length $_ } keys %{ $row }; - $first_row = 0; - } - map { $column_lengths{$_} = length $row->{$_} if (length $row->{$_} > $column_lengths{$_}) } keys %{ $row }; }