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 2006/07/31 18:41:20 UTC

svn commit: r427164 - /lenya/trunk/src/impl/java/org/apache/lenya/cms/observation/ObservationManager.java

Author: andreas
Date: Mon Jul 31 09:41:20 2006
New Revision: 427164

URL: http://svn.apache.org/viewvc?rev=427164&view=rev
Log:
Adapted hack in ObservationManager to UUIDs

Modified:
    lenya/trunk/src/impl/java/org/apache/lenya/cms/observation/ObservationManager.java

Modified: lenya/trunk/src/impl/java/org/apache/lenya/cms/observation/ObservationManager.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/impl/java/org/apache/lenya/cms/observation/ObservationManager.java?rev=427164&r1=427163&r2=427164&view=diff
==============================================================================
--- lenya/trunk/src/impl/java/org/apache/lenya/cms/observation/ObservationManager.java (original)
+++ lenya/trunk/src/impl/java/org/apache/lenya/cms/observation/ObservationManager.java Mon Jul 31 09:41:20 2006
@@ -168,10 +168,18 @@
             DocumentFactory factory = DocumentUtil.createDocumentIdentityMap(this.manager, session);
             
             String docPath = path.substring((pubId + "/content/" + area).length());
-            String docId = docPath.substring(0, docPath.length() - "/index_en".length());
+            
+            String uuid;
+            if (docPath.charAt(docPath.length() - 3) == '_') {
+                uuid = docPath.substring(0, docPath.length() - "/index_en".length());
+            }
+            else {
+                uuid = docPath.substring(1, docPath.length() - "/en".length());
+            }
+            
             String language = docPath.substring(docPath.length() - "en".length());
             
-            doc = factory.get(pub, area, docId, language);
+            doc = factory.get(pub, area, uuid, language);
 
             if (doc == null) {
                 // this happens if the node was not a document node



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