shuber      2004/11/29 14:04:06 CET

  Modified files:        (Branch: JAHIA-4-0-BRANCH)
    src/java/org/jahia/services/pages ContentPage.java 
  Log:
  Bugfix in initial value of page counter : we were using the default page 
property lookup mechanism that looks up values in parents when not found 
locally, and this was causing the use of the parent page's counter value as the 
initial value for the page counter. This is now corrected.
  
  Revision   Changes    Path
  1.72.2.19  +5 -1      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.18&r2=1.72.2.19&f=h
  
  
  
  Index: ContentPage.java
  ===================================================================
  RCS file: 
/home/cvs/repository/jahia/src/java/org/jahia/services/pages/Attic/ContentPage.java,v
  retrieving revision 1.72.2.18
  retrieving revision 1.72.2.19
  diff -u -r1.72.2.18 -r1.72.2.19
  --- ContentPage.java  11 Nov 2004 13:21:31 -0000      1.72.2.18
  +++ ContentPage.java  29 Nov 2004 13:04:05 -0000      1.72.2.19
  @@ -911,7 +911,11 @@
           // getPageInfoVersion(jParams, false).incrementCounter ();
           int pageCounter = -1;
           try {
  -            String counterStr = getProperty ("counter", loadRequest);
  +            PageProperty counterProperty = getPageLocalProperty ("counter");
  +            String counterStr = null;
  +            if (counterProperty != null) {
  +                counterStr = counterProperty.getValue();
  +            }
               if (counterStr != null) {
                   pageCounter = Integer.parseInt (counterStr);
               } else {
  

Reply via email to