--- loncom/lonnet/perl/lonnet.pm 2006/03/08 21:47:15 1.720 +++ loncom/lonnet/perl/lonnet.pm 2006/03/27 23:00:18 1.722 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.720 2006/03/08 21:47:15 albertel Exp $ +# $Id: lonnet.pm,v 1.722 2006/03/27 23:00:18 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -850,6 +850,7 @@ sub save_cache { my ($r)=@_; if (! $r->is_initial_req()) { return DECLINED; } &purge_remembered(); + #&Apache::loncommon::validate_page(); undef(%env); return OK; } @@ -4740,6 +4741,13 @@ sub GetFileTimestamp { sub stat_file { my ($uri) = @_; $uri = &clutter($uri); + + # we want just the url part without the unneeded accessor url bits + if ($file =~ m-^/adm/-) { + $file=~s-^/adm/wrapper/-/-; + $file=~s-^/adm/coursedocs/showdoc/-/-; + } + my ($udom,$uname,$file,$dir); if ($uri =~ m-^/(uploaded|editupload)/-) { ($udom,$uname,$file) = @@ -4760,6 +4768,7 @@ sub stat_file { my ($result) = &dirlist($file,$udom,$uname,$dir); my @stats = split('&', $result); + if($stats[0] ne 'empty' && $stats[0] ne 'no_such_dir') { shift(@stats); #filename is first return @stats;