lenya-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ed...@apache.org
Subject cvs commit: cocoon-lenya/src/java/org/apache/lenya/cms/cocoon/acting RevisionControllerAction.java
Date Tue, 26 Aug 2003 15:52:31 GMT
edith       2003/08/26 08:52:31

  Modified:    src/java/org/apache/lenya/cms/cocoon/acting
                        RevisionControllerAction.java
  Log:
  fix the Rollback
  
  Revision  Changes    Path
  1.24      +8 -15     cocoon-lenya/src/java/org/apache/lenya/cms/cocoon/acting/RevisionControllerAction.java
  
  Index: RevisionControllerAction.java
  ===================================================================
  RCS file: /home/cvs/cocoon-lenya/src/java/org/apache/lenya/cms/cocoon/acting/RevisionControllerAction.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- RevisionControllerAction.java	8 Aug 2003 09:09:44 -0000	1.23
  +++ RevisionControllerAction.java	26 Aug 2003 15:52:31 -0000	1.24
  @@ -65,10 +65,10 @@
   import org.apache.cocoon.environment.SourceResolver;
   
   import org.apache.lenya.cms.ac.Identity;
  +import org.apache.lenya.cms.publication.Document;
   import org.apache.lenya.cms.publication.PageEnvelope;
   import org.apache.lenya.cms.publication.PageEnvelopeFactory;
   import org.apache.lenya.cms.publication.Publication;
  -import org.apache.lenya.cms.publication.PublicationFactory;
   import org.apache.lenya.cms.rc.RCEnvironment;
   import org.apache.lenya.cms.rc.RevisionController;
   
  @@ -116,10 +116,12 @@
   
           PageEnvelope envelope = null;
           Publication publication = null;
  +        Document document = null;
   
           try {
  -            publication = PublicationFactory.getPublication(objectModel);
               envelope = PageEnvelopeFactory.getInstance().getPageEnvelope(objectModel);
  +            publication = envelope.getPublication();
  +			document =envelope.getDocument();
           } catch (Exception e) {
               getLogger().error("Resolving page envelope failed: ", e);
           }
  @@ -127,7 +129,7 @@
           //get Parameters for RC
           String publicationPath = publication.getDirectory().getCanonicalPath();
           String servletContextPath = publication.getServletContext().getCanonicalPath();
  -        RCEnvironment rcEnvironment = new RCEnvironment(servletContextPath);
  +		RCEnvironment rcEnvironment = RCEnvironment.getInstance(publication.getServletContext().getAbsolutePath());
           rcmlDirectory = rcEnvironment.getRCMLDirectory();
           rcmlDirectory = publicationPath + File.separator + rcmlDirectory;
           backupDirectory = rcEnvironment.getBackupDirectory();
  @@ -152,17 +154,8 @@
           getLogger().debug(".act(): Identity: " + identity);
           getLogger().debug(".act(): Identity: " + identityTwo);
   
  -        String docId = request.getParameter("documentid");
  -        String authoringPath =
  -            File.separator
  -                + Publication.CONTENT_PATH
  -                + File.separator
  -                + Publication.AUTHORING_AREA;
  -        filename =
  -            authoringPath
  -                + File.separator
  -                + docId.replace('/', File.separatorChar);
  -        getLogger().debug(".act(): publicationAuthPath + docId : " + authoringPath + "
: " + docId);
  +		filename = "/" + Publication.CONTENT_PATH +"/"+ document.getArea() +"/"+envelope.getDocumentPath();

  +        getLogger().debug(".act(): filename : " + filename );
           username = null;
   
           if (identity != null) {
  
  
  

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


Mime
View raw message