projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c4c2f76
)
Codevereinfachung
author
Moritz Bunkus
<m.bunkus@linet-services.de>
Fri, 1 Jun 2007 09:14:41 +0000
(09:14 +0000)
committer
Moritz Bunkus
<m.bunkus@linet-services.de>
Fri, 1 Jun 2007 09:14:41 +0000
(09:14 +0000)
SL/LXDebug.pm
patch
|
blob
|
history
diff --git
a/SL/LXDebug.pm
b/SL/LXDebug.pm
index
87bfd7f
..
d902e2a
100644
(file)
--- 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 };
}