[LON-CAPA-cvs] cvs: loncom /interface lonhelper.pm

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 12 Jul 2005 06:52:51 -0000


albertel		Tue Jul 12 02:52:51 2005 EDT

  Modified files:              
    /loncom/interface	lonhelper.pm 
  Log:
  - file selector in helper was assuming directory user was trying to print belonged to the default domain of the machine (which isn't tru on multi domain machines)
  
  
Index: loncom/interface/lonhelper.pm
diff -u loncom/interface/lonhelper.pm:1.109 loncom/interface/lonhelper.pm:1.110
--- loncom/interface/lonhelper.pm:1.109	Fri Jul  8 13:32:06 2005
+++ loncom/interface/lonhelper.pm	Tue Jul 12 02:52:48 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # .helper XML handler to implement the LON-CAPA helper
 #
-# $Id: lonhelper.pm,v 1.109 2005/07/08 17:32:06 albertel Exp $
+# $Id: lonhelper.pm,v 1.110 2005/07/12 06:52:48 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2594,14 +2594,16 @@
     # If the subdirectory is in local CSTR space
     my $metadir;
     if ($subdir =~ m|/home/([^/]+)/public_html/(.*)|) {
-        my $user = $1;
-        my $domain = $Apache::lonnet::perlvar{'lonDefDomain'};
+	my ($user,$domain)= 
+	    &Apache::loncacc::constructaccess($subdir,
+				     $Apache::lonnet::perlvar{'lonDefDomain'});
 	$metadir='/res/'.$domain.'/'.$user.'/'.$2;
         @fileList = &Apache::lonnet::dirlist($subdir, $domain, $user, '');
     } elsif ($subdir =~ m|^~([^/]+)/(.*)$|) {
 	$subdir='/home/'.$1.'/public_html/'.$2;
-        my $user = $1;
-        my $domain = $Apache::lonnet::perlvar{'lonDefDomain'};
+	my ($user,$domain)= 
+	    &Apache::loncacc::constructaccess($subdir,
+				     $Apache::lonnet::perlvar{'lonDefDomain'});
 	$metadir='/res/'.$domain.'/'.$user.'/'.$2;
         @fileList = &Apache::lonnet::dirlist($subdir, $domain, $user, '');
     } else {