Changeset 928 for LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/Aliases.pm
- Timestamp:
- 04/18/12 19:49:34 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/Aliases.pm
r861 r928 110 110 limit 1 111 111 }); 112 my $next = $self->get_field('forward'); 113 while (1) { 112 my @res = (); 113 my @next = @{ $self->get_field('forward') }; 114 while (my $next = shift(@next)) { 114 115 $sth->execute($next); 115 116 if (my $res = $sth->fetchrow_hashref) { 116 $next = $res->{forward}; 117 $next = ref $next 118 ? join(',', @$next) 119 : $next; 120 next; 117 push(@next, @{ $res->{forward} }); 121 118 } else { 122 last;119 push(@res, $next); 123 120 } 124 121 } 125 122 $sth->finish; 126 return $next;123 return @res ? \@res : undef; 127 124 } 128 125 if ($field =~ /^(parents|anyparents|sameforward|samedestination)$/) {
Note: See TracChangeset
for help on using the changeset viewer.