[LON-CAPA-cvs] cvs: loncom /publisher lonpublisher.pm

www www at source.lon-capa.org
Wed Oct 26 11:05:26 EDT 2011


www		Wed Oct 26 15:05:26 2011 EDT

  Modified files:              
    /loncom/publisher	lonpublisher.pm 
  Log:
  Bug #1320
  
  
Index: loncom/publisher/lonpublisher.pm
diff -u loncom/publisher/lonpublisher.pm:1.272 loncom/publisher/lonpublisher.pm:1.273
--- loncom/publisher/lonpublisher.pm:1.272	Tue Oct 25 14:28:17 2011
+++ loncom/publisher/lonpublisher.pm	Wed Oct 26 15:05:25 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Publication Handler
 #
-# $Id: lonpublisher.pm,v 1.272 2011/10/25 14:28:17 www Exp $
+# $Id: lonpublisher.pm,v 1.273 2011/10/26 15:05:25 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1878,15 +1878,15 @@
     my ($r,$fn,$thisdisfn)=@_;
     $fn=~s/\/+/\//g;
     $thisdisfn=~s/\/+/\//g;
-    my $resdir=
-	$Apache::lonnet::perlvar{'lonDocRoot'}.'/res/'.$cudom.'/'.$cuname.'/'.
-	$thisdisfn;
+    my $thisdisresdir=$thisdisfn;
+    $thisdisresdir=~s/^\/priv\//\/res\//;
+    my $resdir='/home/httpd/html'.$thisdisresdir;
     $r->print(&Apache::lonhtmlcommon::start_pick_box()
              .&Apache::lonhtmlcommon::row_title(&mt('Directory'))
             .'<span class="LC_filename">'.$thisdisfn.'</span>'
             .&Apache::lonhtmlcommon::row_closure()
             .&Apache::lonhtmlcommon::row_title(&mt('Target'))
-            .'<span class="LC_filename">'.$resdir.'</span>'
+            .'<span class="LC_filename">'.$thisdisresdir.'</span>'
     );
 
     my $dirptr=16384;		# Mask indicating a directory in stat.cmode.
@@ -1925,7 +1925,7 @@
 	    if ($filename=~/\.(\w+)$/) { $extension=$1; }
 	    if ($cmode&$dirptr) {
 		if (($filename!~/^\./) && ($env{'form.pubrec'})) {
-		    &publishdirectory($r,$fn.'/'.$filename,$thisdisfn.'/'.$filename);
+		    &publishdirectory($r,$docroot.$fn.'/'.$filename,$thisdisfn.'/'.$filename);
 		}
 	    } elsif ((&Apache::loncommon::fileembstyle($extension) ne 'hdn') &&
 		     ($filename!~/^[\#\.]/) && ($filename!~/\~$/)) {
@@ -2167,7 +2167,7 @@
 
     if ($fn=~/\/$/) {
 # -------------------------------------------------------- This is a directory
-	&publishdirectory($r,$fn,$thisdisfn);
+	&publishdirectory($r,$docroot.$fn,$thisdisfn);
 	$r->print('<hr /><a href="'.$thisdisfn.'">'.&mt('Return to Directory').'</a>');
     } else {
 # ---------------------- Evaluate individual file, and then output information.




More information about the LON-CAPA-cvs mailing list