Diff for /loncom/publisher/lonpublisher.pm between versions 1.70 and 1.71

version 1.70, 2002/01/16 19:09:31 version 1.71, 2002/01/17 15:13:56
Line 43 Line 43
 # 12/06,12/07 Gerd Kortemeyer  # 12/06,12/07 Gerd Kortemeyer
 # 12/15,12/16 Scott Harrison  # 12/15,12/16 Scott Harrison
 # 12/25 Gerd Kortemeyer  # 12/25 Gerd Kortemeyer
   # YEAR=2002
   # 1/16,1/17 Scott Harrison
   # 1/17 Gerd Kortemeyer
 #  #
 ###  ###
   
Line 200  sub urlfixup { Line 203  sub urlfixup {
     }      }
     if ($url=~/^http\:\/\//) { return $url; }      if ($url=~/^http\:\/\//) { return $url; }
     $url=~s/\~$cuname/res\/$cudom\/$cuname/;      $url=~s/\~$cuname/res\/$cudom\/$cuname/;
       return $url;
   }
   
   
   sub absoluteurl {
       my ($url,$target)=@_;
       unless ($url) { return ''; }
     if ($target) {      if ($target) {
  $target=~s/\/[^\/]+$//;   $target=~s/\/[^\/]+$//;
        $url=&Apache::lonnet::hreflocation($target,$url);         $url=&Apache::lonnet::hreflocation($target,$url);
Line 315  sub publish { Line 325  sub publish {
                               print $logfile 'URL: '.$tag.':'.$oldurl.' - '.                                print $logfile 'URL: '.$tag.':'.$oldurl.' - '.
   $newurl."\n";    $newurl."\n";
   }    }
                           $allow{$newurl}=1;                            $allow{&absoluteurl($newurl,$target)}=1;
                       }                        }
                   }                    }
   
Line 334  sub publish { Line 344  sub publish {
                                   $oldcodebase.' - '.                                    $oldcodebase.' - '.
   $codebase."\n";    $codebase."\n";
  }   }
                          $allow{$codebase.'/*'}=1;                           $allow{&absoluteurl($codebase,$target).'/*'}=1;
       } else {        } else {
                         foreach ('archive','code','object') {                          foreach ('archive','code','object') {
                           if (defined($parms{$_})) {                            if (defined($parms{$_})) {
Line 344  sub publish { Line 354  sub publish {
                                   print $logfile 'Allow: applet '.$_.':'.                                    print $logfile 'Allow: applet '.$_.':'.
                                   $oldurl.' allows '.                                    $oldurl.' allows '.
   $newurl."\n";    $newurl."\n";
                               $allow{$newurl}=1;                                $allow{&absoluteurl($newurl,$target)}=1;
                           }                            }
                         }                          }
                       }                        }
Line 407  sub publish { Line 417  sub publish {
        }         }
            }             }
         }          }
           $allowstr=~s/\n+/\n/g;
         $outstring=~s/(\<\/[^\>]+\>\s*)$/$allowstr$1/s;          $outstring=~s/(\<\/[^\>]+\>\s*)$/$allowstr$1/s;
   
 # ------------------------------------------------------------- Write modified  # ------------------------------------------------------------- Write modified

Removed from v.1.70  
changed lines
  Added in v.1.71


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