Author: bpapez
Date: Wed Sep 26 20:05:45 2007
New Revision: 18681

URL: https://svndev.jahia.net/websvn/listing.php?sc=3D1&rev=3D18681&repname=
=3Djahia
Log:
http://www.jahia.net/jira/browse/JAHIA-2385: Sp3: Compare mode: marked for =
delete content is correctly displayed in compare mode. However this does no=
t work for marked for delete page.

- when creating URLs, consider the entrystate and showrevdiff parameter
- slight refactoring of some duplicate code

Modified:
    branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/params/ProcessingC=
ontext.java

Modified: branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/params/Proce=
ssingContext.java
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-5-0-SP=
-BRANCH/core/src/java/org/jahia/params/ProcessingContext.java&rev=3D18681&r=
epname=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/params/ProcessingC=
ontext.java (original)
+++ branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/params/ProcessingC=
ontext.java Wed Sep 26 20:05:45 2007
@@ -317,6 +317,9 @@
         getDefaultParameterValues().setProperty(
                 ProcessingContext.CACHE_MODE_PARAMETER,
                 ProcessingContext.CACHE_ON);
+        getDefaultParameterValues().setProperty(
+                ProcessingContext.SHOW_REVISION_DIFF_PARAMETER,
+                "0");        =

         // defaultParameterValues.setProperty(ProcessingContext.PAGE_ID_PA=
RAMETER, ProcessingContext.DEFAULT_PAGE_ID); // doesn't work yet
         // because of logout engine URL mess
     }
@@ -938,7 +941,7 @@
         }
         if ((locales.size() =3D=3D 1 && (locales.get(0)).toString().equals(
                 ContentField.SHARED_LANGUAGE))
-                && this.getSite().getLanguageSettings().size() =3D=3D 0) {
+                && this.getSite().getLanguageSettings().isEmpty()) {
             // let's add the default locale as english a last resort locale
             // SettingsBean settings =3D Jahia.getSettings();
             final SettingsBean settings =3D Jahia.getSettings();
@@ -955,7 +958,7 @@
                 locales.add(Locale.ENGLISH);
             }
         }
