- Timestamp:
- 12/02/11 11:42:17 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Model/Accounts.pm
r791 r861 56 56 } 57 57 58 sub object_navigate { 59 my ($self, $otype, $id, @filter) = @_; 60 61 my @list = $self->db->search_objects($otype, @filter); 62 63 my $i = 0; 64 for($i = 0; $i <= $#list; $i++) { 65 $list[$i] eq $id and last; 66 } 67 68 my %ptr = (); 69 $ptr{oprev} = $list[$i-1] if ($i > 0); 70 $ptr{'onext'} = $list[$i+1] if ($i < $#list); 71 $ptr{ofirst} = $list[0] if ($i > 1); 72 $ptr{'olast'} = $list[$#list] if ($i < $#list -1); 73 $ptr{list} = \@list; 74 75 return \%ptr; 76 } 77 58 78 # Such function must not be here, but in LATMOS::Accounts 59 79 # But code does not allow this at time
Note: See TracChangeset
for help on using the changeset viewer.