[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm
raeburn
raeburn at source.lon-capa.org
Wed Nov 2 19:05:07 EDT 2011
raeburn Wed Nov 2 23:05:07 2011 EDT
Modified files:
/loncom/interface loncommon.pm
Log:
- Clean-up for bug 1320.
- Restore support for dependencies in HTML files uploaded to CSTR.
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1026 loncom/interface/loncommon.pm:1.1027
--- loncom/interface/loncommon.pm:1.1026 Mon Oct 31 17:27:15 2011
+++ loncom/interface/loncommon.pm Wed Nov 2 23:05:07 2011
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.1026 2011/10/31 17:27:15 raeburn Exp $
+# $Id: loncommon.pm,v 1.1027 2011/11/02 23:05:07 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -8824,12 +8824,12 @@
my $fullpath = $dir_root.$dirpath.'/'.$path;
my $dest = $fullpath.$fname;
my $url = $url_root.$dirpath.'/'.$path.$fname;
- my @parts=split(/\//,$fullpath);
+ my @parts=split(/\//,"$dirpath/$path");
my $count;
my $filepath = $dir_root;
- for ($count=4;$count<=$#parts;$count++) {
- $filepath .= "/$parts[$count]";
- if ((-e $filepath)!=1) {
+ foreach my $subdir (@parts) {
+ $filepath .= "/$subdir";
+ if (!-e $filepath) {
mkdir($filepath,0770);
}
}
@@ -8948,7 +8948,7 @@
} elsif ($context eq 'coursedoc') {
$container = $env{'form.primaryurl'};
} else {
- $container = $env{'form.filename'};
+ $container = $Apache::lonnet::perlvar{'lonDocRoot'}.$env{'form.filename'};
}
my (%allfiles,%codebase,$output,$content);
my @changes = &get_env_multiple('form.namechange');
More information about the LON-CAPA-cvs
mailing list