cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From step...@apache.org
Subject cvs commit: xml-cocoon2/src/scratchpad/src/org/apache/cocoon/acting SourceMultiAction.java
Date Fri, 30 Aug 2002 08:01:47 GMT
stephan     2002/08/30 01:01:47

  Modified:    src/scratchpad/src/org/apache/cocoon/acting
                        SourceMultiAction.java
  Log:
  Made filenname parameter optional.
  
  Revision  Changes    Path
  1.11      +6 -1      xml-cocoon2/src/scratchpad/src/org/apache/cocoon/acting/SourceMultiAction.java
  
  Index: SourceMultiAction.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/acting/SourceMultiAction.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- SourceMultiAction.java	25 Aug 2002 08:57:28 -0000	1.10
  +++ SourceMultiAction.java	30 Aug 2002 08:01:46 -0000	1.11
  @@ -127,6 +127,8 @@
   
           String uri = parameters.getParameter(SOURCE_URI, request.getParameter(SOURCE_URI));
           String filename = parameters.getParameter(SOURCE_NAME, request.getParameter(SOURCE_NAME));
  +        if (filename!=null) 
  +            filename = filename.trim();
           String principal = parameters.getParameter(PRINCIPAL,
                                 request.getParameter(PRINCIPAL));
           String password = parameters.getParameter(PASSWORD,
  @@ -137,6 +139,9 @@
               File uploadFile = ((FilePartFile)request.get(UPLOAD_FILE)).getFile();
   
               try {
  +                if ((filename==null) || (filename.length()==0))
  +                    filename = ((FilePartFile)request.get(UPLOAD_FILE)).getFilePath();
  +
                   if ((uri==null) || (uri.length()==0))
                       uri = filename;
                   else if (uri.endsWith("/"))
  
  
  

----------------------------------------------------------------------
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