cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@locus.apache.org
Subject cvs commit: xml-cocoon/src/org/apache/cocoon/selection BrowserSelectorFactory.java
Date Mon, 30 Oct 2000 20:21:48 GMT
bloritsch    00/10/30 12:21:46

  Modified:    src/org/apache/cocoon/selection Tag: xml-cocoon2
                        BrowserSelectorFactory.java
  Log:
  Fixed generated code to compile with Giacomo's new  parameter type for Browser selector.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.10  +3 -2      xml-cocoon/src/org/apache/cocoon/selection/Attic/BrowserSelectorFactory.java
  
  Index: BrowserSelectorFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/selection/Attic/BrowserSelectorFactory.java,v
  retrieving revision 1.1.2.9
  retrieving revision 1.1.2.10
  diff -u -r1.1.2.9 -r1.1.2.10
  --- BrowserSelectorFactory.java	2000/10/30 18:40:48	1.1.2.9
  +++ BrowserSelectorFactory.java	2000/10/30 20:21:44	1.1.2.10
  @@ -26,7 +26,7 @@
    * @author <a href="mailto:cziegeler@sundn.de">Carsten Ziegeler</a>
    * @author <a href="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a>
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
  - * @version CVS $Revision: 1.1.2.9 $ $Date: 2000/10/30 18:40:48 $
  + * @version CVS $Revision: 1.1.2.10 $ $Date: 2000/10/30 20:21:44 $
   */
   
   
  @@ -80,7 +80,8 @@
            sb.append("if (pattern != null && objectModel.get(Cocoon.REQUEST_OBJECT)
!= null) {")
             .append("javax.servlet.http.HttpServletRequest request = (javax.servlet.http.HttpServletRequest)
objectModel.get(Cocoon.REQUEST_OBJECT);")
             .append("String userAgent = request.getHeader(\"User-Agent\");")
  -          .append("if (userAgent.indexOf(pattern) != -1) return true;");
  +	  .append("for (int i = 0; i < pattern.length; i++) {")
  +          .append("if (userAgent.indexOf(pattern[i]) != -1) return true;}");
           return sb.append("} return false;").toString();
       }
   }
  
  
  

Mime
View raw message