knguyen     2004/10/27 19:48:17 CEST

  Modified files:        (Branch: JAHIA-4-0-BRANCH)
    .                    build.xml 
    etc/htmleditors      htmleditors_config.xml 
    src/java/org/jahia/content ContentObject.java 
    src/java/org/jahia/services/pages ContentPage.java 
  Log:
  - ContentObject.isMarkedForDelete() returns true only if in all langs.
  - ContentPage.hasSameParentID() ignore marked for delete value.
  
  Revision   Changes    Path
  1.59.4.3   +2 -1      jahia/build.xml
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/build.xml.diff?r1=1.59.4.2&r2=1.59.4.3&f=h
  1.11.4.3   +2 -2      jahia/etc/htmleditors/htmleditors_config.xml
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/etc/htmleditors/htmleditors_config.xml.diff?r1=1.11.4.2&r2=1.11.4.3&f=h
  1.35.4.7   +23 -5     jahia/src/java/org/jahia/content/ContentObject.java
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/src/java/org/jahia/content/ContentObject.java.diff?r1=1.35.4.6&r2=1.35.4.7&f=h
  1.72.2.15  +10 -3     jahia/src/java/org/jahia/services/pages/ContentPage.java
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/src/java/org/jahia/services/pages/ContentPage.java.diff?r1=1.72.2.14&r2=1.72.2.15&f=h
  
  
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/repository/jahia/Attic/build.xml,v
  retrieving revision 1.59.4.2
  retrieving revision 1.59.4.3
  diff -u -r1.59.4.2 -r1.59.4.3
  --- build.xml 23 Aug 2004 09:24:37 -0000      1.59.4.2
  +++ build.xml 27 Oct 2004 17:48:15 -0000      1.59.4.3
  @@ -16,11 +16,11 @@
       <!--  first check if ${ant.build.properties.file} is present -->
       <target name="init" 
depends="set-build-properties-file-location,init-check-build-properties-file,check-build-properties-file">
   
  -        <property file="${ant.build.properties.file}"/>
           <property name="AppName" value="jahia"/>
           <property name="PkgName" value="jahia"/>
           <property name="version" value="4.0"/>
           <!-- read properties from ${ant.build.properties.file} -->
  +        <property file="${ant.build.properties.file}"/>
   
           <!-- disabled, must be defined in seperate properties file
           <property name="deploy.webappsroot" value="${deploy}/tomcat/webapps"/>
  @@ -160,6 +160,7 @@
                   <include name="html/**"/>
                   <include name="txt/**"/>
                   <include name="images/**"/>
  +                <include name="views/**"/>
               </fileset>
               <lib dir="${lib}/dist">
                   <exclude name="servlet.jar"/>
  
  
  
  Index: htmleditors_config.xml
  ===================================================================
  RCS file: /home/cvs/repository/jahia/etc/htmleditors/Attic/htmleditors_config.xml,v
  retrieving revision 1.11.4.2
  retrieving revision 1.11.4.3
  diff -u -r1.11.4.2 -r1.11.4.3
  --- htmleditors_config.xml    29 Sep 2004 16:49:13 -0000      1.11.4.2
  +++ htmleditors_config.xml    27 Oct 2004 17:48:16 -0000      1.11.4.3
  @@ -7,7 +7,7 @@
                <include-file>activex_htmleditor.jsp</include-file>
                
<compatibility-tester>org.jahia.services.htmleditors.MSHTMLCompatibilityTester</compatibility-tester>
                <enable-css>false</enable-css>
  -             <rank>1</rank>
  +             <rank>2</rank>
        </editor>
   
        <editor>
  @@ -16,7 +16,7 @@
                <base-directory>htmlarea</base-directory>
                <include-file>htmlarea_htmleditor.jsp</include-file>
                <enable-css>false</enable-css>
  -             <rank>2</rank>
  +             <rank>1</rank>
        </editor>
   
        <editor>
  
  
  
  Index: ContentObject.java
  ===================================================================
  RCS file: 
/home/cvs/repository/jahia/src/java/org/jahia/content/Attic/ContentObject.java,v
  retrieving revision 1.35.4.6
  retrieving revision 1.35.4.7
  diff -u -r1.35.4.6 -r1.35.4.7
  --- ContentObject.java        22 Oct 2004 14:43:11 -0000      1.35.4.6
  +++ ContentObject.java        27 Oct 2004 17:48:16 -0000      1.35.4.7
  @@ -970,21 +970,39 @@
   
       /**
        * Return true if the current content object is marked for delete
  +     * in all languages
        * @return
        */
       public boolean isMarkedForDelete() throws JahiaException{
           Set entryStates = getActiveAndStagingEntryStates();
  +        if ( entryStates.isEmpty() ){
  +            return false;
  +        }
  +        HashMap states = new HashMap();
           Iterator iterator = entryStates.iterator();
  +        Boolean bool = null;
           while ( iterator.hasNext() ){
               ContentObjectEntryState entryState =
                   (ContentObjectEntryState)iterator.next();
  -            if ( entryState.isStaging() &&
  -                 entryState.getVersionID()
  -                 ==ContentObjectEntryState.WORKFLOW_STATE_VERSIONING_DELETED ){
  -                return true;
  +            bool = (Boolean)states.get(entryState.getLanguageCode());
  +            if ( !Boolean.TRUE.equals(bool) ){
  +                if (entryState.getVersionID() !=
  +                    EntryLoadRequest.DELETED_WORKFLOW_STATE) {
  +                    states.put(entryState.getLanguageCode(), Boolean.FALSE);
  +                } else {
  +                    states.put(entryState.getLanguageCode(), Boolean.TRUE);
  +                }
               }
           }
  -        return false;
  +
  +        iterator = states.values().iterator();
  +        while ( iterator.hasNext() ){
  +            bool = (Boolean)iterator.next();
  +            if ( bool.equals(Boolean.FALSE) ){
  +                return false;
  +            }
  +        }
  +        return true;
       }
   
       /**
  
  
  
  Index: ContentPage.java
  ===================================================================
  RCS file: 
/home/cvs/repository/jahia/src/java/org/jahia/services/pages/Attic/ContentPage.java,v
  retrieving revision 1.72.2.14
  retrieving revision 1.72.2.15
  diff -u -r1.72.2.14 -r1.72.2.15
  --- ContentPage.java  25 Oct 2004 17:06:31 -0000      1.72.2.14
  +++ ContentPage.java  27 Oct 2004 17:48:16 -0000      1.72.2.15
  @@ -806,9 +806,16 @@
                   mActivePageInfos.keySet ().iterator ().next ());
           int activeParentID = activePageInfo.getParentID ();
   
  -        JahiaPageInfo stagingPageInfo = (JahiaPageInfo) mStagingPageInfos.get (
  -                mStagingPageInfos.keySet ().iterator ().next ());
  -        int stagingParentID = stagingPageInfo.getParentID ();
  +        JahiaPageInfo stagingPageInfo = null;
  +        Iterator iterator = mStagingPageInfos.values().iterator();
  +        int stagingParentID = activeParentID;
  +        while ( iterator.hasNext() ){
  +            stagingPageInfo = (JahiaPageInfo) iterator.next();
  +            if ( stagingPageInfo.getVersionID()
  +                 != EntryLoadRequest.DELETED_WORKFLOW_STATE ){
  +                stagingParentID = stagingPageInfo.getParentID ();
  +            }
  +        }
   
           return activeParentID == stagingParentID ? SAME_PARENT : activeParentID;
       }
  

Reply via email to