[LON-CAPA-cvs] cvs: loncom /interface printout.pl
sakharuk
lon-capa-cvs@mail.lon-capa.org
Wed, 12 May 2004 18:44:51 -0000
sakharuk Wed May 12 14:44:51 2004 EDT
Modified files:
/loncom/interface printout.pl
Log:
Used lonDocRoot and lonUserDir instead of /home/httpd/(html|lonUsers) everywhere where possibl everywhere where possible,e,
Index: loncom/interface/printout.pl
diff -u loncom/interface/printout.pl:1.57 loncom/interface/printout.pl:1.58
--- loncom/interface/printout.pl:1.57 Wed May 12 14:34:47 2004
+++ loncom/interface/printout.pl Wed May 12 14:44:50 2004
@@ -1,7 +1,7 @@
#!/usr/bin/perl
# CGI-script to run LaTeX, dvips, ps2ps, ps2pdf etc.
#
-# $Id: printout.pl,v 1.57 2004/05/12 18:34:47 sakharuk Exp $
+# $Id: printout.pl,v 1.58 2004/05/12 18:44:50 sakharuk Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -100,10 +100,10 @@
if ($eps_f=~/\/home\/([^\/]+)\/public_html\//) {
$eps_f=~s/\/home\/([^\/]+)\/public_html/$1/;
$eps_f = '/home/httpd/prtspool/'.$eps_f;
- } elsif ($eps_f=~/\/home\/httpd\/html\/res\//) {
- $eps_f=~m/\/home\/httpd\/html\/res\/(.+)/;
+ } elsif ($eps_f=~/$Apache::lonnet::perlvar{'lonDocRoot'}\/res\//) {
+ $eps_f=~m/$Apache::lonnet::perlvar{'lonDocRoot'}\/res\/(.+)/;
$eps_f = '/home/httpd/prtspool/'.$1;
- } elsif ($eps_f=~/\/home\/httpd\/lonUsers\//) {
+ } elsif ($eps_f=~/$Apache::lonnet::perlvar{'lonUsersDir'}\//) {
$eps_f=~/$Apache::lonnet::perlvar{'lonUsersDir'}\/([^\/]+)\/\w\/\w\/\w\/(.+)/;
$eps_f = '/home/httpd/prtspool/'.$1.'/'.$2;
}
@@ -119,7 +119,7 @@
if ($adv) {
my $prettyname=$not_eps;
$prettyname=~s|/home/([^/]+)/public_html|/priv/$1|;
- $prettyname=~s|/home/httpd/html/|/|;
+ $prettyname=~s|$Apache::lonnet::perlvar{'lonDocRoot'}/|/|;
&Apache::lonhtmlcommon::Update_PrgWin('',\%prog_state,'Converting to EPS '.$prettyname); }
$done_conversion{$not_eps}=1;
$status = $image->Read($not_eps);