You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2003/08/12 17:52:49 UTC

cvs commit: cocoon-lenya/src/java/org/apache/lenya/cms/ac2/file PublicationFilePolicyManager.java

andreas     2003/08/12 08:52:49

  Modified:    src/java/org/apache/lenya/cms/ac2/file
                        PublicationFilePolicyManager.java
  Log:
  checking if URL represents document
  
  Revision  Changes    Path
  1.4       +5 -3      cocoon-lenya/src/java/org/apache/lenya/cms/ac2/file/PublicationFilePolicyManager.java
  
  Index: PublicationFilePolicyManager.java
  ===================================================================
  RCS file: /home/cvs/cocoon-lenya/src/java/org/apache/lenya/cms/ac2/file/PublicationFilePolicyManager.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PublicationFilePolicyManager.java	12 Aug 2003 15:15:54 -0000	1.3
  +++ PublicationFilePolicyManager.java	12 Aug 2003 15:52:49 -0000	1.4
  @@ -169,12 +169,14 @@
           String path;
   
           try {
  -            document = DefaultDocumentBuilder.getInstance().buildDocument(publication, webappUrl);
  +            if (DefaultDocumentBuilder.getInstance().isDocument(publication, webappUrl)) {
  +                document = DefaultDocumentBuilder.getInstance().buildDocument(publication, webappUrl);
  +            }
           } catch (DocumentBuildException e) {
               throw new AccessControlException(e);
           }
   
  -        if (document.getFile().exists()) {
  +        if (document != null && document.getFile().exists()) {
               path = "/" + document.getArea() + document.getId();
               getLogger().debug("Document exists, using document ID [" + path + "]");
           } else {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-cvs-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-cvs-help@cocoon.apache.org