[LON-CAPA-cvs] cvs: loncom /interface domainprefs.pm londocs.pm /publisher loncfile.pm loncleanup.pm londiff.pm lonupload.pm

www www at source.lon-capa.org
Sun Oct 23 19:46:07 EDT 2011


www		Sun Oct 23 23:46:07 2011 EDT

  Modified files:              
    /loncom/interface	domainprefs.pm londocs.pm 
    /loncom/publisher	loncfile.pm loncleanup.pm londiff.pm lonupload.pm 
  Log:
  Bug #1320
  
  
Index: loncom/interface/domainprefs.pm
diff -u loncom/interface/domainprefs.pm:1.156 loncom/interface/domainprefs.pm:1.157
--- loncom/interface/domainprefs.pm:1.156	Sat Oct 22 02:00:46 2011
+++ loncom/interface/domainprefs.pm	Sun Oct 23 23:46:02 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set domain-wide configuration settings
 #
-# $Id: domainprefs.pm,v 1.156 2011/10/22 02:00:46 raeburn Exp $
+# $Id: domainprefs.pm,v 1.157 2011/10/23 23:46:02 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -4934,7 +4934,7 @@
 # See if there is anything left
     unless ($fname) { return ('error: no uploaded file'); }
     $fname="$subdir/$fname";
