[LON-CAPA-cvs] cvs: loncom /publisher loncfile.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Mon, 10 Feb 2003 23:19:46 -0000
albertel Mon Feb 10 18:19:46 2003 EDT
Modified files:
/loncom/publisher loncfile.pm
Log:
- I think new file works as one migth expect now Fixes BUG#1246
Index: loncom/publisher/loncfile.pm
diff -u loncom/publisher/loncfile.pm:1.24 loncom/publisher/loncfile.pm:1.25
--- loncom/publisher/loncfile.pm:1.24 Mon Feb 10 18:13:17 2003
+++ loncom/publisher/loncfile.pm Mon Feb 10 18:19:45 2003
@@ -9,7 +9,7 @@
# and displays a page showing the results of the action.
#
#
-# $Id: loncfile.pm,v 1.24 2003/02/10 23:13:17 albertel Exp $
+# $Id: loncfile.pm,v 1.25 2003/02/10 23:19:45 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -776,7 +776,7 @@
$request->print('<p>File exists.</p></form>');
}
else {
- $request->print('<p>Make new file <tt>'.$newfilename.'</tt>?</p>');
+ $request->print('<p>Make new file <tt>'.$dir.'/'.$newfilename.'</tt>?</p>');
my $dest=&MakeFinalUrl($request,$fullpath);
&Debug($request, "Cancel url is: ".$cancelurl);
&Debug($request, "Dest url is: ".$dest);
@@ -852,16 +852,16 @@
} elsif ($ENV{'form.action'} eq 'newfile' ||
$ENV{'form.action'} eq 'newhtmlfile' ||
$ENV{'form.action'} eq 'newproblemfile') {
- if($ENV{'form.newfilename'}) {
- my $newfilename = $ENV{'form.newfilename'};
- if (!defined($dir)) {
- $fn=~m:(.*)/:;
- $dir=$1;
+ if($ENV{'form.newfilename'}) {
+ my $newfilename = $ENV{'form.newfilename'};
+ if (!defined($dir)) {
+ $fn=~m:(.*)/:;
+ $dir=$1;
+ }
+ &NewFile1($r, $uname, $udom, $dir, $newfilename);
+ } else {
+ $r->print('<p>No new filename specified.</p></form>');
}
- &NewFile1($r, $uname, $udom, $dir, $fn, $newfilename);
- }else {
- $r->print('<p>No new filename specified.</p></form>');
- }
}
}