--- loncom/publisher/londiff.pm 2001/05/02 21:01:47 1.1
+++ loncom/publisher/londiff.pm 2001/05/02 21:35:15 1.2
@@ -49,6 +49,18 @@ sub handler {
my @f1=();
my @f2=();
+ $r->content_type('text/html');
+ $r->send_http_header;
+
+ $r->print('
LON-CAPA Construction Diffs');
+
+ $r->print('');
+
+
+ $r->print('Compare versions of '.$ENV{'form.filename'}.'
');
+
+ if (&Apache::lonnet::fileembstyle(($ENV{'form.filename'}=~/\.(\w+)$/)) eq
+ 'ssi') {
if ($ENV{'form.versionone'} eq 'priv') {
my $fn='/home/'.$ENV{'user.name'}.'/public_html/'.$ENV{'form.filename'};
if (-e $fn) {
@@ -100,16 +112,6 @@ sub handler {
# Start page output
- $r->content_type('text/html');
- $r->send_http_header;
-
- $r->print('LON-CAPA Construction Diffs');
-
- $r->print('');
-
-
- $r->print('Compare versions of '.$ENV{'form.filename'}.'
');
-
my $chunk;
my $line;
@@ -132,7 +134,9 @@ sub handler {
}
$r->print('');
-
+} else {
+ $r->print('Binary File
');
+}
$r->print('');
return OK;
}
@@ -143,3 +147,4 @@ __END__
+