-        if (locales.size() =3D=3D 0) {
+        if (locales.isEmpty()) {
             if (currentLocale =3D=3D null) {
                 currentLocale =3D Locale.getDefault();
             }
@@ -964,7 +967,7 @@
         if (!locales.get(0).toString().equals(ContentField.SHARED_LANGUAGE=
)) {
             locales.add(0, new Locale(ContentField.SHARED_LANGUAGE, ""));
         }
-        if (locales.size() =3D=3D 0
+        if (locales.isEmpty()
                 || !(locales.get(0)).toString().equals(
                         ContentField.SHARED_LANGUAGE)) {
             locales.add(0, new Locale(ContentField.SHARED_LANGUAGE, ""));
@@ -1034,7 +1037,7 @@
             // let's copy the locale to the result.
             result.add(curSourceLocale);
             previousLocales.add(curSourceLocale.toString());
-            if (curSourceLocale.getCountry().equals("")) {
+            if (curSourceLocale.getCountry().length() =3D=3D 0) {
                 // no country, let's see if we have a mapping for this loc=
ale.
                 if (languageMappingsHashtable.containsKey(curSourceLocale
                         .getLanguage())) {
@@ -1191,7 +1194,7 @@
                     .getLanguageSettings();
             if (siteLanguageSettings !=3D null) {
                 boolean firstSiteActiveLanguage =3D true;
-                for (int i =3D 0; i < siteLanguageSettings.size(); i++) {
+                for (int i =3D 0, settingsSize =3D siteLanguageSettings.si=
ze(); i < settingsSize; i++) {
                     final SiteLanguageSettings curSetting =3D (SiteLanguag=
eSettings) siteLanguageSettings
                             .elementAt(i);
                     if (curSetting.isActivated()) {
@@ -1571,7 +1574,7 @@
      * @return true if page was requested by key.
      */
     protected boolean isPageRequestedByKey() {
-        return isPageRequestedByID() =3D=3D false && (getPageURLKeys().siz=
e() > 0);
+        return isPageRequestedByID() =3D=3D false && !getPageURLKeys().isE=
mpty();
     }
 =

     /**
@@ -1709,17 +1712,8 @@
             final String parameterValue) {
         final String defaultValue =3D getDefaultParameterValues().getPrope=
rty(
                 parameterName);
-        final String result =3D appendParam(parameterName, parameterValue);
-
-        if (defaultValue =3D=3D null) {
-            return result;
-        } else {
-            if (defaultValue.equals(parameterValue)) {
-                return "";
-            } else {
-                return result;
-            }
-        }
+        return parameterValue =3D=3D null || parameterValue.equals(default=
Value) ? "" : appendParam(
+                parameterName, parameterValue);
     }
 =

     private String appendParam(final String parameterName,
@@ -1825,14 +1819,16 @@
     }
 =

     public String composePageUrl(final JahiaPage page) throws JahiaExcepti=
on {
-        return composeUrl(getPageURLKeyPart(page), getPageURLPart(page), p=
age
-                .getID(), null, this.getLocale().toString(), null);
+        return composeUrl(getPageURLKeyPart(page.getContentPage()),
+                getPageURLPart(page.getContentPage(), false), page.getID(),
+                null, this.getLocale().toString(), null);
     }
 =

     public String composePageUrl(final JahiaPage page, final String langua=
geCode)
             throws JahiaException {
-        return composeUrl(getPageURLKeyPart(page), getPageURLPart(page), p=
age
-                .getID(), null, languageCode, null);
+        return composeUrl(getPageURLKeyPart(page.getContentPage()),
+                getPageURLPart(page.getContentPage(), false), page.getID(),
+                null, languageCode, null);
     }
 =

     /**
@@ -1914,7 +1910,8 @@
             theUrl.append(getSiteURLPart(getSite().getSiteKey()));
         }
         String paramOpMode =3D getParameter(OPERATION_MODE_PARAMETER);
-        theUrl.append(getOpModeURLPart(paramOpMode !=3D null ? paramOpMode=
 : getOpMode()));
+        String opModeToUse =3D paramOpMode !=3D null ? paramOpMode : getOp=
Mode();
+        theUrl.append(getOpModeURLPart(opModeToUse));
         theUrl.append(getCacheModeURLPart(getCacheStatus()));
         if (pageID > 0) {
             theUrl
@@ -1928,6 +1925,10 @@
         if (languageCode !=3D null) {
             theUrl.append(condAppendURL(LANGUAGE_CODE, languageCode));
         }
+        if (COMPARE.equals(opModeToUse)) {
+            theUrl.append(getEntryStateURLPart(getParameter(ENTRY_STATE_PA=
RAMETER)));
+            theUrl.append(getShowRevisionDiffURLPart(getDiffVersionID()));
+        }
         if (pathParams !=3D null) {
             theUrl.append(pathParams);
         }
@@ -2103,7 +2104,7 @@
             final String propertyValue =3D extraJahiaParams
                     .getProperty(propertyName);
             paramValue =3D condAppendURL(propertyName, propertyValue);
-            if (paramValue !=3D null && !paramValue.trim().equals("")) {
+            if (paramValue !=3D null && paramValue.trim().length() > 0) {
                 theUrl.append(paramSep);
                 theUrl.append(paramValue);
                 paramSep =3D "&";
@@ -2125,20 +2126,20 @@
         StringBuffer theUrl =3D new StringBuffer();
         String paramValue =3D getSiteURLPart();
         String paramSep =3D paramSepFirst;
-        if (paramValue !=3D null && !paramValue.trim().equals("")) {
+        if (paramValue !=3D null && paramValue.trim().length() > 0) {
             theUrl.append(paramSep);
             theUrl.append(paramValue);
             paramSep =3D "&";
         }
         paramValue =3D getOpModeURLPart(opMode);
-        if (paramValue !=3D null && !paramValue.trim().equals("")) {
+        if (paramValue !=3D null && paramValue.trim().length() > 0) {
             theUrl.append(paramSep);
             theUrl.append(paramValue);
             paramSep =3D "&";
         }
         if (contentPage !=3D null) {
             paramValue =3D getPageURLPart(contentPage.getID(), true);
-            if (paramValue !=3D null && !paramValue.trim().equals("")) {
+            if (paramValue !=3D null && paramValue.trim().length() > 0) {
                 theUrl.append(paramSep);
                 theUrl.append(paramValue);
                 paramSep =3D "&";
@@ -2196,7 +2197,7 @@
         if (getContentPage() !=3D null) {
             final String paramValue =3D getPageURLKeyPart(getContentPage()
                     .getID());
-            if (paramValue !=3D null && !paramValue.trim().equals("")) {
+            if (paramValue !=3D null && paramValue.trim().length() > 0) {
                 theUrl.append(paramSep);
                 theUrl.append(paramValue);
                 paramSep =3D "&";
@@ -2215,7 +2216,7 @@
             final String propertyValue =3D extraJahiaParams
                     .getProperty(propertyName);
             paramValue =3D condAppendURL(propertyName, propertyValue);
-            if (paramValue !=3D null && !paramValue.trim().equals("")) {
+            if (paramValue !=3D null && paramValue.trim().length() > 0) {
                 theUrl.append(paramSep);
                 theUrl.append(paramValue);
                 paramSep =3D "&";
@@ -2289,37 +2290,8 @@
     public String composeRevDifferenceUrl(final int revisionDiffID,
             final String operationMode, final String params)
             throws JahiaException {
-        final StringBuffer theUrl =3D new StringBuffer();
-        theUrl.append(this.getJahiaCoreHttpPath());
-
-        theUrl.append(getEngineURLPart(CORE_ENGINE_NAME));
-        theUrl.append(getSiteURLPart());
-        if (operationMode !=3D null) {
-            theUrl.append(getOpModeURLPart(ProcessingContext.COMPARE));
-        }
-        theUrl.append(getCacheModeURLPart(ProcessingContext.CACHE_OFFONCE)=
);
-
-        if (contentPage !=3D null)
-            theUrl.append(ServicesRegistry.getInstance()
-                    .getEsiURLGeneratorService().getESITemplURLPart(
-                            contentPage.getID(), this, theUser, siteID));
-        else
-            theUrl.append(ServicesRegistry.getInstance()
-                    .getEsiURLGeneratorService().getESIURLPart(this, theUs=
er,
-                            siteID));
-
-        if (getContentPage() !=3D null) {
-            if (revisionDiffID =3D=3D 0) {
-                theUrl.append(this.getEntryStateURLPart("a"));
-            } else {
-                theUrl.append(this.getEntryStateURLPart("s"));
-            }
-            theUrl.append(this.getShowRevisionDiffURLPart(revisionDiffID));
-            theUrl.append(getPageURLKeyPart(getContentPage().getID()));
-            theUrl.append(getPageURLPart(getContentPage().getID()));
-        }
-        appendParams(theUrl, params);
-        return encodeURL(theUrl.toString());
+        return composeRevDifferenceUrl(revisionDiffID =3D=3D 0 ? "a" : "s",
+                revisionDiffID, operationMode, params);
     }
 =

     /**
@@ -2335,6 +2307,13 @@
     public String composeRevDifferenceUrl(final int entryStateVersion,
             final int revisionDiffVersion, final String operationMode,
             final String params) throws JahiaException {
+        return composeRevDifferenceUrl(String.valueOf(entryStateVersion),
+                revisionDiffVersion, operationMode, params);
+    }
+
+    protected String composeRevDifferenceUrl(String entryStateVersionOrSta=
te,
+            final int revisionDiffVersion, final String operationMode,
+            final String params) throws JahiaException {
         final StringBuffer theUrl =3D new StringBuffer();
         theUrl.append(this.getJahiaCoreHttpPath());
 =

@@ -2345,20 +2324,21 @@
         }
         theUrl.append(getCacheModeURLPart(ParamBean.CACHE_OFFONCE));
 =

-        if (contentPage !=3D null)
+        if (getContentPage() !=3D null)
             theUrl.append(ServicesRegistry.getInstance()
                     .getEsiURLGeneratorService().getESITemplURLPart(
-                            contentPage.getID(), this, theUser, siteID));
+                            getContentPage().getID(), this, getTheUser(),
+                            getSiteID()));
         else
             theUrl.append(ServicesRegistry.getInstance()
-                    .getEsiURLGeneratorService().getESIURLPart(this, theUs=
er,
-                            siteID));
+                    .getEsiURLGeneratorService().getESIURLPart(this,
+                            getTheUser(), getSiteID()));
 =

-        if (contentPage !=3D null) {
-            theUrl.append(this.getEntryStateURLPart(entryStateVersion));
+        if (getContentPage() !=3D null) {
+            theUrl.append(this.getEntryStateURLPart(entryStateVersionOrSta=
te));
             theUrl.append(this.getShowRevisionDiffURLPart(revisionDiffVers=
ion));
-            theUrl.append(getPageURLKeyPart(contentPage.getID()));
-            theUrl.append(getPageURLPart(contentPage.getID()));
+            theUrl.append(getPageURLKeyPart(getContentPage().getID()));
+            theUrl.append(getPageURLPart(getContentPage().getID()));
         }
         appendParams(theUrl, params);
         return encodeURL(theUrl.toString());
@@ -2375,7 +2355,8 @@
         theUrl.append(getEngineURLPart(CORE_ENGINE_NAME));
         theUrl.append(getSiteURLPart());
         String paramOpMode =3D getParameter(OPERATION_MODE_PARAMETER);
-        theUrl.append(getOpModeURLPart(paramOpMode !=3D null ? paramOpMode=
 : getOpMode()));        =

+        String opModeToUse =3D paramOpMode !=3D null ? paramOpMode : getOp=
Mode();
+        theUrl.append(getOpModeURLPart(opModeToUse));        =

         theUrl.append(appendParam(LANGUAGE_CODE, code));
 =

         if (getContentPage() !=3D null)
@@ -2387,11 +2368,16 @@
                     this, theUser, siteID));
 =

         if (getContentPage() !=3D null) {
+            if (COMPARE.equals(opModeToUse)) {
+                theUrl.append(getEntryStateURLPart(getParameter(ENTRY_STAT=
E_PARAMETER)));
+                theUrl.append(getShowRevisionDiffURLPart(getDiffVersionID(=
)));
+            }
+            =

             theUrl.append(getPageURLKeyPart(getContentPage().getID()));
             theUrl.append(getPageURLPart(getContentPage().getID()));
         }
         String queryString =3D this.getQueryString();
-        if (queryString !=3D null && !"".equals(queryString)
+        if (queryString !=3D null && queryString.length() > 0
                 && !Jahia.getSettings().isEsiCacheActivated()
                 && queryString.indexOf("__esi_fragment") =3D=3D -1) {
             theUrl.append("?").append(queryString);
@@ -2438,9 +2424,16 @@
 =

         theUrl.append(getEngineURLPart(CORE_ENGINE_NAME));
         theUrl.append(getSiteURLPart(aSite.getSiteKey()));
-        theUrl.append(getOpModeURLPart(getOpMode()));
+        String paramOpMode =3D getParameter(OPERATION_MODE_PARAMETER);
+        String opModeToUse =3D paramOpMode !=3D null ? paramOpMode : getOp=
Mode();
+        theUrl.append(getOpModeURLPart(opModeToUse));                =

+        =

         theUrl.append(REGISTRY.getEsiURLGeneratorService().getESITemplURLP=
art(
                 site.getHomePageID(), this, theUser, site.getID()));
+        if (COMPARE.equals(opModeToUse)) {
+            theUrl.append(getEntryStateURLPart(getParameter(ENTRY_STATE_PA=
RAMETER)));
+            theUrl.append(getShowRevisionDiffURLPart(getDiffVersionID()));
+        }        =

         theUrl.append(getPageURLKeyPart(aSite.getHomePageID()));
         theUrl.append(getPageURLPart(aSite.getHomePageID()));
 =

@@ -2669,132 +2662,90 @@
     // FH 21 Jan. 2001 : Original implementation
     // MJ 21 Mar. 2001 : replaced URL params with context PathInfo elements
     public String getPageURLPart(final int id, final boolean forceRender) {
-        boolean mustRender =3D true;
+        String pageURLPart =3D "";
         try {
-            final ContentPage aContentPage =3D ContentPage.getPage(id);
-            final PageProperty pageProperty =3D aContentPage
-                    .getPageLocalProperty(PageProperty.PAGE_URL_KEY_PROPNA=
ME);
-            if (pageProperty !=3D null) {
-                mustRender =3D false;
-            }
-        } catch (JahiaPageNotFoundException je) {
-            logger
-                    .debug(
-                            "Page URL key for page "
-                                    + id
-                                    + " not found, it is normal if the pag=
e was in staging and then removed",
-                            je);
-        } catch (JahiaException je) {
-            logger.error(
-                    "Error while testing existing of page URL key for page=
 "
-                            + id, je);
+            pageURLPart =3D getPageURLPart(ContentPage.getPage(id), forceR=
ender);
+        } catch (JahiaException e) {
+            logger.error("Error while setting page URL ID for page " + id,
+                    e);
         }
-
-        if (mustRender || forceRender) {
-            return condAppendURL(PAGE_ID_PARAMETER, Integer.toString(id));
-        } else {
-            return "";
-        }
-
-    }
-
-    protected String getPageURLPart(final JahiaPage page) {
-        return getPageURLPart(page, false);
+        return pageURLPart;
     }
 =

-    protected String getPageURLPart(final JahiaPage page,
+    protected String getPageURLPart(final ContentPage aContentPage,
             final boolean forceRender) {
         boolean mustRender =3D true;
         try {
-            final ContentPage aContentPage =3D page.getContentPage();
-            final PageProperty pageProperty =3D aContentPage
-                    .getPageLocalProperty(PageProperty.PAGE_URL_KEY_PROPNA=
ME);
-            if (pageProperty !=3D null) {
+            if (aContentPage
+                    .getPageLocalProperty(PageProperty.PAGE_URL_KEY_PROPNA=
ME) !=3D null) {
                 mustRender =3D false;
             }
         } catch (JahiaException je) {
             logger.error(
                     "Error while testing existing of page URL key for page=
 "
-                            + page, je);
-        }
-
-        if (mustRender || forceRender) {
-            return condAppendURL(PAGE_ID_PARAMETER, Integer.toString(page
-                    .getID()));
-        } else {
-            return "";
+                            + aContentPage, je);
         }
 =

+        return !mustRender && !forceRender ? "" : condAppendURL(
+                PAGE_ID_PARAMETER, Integer.toString(aContentPage.getID()));
     }
 =

     public String getPageURLKeyPart(final int id) {
-        // first we must find all parent pages and their URL keys.
-        final StringBuffer pageURLKeysPartBuf =3D new StringBuffer();
-        final LinkedList pageURLKeyList =3D new LinkedList();
+        String pageURLKeysPart =3D "";
         try {
-            final ContentPage curContentPage =3D ContentPage.getPage(id);
-            final Enumeration pagePathEnum =3D curContentPage
-                    .getContentPagePath(this);
-            while (pagePathEnum.hasMoreElements()) {
-                final ContentPage curParentPage =3D (ContentPage) pagePath=
Enum
-                        .nextElement();
-                final PageProperty urlKeyProp =3D curParentPage
-                        .getPageLocalProperty(PageProperty.PAGE_URL_KEY_PR=
OPNAME);
-                if (urlKeyProp !=3D null) {
-                    pageURLKeyList.add(urlKeyProp.getValue());
-                }
-            }
-            if (pageURLKeyList.size() > 0) {
-                final Iterator urlKeyIter =3D pageURLKeyList.iterator();
-                while (urlKeyIter.hasNext()) {
-                    final String curURLKey =3D (String) urlKeyIter.next();
-                    pageURLKeysPartBuf.append("/");
-                    pageURLKeysPartBuf.append(curURLKey);
-                }
-            }
-        } catch (JahiaPageNotFoundException je) {
-            logger
-                    .debug(
-                            "Page URL key for page "
-                                    + id
-                                    + " not found, it is normal if the pag=
e was in staging and then removed",
-                            je);
-        } catch (JahiaException je) {
-            logger.error(
-                    "Error while testing existing of page URL key for page=
 "
-                            + id, je);
+            pageURLKeysPart =3D getPageURLKeyPart(ContentPage.getPage(id));
+        } catch (JahiaException e) {
+            logger.error("Error while testing existing of page URL key for=
 page " + id,
+                    e);
         }
-        return pageURLKeysPartBuf.toString();
+        return pageURLKeysPart;
     }
 =

-    protected String getPageURLKeyPart(final JahiaPage page) {
+    protected String getPageURLKeyPart(final ContentPage curContentPage) {
         // first we must find all parent pages and their URL keys.
         final StringBuffer pageURLKeysPartBuf =3D new StringBuffer();
         final LinkedList pageURLKeyList =3D new LinkedList();
+        JahiaPage curParentPage =3D null;
+        boolean triedToSetPageURLKeyOfCurrentPage =3D false;
         try {
-            final ContentPage curContentPage =3D page.getContentPage();
             final Enumeration pagePathEnum =3D curContentPage.getPagePath(=
this);
             while (pagePathEnum.hasMoreElements()) {
-                final JahiaPage curParentPage =3D (JahiaPage) pagePathEnum
+                curParentPage =3D (JahiaPage) pagePathEnum
                         .nextElement();
+                if (curParentPage.getID() =3D=3D curContentPage.getID()) {
+                    triedToSetPageURLKeyOfCurrentPage =3D true;
+                }
                 final PageProperty urlKeyProp =3D curParentPage
                         .getPageLocalProperty(PageProperty.PAGE_URL_KEY_PR=
OPNAME);
                 if (urlKeyProp !=3D null) {
                     pageURLKeyList.add(urlKeyProp.getValue());
                 }
             }
-            if (pageURLKeyList.size() > 0) {
-                final Iterator urlKeyIter =3D pageURLKeyList.iterator();
-                while (urlKeyIter.hasNext()) {
-                    final String curURLKey =3D (String) urlKeyIter.next();
-                    pageURLKeysPartBuf.append("/");
-                    pageURLKeysPartBuf.append(curURLKey);
-                }
-            }
         } catch (JahiaException je) {
-            logger.error("Error while retrieving page path for page " + pa=
ge,
+            logger.error("Error while testing existing of page URL key for=
 page " + curParentPage,
                     je);
+            // at least set the current page URL key, otherwise even the p=
age-ID will not be set
+            if (!triedToSetPageURLKeyOfCurrentPage) {
+                try {
+                    final PageProperty urlKeyProp =3D curContentPage
+                            .getPageLocalProperty(PageProperty.PAGE_URL_KE=
Y_PROPNAME);
+                    if (urlKeyProp !=3D null) {
+                        pageURLKeyList.add(urlKeyProp.getValue());
+                    }
+                } catch (JahiaException e) {
+                    logger.error("Error while testing existing of page URL=
 key for page " + curContentPage,
+                            je);
+                }                =

+            }
         }
+        if (!pageURLKeyList.isEmpty()) {
+            final Iterator urlKeyIter =3D pageURLKeyList.iterator();
+            while (urlKeyIter.hasNext()) {
+                final String curURLKey =3D (String) urlKeyIter.next();
+                pageURLKeysPartBuf.append("/");
+                pageURLKeysPartBuf.append(curURLKey);
+            }
+        }        =

         return pageURLKeysPartBuf.toString();
     }
 =

@@ -2830,12 +2781,6 @@
     }
 =

     // -------------------------------------------------------------------=
-------
-    protected String getEntryStateURLPart(final int versionID) {
-        return condAppendURL(ProcessingContext.ENTRY_STATE_PARAMETER, Stri=
ng
-                .valueOf(versionID));
-    }
-
-    // -------------------------------------------------------------------=
-------
 =

     /**
      * @param status
@@ -2950,11 +2895,8 @@
         // let's test if the URL entered for the site is valid, and genera=
te
         // an URL
         final JahiaSite theSite =3D getSite();
-        if (theSite =3D=3D null) {
-            return "";
-        }
-        return getSiteURL(theSite, pageID, withSessionID, withOperationMod=
e,
-                false);
+        return theSite =3D=3D null ? "" : getSiteURL(theSite, pageID,
+                withSessionID, withOperationMode, false);
     }
 =

     /**
@@ -3272,7 +3214,7 @@
             final ArrayList siteLanguages =3D getSite()
                     .getLanguageSettingsAsLocales(true);
             boolean skip =3D getSite().isMixLanguagesActive();
-            for (int i =3D 0; i < siteLanguages.size() && !skip; i++) {
+            for (int i =3D 0, siteLanguagesSize =3D siteLanguages.size(); =
i < siteLanguagesSize && !skip; i++) {
                 final Locale locale =3D (Locale) siteLanguages.get(i);
                 if (getContentPage().hasEntries(ContentPage.ACTIVE_PAGE_IN=
FOS,
                         locale.toString())) {
@@ -3769,7 +3711,7 @@
 =

     public static void setDefaultParameterValues(
             final Properties defaultParameters) {
-        ProcessingContext.defaultParameterValues =3D defaultParameters;
+        defaultParameterValues =3D defaultParameters;
     }
 =

     public boolean isUseQueryStringParameterUrl() {

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

Reply via email to