Ignore:
Timestamp:
12/02/11 11:42:17 (13 years ago)
Author:
nanardon
Message:
  • reimport missing files from previous svn
File:
1 edited

Legend:

Unmodified
Added
Removed
  • LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Model/Accounts.pm

    r791 r861  
    5656} 
    5757 
     58sub 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 
    5878# Such function must not be here, but in LATMOS::Accounts 
    5979# But code does not allow this at time 
Note: See TracChangeset for help on using the changeset viewer.