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

www lon-capa-cvs@mail.lon-capa.org
Mon, 06 Mar 2006 23:35:46 -0000


www		Mon Mar  6 18:35:46 2006 EDT

  Modified files:              
    /rat	lonpageflip.pm 
  Log:
  Bug #4692: foo?register=1?symb=
  
  
Index: rat/lonpageflip.pm
diff -u rat/lonpageflip.pm:1.64 rat/lonpageflip.pm:1.65
--- rat/lonpageflip.pm:1.64	Thu Feb 23 14:29:26 2006
+++ rat/lonpageflip.pm	Mon Mar  6 18:35:43 2006
@@ -2,7 +2,7 @@
 #
 # Page flip handler
 #
-# $Id: lonpageflip.pm,v 1.64 2006/02/23 19:29:26 albertel Exp $
+# $Id: lonpageflip.pm,v 1.65 2006/03/06 23:35:43 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -399,7 +399,7 @@
 
 		  &Apache::loncommon::content_type($r,'text/html');
 		  my $url='http://'.$ENV{'HTTP_HOST'}.$redirecturl;
-		  if ($redirectsymb ne '') { $url.='?symb='.&Apache::lonnet::escape($redirectsymb); }
+		  if ($redirectsymb ne '') { $url.=($url=~/\?/?'&':'?').'symb='.&Apache::lonnet::escape($redirectsymb); }
                   $r->header_out(Location => $url);
                   return REDIRECT;
 	      } else {
@@ -433,7 +433,7 @@
                      foreach my $id (@possibilities) {
                         $r->print(
                               '<tr><td><a href="'.
-                              $multichoicehash{'src_'.$id}.'?symb=' .
+                              $multichoicehash{'src_'.$id}.($multichoicehash{'src_'.$id}=~/\?/?'&':'?').'symb=' .
                                   Apache::lonnet::escape($multichoicehash{'symb_'.$id}).'">'.
                               $multichoicehash{'title_'.$id}.
                               '</a></td><td>'.$multichoicehash{'type_'.$id}.