Diff for /loncom/interface/lonhtmlcommon.pm between versions 1.131 and 1.133

version 1.131, 2006/06/01 19:30:49 version 1.133, 2006/06/14 18:34:46
Line 150  sub get_recent { Line 150  sub get_recent {
   
 # Create hash with key as time and recent as value  # Create hash with key as time and recent as value
     my %time_hash = ();      my %time_hash = ();
       my $nfrozen = 0;
     foreach (keys %recent) {      foreach (keys %recent) {
         my $thistime=(split(/\&/,$recent{$_}))[0];          my ($thistime,$thisvalue)=(split(/\&/,$recent{$_}));
           if (($thisvalue eq 'role_frozen') && ($area='roles')) {
               $thistime=time+$nfrozen;
               $nfrozen++;
           }
         $time_hash{$thistime} = $_;          $time_hash{$thistime} = $_;
     }      }
   
Line 160  sub get_recent { Line 165  sub get_recent {
     my $idx = 1;      my $idx = 1;
     foreach (reverse sort keys %time_hash) {      foreach (reverse sort keys %time_hash) {
        $return_hash{$time_hash{$_}} =         $return_hash{$time_hash{$_}} =
                   &unescape((split(/\&/,$recent{$_}))[1]);                    &unescape((split(/\&/,$recent{$time_hash{$_}}))[1]);
        if ($n && ($idx++ >= $n)) {last;}         if ($n && ($idx++ >= $n)) {last;}
     }      }
   
Line 948  sub r_print { Line 953  sub r_print {
 # ------------------------------------------------------- Puts directory header  # ------------------------------------------------------- Puts directory header
   
 sub crumbs {  sub crumbs {
     my ($uri,$target,$prefix,$form,$size,$noformat)=@_;      my ($uri,$target,$prefix,$form,$size,$noformat,$skiplast)=@_;
     if (! defined($size)) {      if (! defined($size)) {
         $size = '+2';          $size = '+2';
     }      }
Line 964  sub crumbs { Line 969  sub crumbs {
  foreach my $dir (split('/',$uri)) {   foreach my $dir (split('/',$uri)) {
             if (! $dir) { next; }              if (! $dir) { next; }
             $path .= $dir;              $path .= $dir;
     unless ($path eq $uri) { $path.='/'; }      if ($path eq $uri) {
    if ($skiplast) {
       $output.=$dir;
                       last;
    } 
       } else {
    $path.='/'; 
       }
             my $linkpath = &Apache::loncommon::escape_single($path);              my $linkpath = &Apache::loncommon::escape_single($path);
             if ($form) {              if ($form) {
  $linkpath=   $linkpath=

Removed from v.1.131  
changed lines
  Added in v.1.133


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>