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

www lon-capa-cvs@mail.lon-capa.org
Sat, 02 Aug 2003 13:57:06 -0000


www		Sat Aug  2 09:57:06 2003 EDT

  Modified files:              
    /loncom/interface	lonprintout.pm 
  Log:
  Bug #2018: used presence of http://... as indicator for "construction space"
  - sort of arbitrary, and not always true.
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.207 loncom/interface/lonprintout.pm:1.208
--- loncom/interface/lonprintout.pm:1.207	Fri Aug  1 15:22:47 2003
+++ loncom/interface/lonprintout.pm	Sat Aug  2 09:57:05 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.207 2003/08/01 19:22:47 sakharuk Exp $
+# $Id: lonprintout.pm,v 1.208 2003/08/02 13:57:05 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -958,8 +958,7 @@
     # This will persistently load in the data we want from the
     # very first screen.
     # Detect whether we're coming from construction space
-    if ($ENV{'form.postdata'} =~ /http:\/\// ) {
-        $ENV{'form.postdata'} =~ /http:\/\/[^\/]+\/~([^\/]+)\/(.*)/;
+    if ($ENV{'form.postdata'}=~/^(?:http:\/\/[^\/]+\/|\/|)\~([^\/]+)\/(.*)$/) {
         $helper->{VARS}->{'filename'} = "/home/$1/public_html/$2";
         $helper->{VARS}->{'construction'} = 1;
     } else {