Diff for /loncom/publisher/londiff.pm between versions 1.6 and 1.9

version 1.6, 2001/12/04 15:34:57 version 1.9, 2002/09/16 13:05:49
Line 41 Line 41
 # 03/31,04/03 Gerd Kortemeyer)  # 03/31,04/03 Gerd Kortemeyer)
 #  #
 # 05/02/01,05/09 Gerd Kortemeyer  # 05/02/01,05/09 Gerd Kortemeyer
   # 12/13 Scott Harrison
   #
   ###
   
 package Apache::londiff;  package Apache::londiff;
   
Line 50  use File::Copy; Line 53  use File::Copy;
 use Algorithm::Diff qw(diff);  use Algorithm::Diff qw(diff);
 use Apache::Constants qw(:common :http :methods);  use Apache::Constants qw(:common :http :methods);
 use Apache::loncacc;  use Apache::loncacc;
   use Apache::lonnet();
   use Apache::loncommon();
   
 sub handler {  sub handler {
   
Line 57  sub handler { Line 62  sub handler {
   
 # Get query string for limited number of parameters  # Get query string for limited number of parameters
   
     map {     &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
        my ($name, $value) = split(/=/,$_);                                         ['filename','versiontwo','versionone']);
        $value =~ tr/+/ /;  
        $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg;  
        if (($name eq 'filename') || ($name eq 'versiontwo') ||   
            ($name eq 'versionone')) {  
            unless ($ENV{'form.'.$name}) {  
               $ENV{'form.'.$name}=$value;  
    }  
        }  
     } (split(/&/,$ENV{'QUERY_STRING'}));  
   
 # Get the files  # Get the files
   
   my $cuname=$ENV{'user.name'};    my $cuname=$ENV{'user.name'};
Line 96  sub handler { Line 91  sub handler {
   
   $r->print('<html><head><title>LON-CAPA Construction Diffs</title></head>');    $r->print('<html><head><title>LON-CAPA Construction Diffs</title></head>');
   
   $r->print('<body bgcolor="#FFFFFF">');    $r->print(&Apache::loncommon::bodytag('Resource Differences'));
   
       
   $r->print('<h1>Compare versions of <tt>'.$efn.'</tt></h1>');    $r->print('<h1>Compare versions of <tt>'.$efn.'</tt></h1>');
Line 107  sub handler { Line 102  sub handler {
       }        }
   
   
  if (&Apache::lonnet::fileembstyle(($efn=~/\.(\w+)$/)) eq   if (&Apache::loncommon::fileembstyle(($efn=~/\.(\w+)$/)) eq
       'ssi') {        'ssi') {
   if ($ENV{'form.versionone'} eq 'priv') {    if ($ENV{'form.versionone'} eq 'priv') {
       my $fn='/home/'.$cuname.'/public_html/'.$efn;        my $fn='/home/'.$cuname.'/public_html/'.$efn;

Removed from v.1.6  
changed lines
  Added in v.1.9


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