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

raeburn raeburn at source.lon-capa.org
Sun Oct 30 21:22:25 EDT 2011


raeburn		Mon Oct 31 01:22:25 2011 EDT

  Modified files:              
    /loncom/interface	londocs.pm 
  Log:
  - use lonDocRoot perlvar in place of static string: '/home/httpd/html'.
  - link to show diffs will open in new window/tab.
  
  
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.461 loncom/interface/londocs.pm:1.462
--- loncom/interface/londocs.pm:1.461	Sun Oct 23 23:46:02 2011
+++ loncom/interface/londocs.pm	Mon Oct 31 01:22:25 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.461 2011/10/23 23:46:02 www Exp $
+# $Id: londocs.pm,v 1.462 2011/10/31 01:22:25 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -176,7 +176,7 @@
 	    $newfilename=&clean($newfilename);
 	    $newfilename.='.'.$ext;
 	    my @dirs=split(/\//,$newfilename);
-	    my $path='/home/httpd/html/priv/'.$cd.'/'.$ca;
+	    my $path=$r->dir_config('lonDocRoot')."/priv/$cd/$ca";
 	    my $makepath=$path;
 	    my $fail=0;
 	    for (my $i=0;$i<$#dirs;$i++) {
@@ -2631,7 +2631,7 @@
                     $r->print(' <a href="/adm/diff?filename='.
 			      &Apache::lonnet::clutter($root.'.'.$extension).
 			      '&versionone='.$prevvers.
-			      '">'.&mt('Diffs').'</a>');
+			      '" target="diffs">'.&mt('Diffs').'</a>');
 		}
 		$r->print('</span><br />');
                 if (++$entries_count % $entries_per_col == 0) {




More information about the LON-CAPA-cvs mailing list