Diff for /loncom/publisher/lonpublisher.pm between versions 1.2 and 1.3

version 1.2, 2000/11/29 12:28:46 version 1.3, 2000/11/29 19:52:34
Line 14  use Apache::File; Line 14  use Apache::File;
 use Apache::Constants qw(:common :http :methods);  use Apache::Constants qw(:common :http :methods);
 use HTML::TokeParser;  use HTML::TokeParser;
   
   my %addid;
   
 sub publish {  sub publish {
     my ($source,$target,$style)=@_;      my ($source,$target,$style)=@_;
     my $logfile;      my $logfile;
Line 23  sub publish { Line 25  sub publish {
     print $logfile       print $logfile 
 "\n\n================== Publish ".localtime()." =================\n";  "\n\n================== Publish ".localtime()." =================\n";
   
       if (($style eq 'ssi') || ($style eq 'rat')) {
   # ------------------------------------------------------- This needs processing
    my $copyfile=$source.'.save';
           {
       my $org=Apache::File->new($source);
               my $cop=Apache::File->new('>'.$copyfile);
               while (my $line=<$org>) { print $cop $line; }
           }
           if (-e $copyfile) {
       print $logfile "Copied original file to ".$copyfile."\n";
           } else {
               return "Failed to write backup copy, FAIL";
           }
   
       }
     my $version='';      my $version='';
         
     return 'Version '.$version.', SUCCESS';      return 'Version '.$version.', SUCCESS';
Line 74  sub handler { Line 91  sub handler {
   
 # --------------------------------- File is there and owned, init lookup tables  # --------------------------------- File is there and owned, init lookup tables
   
     %addid=();
   
     {
         my $fh=Apache::File->new($r->dir_config('lonTabDir').'/addid.tab');
         while (<$fh>=~/(\w+)\s+(\w+)/) {
             $addid{$1}=$2;
         }
     }
 # ----------------------------------------------------------- Start page output  # ----------------------------------------------------------- Start page output
   
   $r->content_type('text/html');    $r->content_type('text/html');

Removed from v.1.2  
changed lines
  Added in v.1.3


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