Diff for /loncom/publisher/lonpublisher.pm between versions 1.221 and 1.223

version 1.221, 2007/03/02 23:18:19 version 1.223, 2007/04/17 23:21:06
Line 409  sub urlfixup { Line 409  sub urlfixup {
     if ($url =~ /^mailto:/i) { return $url; }      if ($url =~ /^mailto:/i) { return $url; }
     #internal document links need no fixing      #internal document links need no fixing
     if ($url =~ /^\#/) { return $url; }       if ($url =~ /^\#/) { return $url; } 
     my ($host)=($url=~/(?:(?:http|https|ftp)\:\/\/)*([^\/]+)/);      my ($host)=($url=~m{(?:(?:http|https|ftp)://)*([^/]+)});
     my %all_hostnames = &Apache::lonnet::all_hostnames();      my @lonids = &Apache::lonnet::machine_ids($host);
     foreach my $hostname (values(%all_hostnames)) {      if (@lonids) {
  if ($hostname eq $host) {   $url=~s{^(?:http|https|ftp)://}{};
     $url=~s/^(?:http|https|ftp)\:\/\///;   $url=~s/^\Q$host\E//;
             $url=~s/^\Q$host\E//;  
         }  
     }      }
     if ($url=~/^(?:http|https|ftp)\:\/\//) { return $url; }      if ($url=~m{^(?:http|https|ftp)://}) { return $url; }
     $url=~s/\~$cuname/res\/$cudom\/$cuname/;      $url=~s{\Q~$cuname\E}{res/$cudom/$cuname};
     return $url;      return $url;
 }  }
   

Removed from v.1.221  
changed lines
  Added in v.1.223


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