Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Allow different name than the HTML class for the database field in [z…
…oom].
  • Loading branch information
racke committed Aug 15, 2010
1 parent c365d35 commit fcb51c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/WellWell/Zoom.pm
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit fcb51c9

Please sign in to comment.