Author: bpapez
Date: Thu Oct 18 07:40:37 2007
New Revision: 18920

URL: https://svndev.jahia.net/websvn/listing.php?sc=3D1&rev=3D18920&repname=
=3Djahia
Log:
minor pagepath changes:

Modified:
    branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/services/pages/Con=
tentPage.java
    branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/services/pages/Jah=
iaPageBaseService.java

Modified: branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/services/pag=
es/ContentPage.java
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-5-0-SP=
-BRANCH/core/src/java/org/jahia/services/pages/ContentPage.java&rev=3D18920=
&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/services/pages/Con=
tentPage.java (original)
+++ branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/services/pages/Con=
tentPage.java Thu Oct 18 07:40:37 2007
@@ -1657,7 +1657,11 @@
         Vector pagePath =3D new Vector();        =

         while (contentPagePath.hasMoreElements()) {
             ContentPage contentPage =3D (ContentPage)contentPagePath.nextE=
lement();
-            pagePath.add(contentPage.getPage(loadRequest, operationMode, u=
ser));
+            try {
+                pagePath.add(contentPage.getPage(loadRequest, operationMod=
e, user));
+            } catch (JahiaException ex) {
+               logger.warn("Cannot resolve JahiaPage for PagePath - rather u=
se getContentPagePath", ex);
+            }
         }
         return pagePath.elements();
     } // end getPath
@@ -1721,7 +1725,11 @@
         Vector pagePath =3D new Vector();        =

         while (contentPagePath.hasMoreElements()) {
             ContentPage contentPage =3D (ContentPage)contentPagePath.nextE=
lement();
-            pagePath.add(contentPage.getPage(loadRequest, operationMode, u=
ser));
+            try {
+                pagePath.add(contentPage.getPage(loadRequest, operationMod=
e, user));
+            } catch (JahiaException ex) {
+               logger.warn("Cannot resolve JahiaPage for PagePath - rather u=
se getContentPagePath", ex);
+            }
         }
         return pagePath.elements();    =

     } // end getPath

Modified: branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/services/pag=
es/JahiaPageBaseService.java
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-5-0-SP=
-BRANCH/core/src/java/org/jahia/services/pages/JahiaPageBaseService.java&re=
v=3D18920&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/services/pages/Jah=
iaPageBaseService.java (original)
+++ branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/services/pages/Jah=
iaPageBaseService.java Thu Oct 18 07:40:37 2007
@@ -1338,23 +1338,18 @@
                                JahiaUser user)
             throws JahiaException {
 =

-        Vector path =3D new Vector();
-        JahiaPage thePage;
-
-        thePage =3D lookupPage(pageID, loadRequest, opMode, user, true);
-        if (thePage !=3D null) {
-            path.add(thePage);
-            while (thePage.getParentID() > 0) {
-                thePage =3D lookupPage(thePage.getParentID(), loadRequest,=
 opMode,
-                                     user, true);
-                if (thePage !=3D null && thePage.getID() !=3D pageID) { //=
 Check to avoid infinite loop when creating cyclic page move
-                    path.insertElementAt(thePage, 0);
-                } else {
-                    return path;
-                }
+        Vector contentPagePath =3D getContentPagePath(pageID, loadRequest,=
 opMode,
+                user, JahiaPageService.PAGEPATH_BREAK_ON_RESTRICTED);
+        Vector pagePath =3D new Vector();        =

+        for (Iterator iterator =3D contentPagePath.iterator(); iterator.ha=
sNext();) {
+            ContentPage contentPage =3D (ContentPage)iterator.next();
+            try {
+                pagePath.add(contentPage.getPage(loadRequest, opMode, user=
));
+            } catch (JahiaException ex) {
+               logger.warn("Cannot resolve JahiaPage for PagePath - rather u=
se getContentPagePath", ex);
             }
         }
-        return path;
+        return pagePath;
     }
 =

     /**

_______________________________________________
cvs_list mailing list
[email protected]
http://lists.jahia.org/cgi-bin/mailman/listinfo/cvs_list

Reply via email to