cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: xml-cocoon2/src/org/apache/cocoon/generation HTMLGenerator.java
Date Mon, 26 Nov 2001 12:44:36 GMT
cziegeler    01/11/26 04:44:36

  Modified:    src/org/apache/cocoon/generation Tag: cocoon_20_branch
                        HTMLGenerator.java
  Log:
  Fixed minor bug when html url already contains query parameters
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.4.2.13  +9 -2      xml-cocoon2/src/org/apache/cocoon/generation/HTMLGenerator.java
  
  Index: HTMLGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/generation/HTMLGenerator.java,v
  retrieving revision 1.4.2.12
  retrieving revision 1.4.2.13
  diff -u -r1.4.2.12 -r1.4.2.13
  --- HTMLGenerator.java	2001/11/05 11:32:37	1.4.2.12
  +++ HTMLGenerator.java	2001/11/26 12:44:36	1.4.2.13
  @@ -39,7 +39,7 @@
   /**
    * @author <a href="mailto:dims@yahoo.com">Davanum Srinivas</a>
    * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
  - * @version CVS $Revision: 1.4.2.12 $ $Date: 2001/11/05 11:32:37 $
  + * @version CVS $Revision: 1.4.2.13 $ $Date: 2001/11/26 12:44:36 $
    */
   public class HTMLGenerator extends ComposerGenerator implements Cacheable, Recyclable {
   
  @@ -90,7 +90,14 @@
               }
   
               if (query.length() > 0) {
  -                super.source = new StringBuffer(super.source).append("?").append(query.substring(
0, query.length() - 1 )).toString();
  +                query = new StringBuffer(super.source);
  +                if (super.source.indexOf("?") == -1) {
  +                    query.append('?');
  +                } else {
  +                    query.append('&');
  +                }
  +                query.append( query.substring( 0, query.length() - 1) );
  +                super.source = query.toString();
               }
           }
   
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message