Changeset 952 for LATMOS-Accounts


Ignore:
Timestamp:
04/27/12 11:34:21 (12 years ago)
Author:
nanardon
Message:
  • improve request forms
File:
1 edited

Legend:

Unmodified
Added
Removed
  • LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/DataRequest.pm

    r945 r952  
    121121    $sth_f->execute($self->id); 
    122122    while (my $res = $sth_f->fetchrow_hashref) { 
    123         if (exists($values{$res->{attributes}})) { 
    124             if (!ref($values{$res->{attributes}})) { 
    125                 if (my $v = $values{$res->{attributes}}) { 
    126                     $values{$res->{attributes}} = [ grep { $_ } ($v, $res->{value}) ]; 
     123        my $attr = $res->{attributes}; 
     124        if (exists($values{$attr})) { 
     125            if (!ref($values{$attr})) { 
     126                if (my $v = $values{$attr}) { 
     127                    $values{$attr} = [ grep { $_ } ($v, $res->{value}) ]; 
    127128                } else { 
    128                     $values{$res->{attributes}} = $res->{value}; 
     129                    $values{$attr} = $res->{value}; 
    129130                } 
    130131            } elsif ($res->{value}) { 
    131                 push(@{$values{$res->{attributes}}}, $res->{value}); 
     132                push(@{$values{$attr}}, $res->{value}); 
    132133            } 
    133134        } else { 
    134             $values{$res->{attributes}} = $res->{value}; 
     135            $values{$attr} = $res->{value}; 
    135136        } 
    136137    } 
Note: See TracChangeset for help on using the changeset viewer.