Diff for /loncom/publisher/londiff.pm between versions 1.12 and 1.13

version 1.12, 2003/08/13 15:20:11 version 1.13, 2003/12/10 15:42:49
Line 54  use Apache::Constants qw(:common :http : Line 54  use Apache::Constants qw(:common :http :
 use Apache::loncacc;  use Apache::loncacc;
 use Apache::lonnet();  use Apache::lonnet();
 use Apache::loncommon();  use Apache::loncommon();
   use Apache::lonlocal;
   
 sub handler {  sub handler {
   
Line 95  sub handler { Line 96  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(&Apache::loncommon::bodytag('Resource Differences'));    $r->print(&Apache::loncommon::bodytag(&mt('Resource Differences')));
   
       
   $r->print('<h1>Compare versions of <tt>'.$efn.'</tt></h1>');    $r->print('<h1>'.&mt('Compare versions of').' <tt>'.$efn.'</tt></h1>');
         
        if (($cuname ne $ENV{'user.name'}) || ($cudom ne $ENV{'user.domain'})) {         if (($cuname ne $ENV{'user.name'}) || ($cudom ne $ENV{'user.domain'})) {
           $r->print('<h3><font color=red>Co-Author: '.$cuname.' at '.$cudom.            $r->print('<h3><font color=red>Co-Author: '.$cuname.' at '.$cudom.
Line 119  sub handler { Line 120  sub handler {
              $f1[$#f1+1]=$line;               $f1[$#f1+1]=$line;
  }   }
       }        }
       $r->print('<b>Construction Space Version</b>');        $r->print('<b>'.&mt('Construction Space Version').'</b>');
   } else {    } else {
       my $fn=        my $fn=
        '/home/httpd/html//res/'.$cudom.'/'.$cuname.'/';         '/home/httpd/html//res/'.$cudom.'/'.$cuname.'/';
       if ($ENV{'form.versionone'}) {        if ($ENV{'form.versionone'}) {
          my ($main,$suffix)=($efn=~/^(.+)\.(\w+)$/);           my ($main,$suffix)=($efn=~/^(.+)\.(\w+)$/);
          $fn.=$main.'.'.$ENV{'form.versionone'}.'.'.$suffix;           $fn.=$main.'.'.$ENV{'form.versionone'}.'.'.$suffix;
  $r->print('<b>Version '.$ENV{'form.versionone'}.'</b>');   $r->print('<b>'.&mt('Version').' '.$ENV{'form.versionone'}.'</b>');
       } else {        } else {
          $fn.=$efn;           $fn.=$efn;
  $r->print('<b>Current Version</b>');   $r->print('<b>'.&mt('Current Version').'</b>');
       }        }
       @f1=split(/\n/,&Apache::lonnet::getfile($fn));              @f1=split(/\n/,&Apache::lonnet::getfile($fn));      
   }    }
   
   $r->print('</font><br />versus<br /><font color="green">');    $r->print('</font><br />'.&mt('versus').'<br /><font color="green">');
   
   if ($ENV{'form.versiontwo'} eq 'priv') {    if ($ENV{'form.versiontwo'} eq 'priv') {
       my $fn='/home/'.$cuname.'/public_html/'.$efn;        my $fn='/home/'.$cuname.'/public_html/'.$efn;
Line 146  sub handler { Line 147  sub handler {
              $f2[$#f2+1]=$line;               $f2[$#f2+1]=$line;
  }   }
       }        }
       $r->print('<b>Construction Space Version</b>');        $r->print('<b>'.&mt('Construction Space Version').'</b>');
   } else {    } else {
       my $fn=        my $fn=
        '/home/httpd/html/res/'.$cudom.'/'.$cuname.'/';         '/home/httpd/html/res/'.$cudom.'/'.$cuname.'/';
       if ($ENV{'form.versiontwo'}) {        if ($ENV{'form.versiontwo'}) {
          my ($main,$suffix)=($efn=~/^(.+)\.(\w+)$/);           my ($main,$suffix)=($efn=~/^(.+)\.(\w+)$/);
          $fn.=$main.'.'.$ENV{'form.versiontwo'}.'.'.$suffix;           $fn.=$main.'.'.$ENV{'form.versiontwo'}.'.'.$suffix;
  $r->print('<b>Version '.$ENV{'form.versiontwo'}.'</b>');   $r->print('<b>'.&mt('Version').' '.$ENV{'form.versiontwo'}.'</b>');
       } else {        } else {
          $fn.=$efn;           $fn.=$efn;
  $r->print('<b>Current Version</b>');   $r->print('<b>'.&mt('Current Version').'</b>');
       }        }
       @f2=split(/\n/,&Apache::lonnet::getfile($fn));              @f2=split(/\n/,&Apache::lonnet::getfile($fn));      
   }    }
Line 187  sub handler { Line 188  sub handler {
   $r->print('</pre>');    $r->print('</pre>');
   
 } else {  } else {
     $r->print('<h1><font color=red>Binary File</font></h1>');      $r->print('<h1><font color=red>'.&mt('Binary File').'</font></h1>');
 }  }
   $r->print('<center><a href="javascript:window.close();">Close This Window</a></center></body></html>');     $r->print('<center><a href="javascript:window.close();">'.&mt('Close This Window').'</a></center></body></html>'); 
   return OK;      return OK;  
 }  }
   

Removed from v.1.12  
changed lines
  Added in v.1.13


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