[LON-CAPA-cvs] cvs: rat / lonwrapper.pm

raeburn raeburn@source.lon-capa.org
Wed, 21 Oct 2009 23:29:10 -0000


raeburn		Wed Oct 21 23:29:10 2009 EDT

  Modified files:              
    /rat	lonwrapper.pm 
  Log:
  - Only re-attach query string if there is one.
  
  
Index: rat/lonwrapper.pm
diff -u rat/lonwrapper.pm:1.34 rat/lonwrapper.pm:1.35
--- rat/lonwrapper.pm:1.34	Wed Oct 21 22:46:31 2009
+++ rat/lonwrapper.pm	Wed Oct 21 23:29:10 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Wrapper for external and binary files as standalone resources
 #
-# $Id: lonwrapper.pm,v 1.34 2009/10/21 22:46:31 raeburn Exp $
+# $Id: lonwrapper.pm,v 1.35 2009/10/21 23:29:10 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -133,7 +133,9 @@
 	    $ENV{'QUERY_STRING'}=~s/(^|\&)symb=[^\&]*/$1/;
             $ENV{'QUERY_STRING'} =~ s/\&$//;  
 	}
-	$url.=(($url=~/\?/)?'&':'?').$ENV{'QUERY_STRING'}; 
+        unless ($ENV{'QUERY_STRING'} eq '') {
+	    $url.=(($url=~/\?/)?'&':'?').$ENV{'QUERY_STRING'};
+        }
 	# reappend the query arguments
 	$r->print(&wrapper($orgurl,$url));
     } # not just the menu