Diff for /loncom/lonenc.pm between versions 1.15 and 1.17

version 1.15, 2006/05/30 12:45:12 version 1.17, 2006/09/28 20:47:13
Line 32  use strict; Line 32  use strict;
 use Apache::lonnet;  use Apache::lonnet;
 use Crypt::IDEA;  use Crypt::IDEA;
 use Time::HiRes qw(gettimeofday);  use Time::HiRes qw(gettimeofday);
 use lib '/home/httpd/lib/perl/';  
 use LONCAPA;  use LONCAPA;
     
 sub encryptseed {  sub encryptseed {
Line 47  sub unencrypted { Line 46  sub unencrypted {
     my $uri=shift;      my $uri=shift;
     $uri=~s/^\/enc\/(\d+)\///;      $uri=~s/^\/enc\/(\d+)\///;
     my $cmdlength=$1;      my $cmdlength=$1;
       # strip any added extension
       $uri=~s/\.[^.]*//;
     my $seed=&encryptseed();      my $seed=&encryptseed();
     unless ($seed) {      unless ($seed) {
  return '/'.$uri;   return '/'.$uri;
Line 130  sub encrypt_ref { Line 131  sub encrypt_ref {
     if (!$value) { next; }      if (!$value) { next; }
     my $href=&Apache::lonnet::hreflocation($Apache::lonxml::pwd[-1],$value);      my $href=&Apache::lonnet::hreflocation($Apache::lonxml::pwd[-1],$value);
     if ($href !~ /^http:/) {      if ($href !~ /^http:/) {
    # IE really wants an extension
    my ($extension) = ($href =~ m/(\.[^.]*)$/);
  $href = &Apache::lonenc::encrypted($href,$force_enc);   $href = &Apache::lonenc::encrypted($href,$force_enc);
    $href .= $extension;
     }      }
     $token->[2]->{$name}=$href;      $token->[2]->{$name}=$href;
  }   }

Removed from v.1.15  
changed lines
  Added in v.1.17


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