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 2009/03/22 13:08:46 UTC

svn commit: r757175 - /lenya/contributions/2_0_X/modules/atom/java/src/org/apache/lenya/modules/atom/Lock.java

Author: andreas
Date: Sun Mar 22 12:08:46 2009
New Revision: 757175

URL: http://svn.apache.org/viewvc?rev=757175&view=rev
Log:
Use modifiable session for unlocking.

Modified:
    lenya/contributions/2_0_X/modules/atom/java/src/org/apache/lenya/modules/atom/Lock.java

Modified: lenya/contributions/2_0_X/modules/atom/java/src/org/apache/lenya/modules/atom/Lock.java
URL: http://svn.apache.org/viewvc/lenya/contributions/2_0_X/modules/atom/java/src/org/apache/lenya/modules/atom/Lock.java?rev=757175&r1=757174&r2=757175&view=diff
==============================================================================
--- lenya/contributions/2_0_X/modules/atom/java/src/org/apache/lenya/modules/atom/Lock.java (original)
+++ lenya/contributions/2_0_X/modules/atom/java/src/org/apache/lenya/modules/atom/Lock.java Sun Mar 22 12:08:46 2009
@@ -1,12 +1,14 @@
 package org.apache.lenya.modules.atom;
 
 import org.apache.commons.httpclient.HttpStatus;
+import org.apache.lenya.cms.publication.Document;
 import org.apache.lenya.modules.rest.RestView;
 
 public class Lock extends AtomHandler {
 
     public RestView delete() throws Exception {
-        DocumentWrapper wrapper = getDocumentWrapper();
+    	Document doc = getModifiableDocument();
+        DocumentWrapper wrapper = new DocumentWrapper(doc);
         if (wrapper.canCheckIn()) {
             wrapper.checkin();
             return new MessageView("Document successfully unlocked.", HttpStatus.SC_OK);



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