[LON-CAPA-cvs] cvs: loncom /publisher loncfile.pm lonpubdir.pm
www
lon-capa-cvs@mail.lon-capa.org
Fri, 20 Aug 2004 16:29:15 -0000
www Fri Aug 20 12:29:15 2004 EDT
Modified files:
/loncom/publisher loncfile.pm lonpubdir.pm
Log:
Bug #2450: deleting un-openable files from Construction Space
Index: loncom/publisher/loncfile.pm
diff -u loncom/publisher/loncfile.pm:1.59 loncom/publisher/loncfile.pm:1.60
--- loncom/publisher/loncfile.pm:1.59 Thu Aug 12 02:50:15 2004
+++ loncom/publisher/loncfile.pm Fri Aug 20 12:29:15 2004
@@ -9,7 +9,7 @@
# and displays a page showing the results of the action.
#
#
-# $Id: loncfile.pm,v 1.59 2004/08/12 06:50:15 albertel Exp $
+# $Id: loncfile.pm,v 1.60 2004/08/20 16:29:15 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1166,6 +1166,7 @@
$r=shift;
+ &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['decompress','action','filename','newfilename']);
&Debug($r, "loncfile.pm - handler entered");
&Debug($r, " filename: ".$ENV{'form.filename'});
@@ -1184,7 +1185,6 @@
} elsif($ENV{'QUERY_STRING'} && $ENV{'form.phase'} ne 'two') {
#Just hijack the script only the first time around to inject the
#correct information for further processing
- &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['decompress']);
$fn=&Apache::lonnet::unescape($ENV{'form.decompress'});
$fn=&URLToPath($fn);
$ENV{'form.action'}="decompress";
Index: loncom/publisher/lonpubdir.pm
diff -u loncom/publisher/lonpubdir.pm:1.62 loncom/publisher/lonpubdir.pm:1.63
--- loncom/publisher/lonpubdir.pm:1.62 Fri Jul 2 05:41:07 2004
+++ loncom/publisher/lonpubdir.pm Fri Aug 20 12:29:15 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Construction Space Directory Lister
#
-# $Id: lonpubdir.pm,v 1.62 2004/07/02 09:41:07 albertel Exp $
+# $Id: lonpubdir.pm,v 1.63 2004/08/20 16:29:15 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -318,6 +318,10 @@
my $bgcolor='#FFAA99';
my $title=' ';
my $publish_button=&mt('Publish');
+ my $action_buttons=
+ '<br /><a target="_top" href="/adm/cfile?action=delete&filename=/~'.
+ $uname.'/'.$thisdisfn.'/'.$filename.'">'.
+ &mt('Delete').'</a>';
if (-e $resdir.'/'.$filename) {
my ($rdev,$rino,$rmode,$rnlink,
$ruid,$rgid,$rrdev,$rsize,
@@ -332,6 +336,8 @@
if (&Apache::lonnet::metadata($targetdir.'/'.$filename,'obsolete')) {
$status=&mt('Obsolete');
$bgcolor='#AAAAAA';
+ } else {
+ $action_buttons='';
}
$title='<a href="/res/'.$targetdir.'/'.$filename.
'.meta" target=cat>'.
@@ -341,6 +347,7 @@
&mt(&getCopyRightString($targetdir.'/'.$filename)).' '.
&mt(&getSourceRightString($targetdir.'/'.$filename));
$bgcolor='#FFFF77';
+ $action_buttons='';
$title='<a href="/res/'.$targetdir.'/'.$filename.'.meta" target=cat>'.
&getTitleString($targetdir.'/'.$filename).'</a>';
if (&Apache::loncommon::fileembstyle(($filename=~/\.(\w+)$/)) eq 'ssi') {
@@ -372,6 +379,7 @@
'<img src="'.&Apache::loncommon::icon($filename).'" /></td>').
'<td><a target="_parent" href="/adm/publish?filename=/~'.
$uname.$thisdisfn.'/'.$filename.'">'.$publish_button.'</a>'.
+ $action_buttons.
'</td>'.
'<td><font face="arial">'.
'<a href="'.$linkdir.'/'.$filename.'" target="_top">'.