--- loncom/publisher/lonretrieve.pm 2001/04/04 03:59:15 1.5 +++ loncom/publisher/lonretrieve.pm 2001/05/02 23:00:05 1.9 @@ -11,7 +11,7 @@ # 03/23 Guy Albertelli # 03/24,03/29 Gerd Kortemeyer) # -# 03/31,04/03 Gerd Kortemeyer +# 03/31,04/03,05/02 Gerd Kortemeyer package Apache::lonretrieve; @@ -31,10 +31,11 @@ sub phaseone { my $resdir=$resfn; $resdir=~s/\/[^\/]+$/\//; - $fn=~/^\/(.+)\.(\w+)$/; + $fn=~/\/([^\/]+)\.(\w+)$/; my $main=$1; my $suffix=$2; - + + if (-e $resfn) { $r->print('
'. ''. ''. @@ -54,7 +55,14 @@ sub phaseone { $version.'">'.$version.''. localtime($rmtime).''. ''. - 'Metadata Version '.$version.''); + 'Metadata Version '.$version.''); + if (&Apache::lonnet::fileembstyle($suffix) eq 'ssi') { + $r->print( + '  Diffs with Version '.$version.''); + } + $r->print(''); } } closedir(DIR); @@ -65,10 +73,20 @@ sub phaseone { $r->print(''. 'Current'.localtime($rmtime). ''. - 'Metadata current version

'. + 'Metadata current version'); + if (&Apache::lonnet::fileembstyle($suffix) eq 'ssi') { + $r->print( + '  Diffs with current Version'); + } + $r->print('

'. 'Retrieval of an old version will '. 'overwrite the file currently in construction space

'. '

'); +} else { + $r->print('

No previous versions published.

'); +} } sub phasetwo { @@ -158,3 +176,6 @@ sub handler { $r->print(''); return OK; } + +1; +__END__