tdraier     2005/03/29 12:27:01 CEST

  Modified files:
    core/src/java/org/jahia/services/fields 
                                            JahiaFieldBaseService.java 
  Log:
  fixed merge error on loadField synchronization
  
  Revision  Changes    Path
  1.11      +32 -32    
jahia/core/src/java/org/jahia/services/fields/JahiaFieldBaseService.java
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/core/src/java/org/jahia/services/fields/JahiaFieldBaseService.java.diff?r1=1.10&r2=1.11&f=h
  
  
  
  Index: JahiaFieldBaseService.java
  ===================================================================
  RCS file: 
/home/cvs/repository/jahia/core/src/java/org/jahia/services/fields/JahiaFieldBaseService.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- JahiaFieldBaseService.java        25 Feb 2005 14:35:06 -0000      1.10
  +++ JahiaFieldBaseService.java        29 Mar 2005 10:27:01 -0000      1.11
  @@ -707,18 +707,18 @@
                   }
                   logger.debug(msg);
               }
  -        }
  -        if (loadVersion.isCurrent()) {
  -            theField = (JahiaField) 
cacheFields.get(getCacheFieldActiveEntryKey(fieldID));
  -        } else if (loadVersion.isStaging()) {
  -            theField = (JahiaField) 
cacheFields.get(getCacheFieldStagingEntryKey(fieldID));
  -            if (theField == null) {
  -                // no staging entry found, let's try in the active ones.
  +
  +            if (loadVersion.isCurrent()) {
                   theField = (JahiaField) 
cacheFields.get(getCacheFieldActiveEntryKey(fieldID));
  +            } else if (loadVersion.isStaging()) {
  +                theField = (JahiaField) 
cacheFields.get(getCacheFieldStagingEntryKey(fieldID));
  +                if (theField == null) {
  +                    // no staging entry found, let's try in the active ones.
  +                    theField = (JahiaField) 
cacheFields.get(getCacheFieldActiveEntryKey(fieldID));
  +                }
               }
  -        }
   
  -        ContentField contentField = null;
  +            ContentField contentField = null;
               if (theField == null) {
                   // field was not found in cache or is not available in 
active mode.
                   contentField = ContentField.getField(fieldID);
  @@ -729,32 +729,32 @@
                   return null;
               }
   
  -        if (contentField == null) {
  -            contentField = ContentField.getField(fieldID);
  -        }
  -        if ( loadVersion.isCurrent()
  -             && theField.getWorkflowState() != 
EntryLoadRequest.ACTIVE_WORKFLOW_STATE ){
  -            // we only allow live data
  -            return null;
  -        } else if ( loadVersion.isStaging() ){
  -            if (!loadVersion.isWithMarkedForDeletion()
  -                && 
contentField.isMarkedForDelete(theField.getLanguageCode())) {
  -                // we don't want marked for delete data
  +            if (contentField == null) {
  +                contentField = ContentField.getField(fieldID);
  +            }
  +            if ( loadVersion.isCurrent()
  +                    && theField.getWorkflowState() != 
EntryLoadRequest.ACTIVE_WORKFLOW_STATE ){
  +                // we only allow live data
                   return null;
  +            } else if ( loadVersion.isStaging() ){
  +                if (!loadVersion.isWithMarkedForDeletion()
  +                        && 
contentField.isMarkedForDelete(theField.getLanguageCode())) {
  +                    // we don't want marked for delete data
  +                    return null;
  +                }
               }
  -        }
   
  -        /* Doesn't work with engine like "searchengine"
  -        if ( theField != null
  +            /* Doesn't work with engine like "searchengine"
  +            if ( theField != null
               && !"core".equalsIgnoreCase(jParams.getEngine()) ){
  -           // we found an active but we need to check that it is not marked 
for delete
  -           if (contentField == null) {
  -               contentField = ContentField.getField(fieldID);
  -           }
  -           if ( contentField.isMarkedForDelete(theField.getLanguageCode()) ){
  -               return null;
  -           }
  -        }*/
  +            // we found an active but we need to check that it is not marked 
for delete
  +            if (contentField == null) {
  +            contentField = ContentField.getField(fieldID);
  +            }
  +            if ( contentField.isMarkedForDelete(theField.getLanguageCode()) 
){
  +            return null;
  +            }
  +            }*/
   
               // check fields ACL
               if (jParams == null) {
  @@ -778,7 +778,7 @@
                               JahiaException.USER_ERROR, 
JahiaException.ERROR_SEVERITY);
                   }
               }
  -
  +        }
           // We can use the Field Cache only to store instance of JahiaField
           // but each time we get it from this cache, we need to call it's 
load()
           // method to ensure dynamically Expression evaluation and Contextual
  

Reply via email to