[wellwell-devel] [wellwell/zoom] Allow different name than the HTML class for the database field in [zoom].
Stefan Hornburg
wellwell-devel at rt.icdevgroup.org
Sun Aug 15 14:59:35 UTC 2010
commit fcb51c9921b49a8de06d8a60b8cf86d1c08eaecb
Author: Stefan Hornburg (Racke) <racke at linuxia.de>
Date: Sun Aug 15 16:53:04 2010 +0200
Allow different name than the HTML class for the database field in [zoom].
lib/WellWell/Zoom.pm | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/lib/WellWell/Zoom.pm b/lib/WellWell/Zoom.pm
index 7c3eea9..54ef594 100644
--- a/lib/WellWell/Zoom.pm
+++ b/lib/WellWell/Zoom.pm
@@ -61,7 +61,7 @@ sub zoom {
# now determine which fields are needed
while (($key, $value) = each %{$sref->{params}->{$name}->{hash}}) {
- push @{$bref->{columns}->{$value->{table}}}, $key;
+ push @{$bref->{columns}->{$value->{table}}}, $value->{field} || $key;
}
($sql, $bind) = build_select(%$bref);
@@ -83,7 +83,7 @@ sub zoom {
while ($row = $sth->fetchrow_hashref) {
# now fill in params
while (($key, $value) = each %{$sref->{params}->{$name}->{hash}}) {
- $rep_str = $row->{$key};
+ $rep_str = $row->{$value->{field} || $key};
if ($value->{subref}) {
$rep_str = $value->{subref}->($row);
More information about the wellwell-devel
mailing list