-    my $filepath='/home/'.$confname.'/public_html';
+    my $filepath='/home/httpd/html/priv/'.$dom.'/'.$confname;
     my ($fnamepath,$file,$fetchthumb);
     $file=$fname;
     if ($fname=~m|/|) {
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.460 loncom/interface/londocs.pm:1.461
--- loncom/interface/londocs.pm:1.460	Sat Sep 10 19:00:07 2011
+++ loncom/interface/londocs.pm	Sun Oct 23 23:46:02 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.460 2011/09/10 19:00:07 raeburn Exp $
+# $Id: londocs.pm,v 1.461 2011/10/23 23:46:02 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -176,7 +176,7 @@
 	    $newfilename=&clean($newfilename);
 	    $newfilename.='.'.$ext;
 	    my @dirs=split(/\//,$newfilename);
-	    my $path='/home/'.$ca.'/public_html';
+	    my $path='/home/httpd/html/priv/'.$cd.'/'.$ca;
 	    my $makepath=$path;
 	    my $fail=0;
 	    for (my $i=0;$i<$#dirs;$i++) {
Index: loncom/publisher/loncfile.pm
diff -u loncom/publisher/loncfile.pm:1.109 loncom/publisher/loncfile.pm:1.110
--- loncom/publisher/loncfile.pm:1.109	Sun Oct 23 01:27:34 2011
+++ loncom/publisher/loncfile.pm	Sun Oct 23 23:46:07 2011
@@ -9,7 +9,7 @@
 #  and displays a page showing the results of the action.
 #
 #
-# $Id: loncfile.pm,v 1.109 2011/10/23 01:27:34 www Exp $
+# $Id: loncfile.pm,v 1.110 2011/10/23 23:46:07 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -161,7 +161,7 @@
     $Url=~ s/\/+/\//g;
     $Url=~ s/^https?\:\/\/[^\/]+//;
     $Url=~ s/^\///;
-    $Url=~ s/(\~|priv\/)($match_username)\//\/home\/$2\/public_html\//;
+    $Url='/home/httpd/html/'.$Url;
     &Debug($r, "Returning $Url \n");
     return $Url;
 }
Index: loncom/publisher/loncleanup.pm
diff -u loncom/publisher/loncleanup.pm:1.11 loncom/publisher/loncleanup.pm:1.12
--- loncom/publisher/loncleanup.pm:1.11	Wed Sep  9 17:58:37 2009
+++ loncom/publisher/loncleanup.pm	Sun Oct 23 23:46:07 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to cleanup XML files
 #
-# $Id: loncleanup.pm,v 1.11 2009/09/09 17:58:37 bisitz Exp $
+# $Id: loncleanup.pm,v 1.12 2011/10/23 23:46:07 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -278,7 +278,7 @@
 sub phasetwo {
     # Check original file
     my ($r,$fn,$uname,$udom)=@_;
-    open(IN,'/home/'.$uname.'/public_html/'.$fn);
+    open(IN,'/home/httpd/html/priv/'.$udom.'/'.$uname.'/'.$fn);
     my $text='';
     while (my $line=<IN>) {
 	$text.=$line;
@@ -310,7 +310,7 @@
                ($env{'form.symbol'} ne 'on'));
     my ($main,$ext)=($fn=~/^(.*)\.(\w+)/);
     my $newfn=$main.'_Auto_Cleaned_Up.'.$ext;
-    open(OUT,'>/home/'.$uname.'/public_html'.$newfn);
+    open(OUT,'>/home/httpd/html/priv/'.$udom.'/'.$uname.'/'.$newfn);
     print OUT $text;
     close(OUT);
     my $newuri='/~'.$uname.$newfn;
@@ -356,10 +356,10 @@
 
 sub phasethree {
     my ($r,$fn,$uname,$udom)=@_;
-    my $old='/home/'.$uname.'/public_html/'.$fn;
+    my $old='/home/httpd/html/priv/'.$udom.'/'.$uname.'/'.$fn;
     my ($main,$ext)=($fn=~/^(.*)\.(\w+)/);
     my $newfn=$main.'_Auto_Cleaned_Up.'.$ext;
-    my $new='/home/'.$uname.'/public_html'.$newfn;
+    my $new='/home/httpd/html/priv/'.$udom.'/'.$uname.'/'.$newfn;
     if ($env{'form.accept'}) {
 	$r->print(
         '<p class="LC_info">'
Index: loncom/publisher/londiff.pm
diff -u loncom/publisher/londiff.pm:1.28 loncom/publisher/londiff.pm:1.29
--- loncom/publisher/londiff.pm:1.28	Tue Dec 14 16:26:04 2010
+++ loncom/publisher/londiff.pm	Sun Oct 23 23:46:07 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to show differences between file versions
 #
-# $Id: londiff.pm,v 1.28 2010/12/14 16:26:04 www Exp $
+# $Id: londiff.pm,v 1.29 2011/10/23 23:46:07 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -127,7 +127,7 @@
 	|| $efn =~ /\.meta$/) {
 	$r->print('<p><span class="LC_diff_removed">');
 	if ($env{'form.versionone'} eq 'priv') {
-	    my $fn='/home/'.$cuname.'/public_html/'.$efn;
+	    my $fn='/home/httpd/html/priv/'.$cudom.'/'.$cuname.'/'.$efn;
 	    @f1=&get_split_file($fn,'local');
 	    $r->print('<b>'.&mt('Construction Space Version').'</b>');
 	} else {
@@ -153,11 +153,11 @@
 	if ($env{'form.filetwo'}) {
 	    my $efn2=$env{'form.filetwo'};
 	    $efn2=~s{/\~($LONCAPA::username_re)}{}g;
-	    my $fn='/home/'.$cuname.'/public_html/'.$efn2;
+	    my $fn='/home/httpd/html/priv/'.$cudom.'/'.$cuname.'/'.$efn2;
 	    @f2=&get_split_file($fn,'local');
 	    $r->print('<tt>'.$efn2.'</tt>');
 	} elsif ($env{'form.versiontwo'} eq 'priv') {
-	    my $fn='/home/'.$cuname.'/public_html/'.$efn;
+	    my $fn='/home/httpd/html/priv/'.$cudom.'/'.$cuname.'/'.$efn;
 	    @f2=&get_split_file($fn,'local');
 	    $r->print('<b>'.&mt('Construction Space Version').'</b>');
 	} else {
Index: loncom/publisher/lonupload.pm
diff -u loncom/publisher/lonupload.pm:1.53 loncom/publisher/lonupload.pm:1.54
--- loncom/publisher/lonupload.pm:1.53	Sun Dec 26 03:09:11 2010
+++ loncom/publisher/lonupload.pm	Sun Oct 23 23:46:07 2011
@@ -2,7 +2,7 @@
 # The LearningOnline Network with CAPA
 # Handler to upload files into construction space
 #
-# $Id: lonupload.pm,v 1.53 2010/12/26 03:09:11 raeburn Exp $
+# $Id: lonupload.pm,v 1.54 2011/10/23 23:46:07 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -256,7 +256,7 @@
     &Debug($r, "Filename is ".$tfn);
     if ($tfn) {
 	&Debug($r, "Filename for tfn = ".$tfn);
-	my $target='/home/'.$uname.'/public_html'.$tfn;
+	my $target='/home/httpd/html/priv/'.$udom.'/'.$uname.'/'.$tfn;
 	&Debug($r, "target -> ".$target);
 #     target is the full filesystem path of the destination file.
 	my $base = &File::Basename::basename($fn);
@@ -407,8 +407,8 @@
     } elsif ($mode eq 'imsimport') {
         $action = '/adm/imsimport';
     }
-    my $dir_root = '/home/'.$uname.'/public_html';
-    my $url_root = '/priv/'.$uname;
+    my $dir_root = '/home/httpd/html/priv/'.$udom.'/'.$uname;
+    my $url_root = '/priv/'.$udom.'/'.$uname;
     my $path = &File::Basename::dirname($fn);
     my $filename = &HTML::Entities::encode($env{'form.filename'},'<>&"');
     my $state = &embedded_form_elems('modify_orightml',$filename,$mode).
@@ -444,8 +444,8 @@
         $action = '/adm/imsimport';
     }
     my $result;
-    my $dir_root = '/home/'.$uname.'/public_html';
-    my $url_root = '/priv/'.$uname;
+    my $dir_root = '/home/httpd/html/priv/'.$udom.'/'.$uname;
+    my $url_root = '/priv/'.$udom.'/'.$uname;
     my $path = &File::Basename::dirname($fn);
     $result .= &Apache::loncommon::modify_html_refs($mode,$path,
                               $uname,$udom,$dir_root);




More information about the LON-CAPA-cvs mailing list