svn commit: r926201 - /ofbiz/trunk/applications/content/src/org/ofbiz/content/cms/CmsEvents.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r926201 - /ofbiz/trunk/applications/content/src/org/ofbiz/content/cms/CmsEvents.java

lektran
Author: lektran
Date: Mon Mar 22 17:15:16 2010
New Revision: 926201

URL: http://svn.apache.org/viewvc?rev=926201&view=rev
Log:
Rename hasContent variable to hadContent which better reflects what it actually means.

Modified:
    ofbiz/trunk/applications/content/src/org/ofbiz/content/cms/CmsEvents.java

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/cms/CmsEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/cms/CmsEvents.java?rev=926201&r1=926200&r2=926201&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/cms/CmsEvents.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/cms/CmsEvents.java Mon Mar 22 17:15:16 2010
@@ -315,7 +315,7 @@ public class CmsEvents {
     protected static int verifyContentToWebSite(Delegator delegator, String webSiteId, String contentId) throws GeneralException {
         // first check if the passed in contentId is a publish point for the web site
         List<GenericValue> publishPoints = null;
-        boolean hasContent = false;
+        boolean hadContent = false;
         try {
             publishPoints = delegator.findByAndCache("WebSiteContent",
                     UtilMisc.toMap("webSiteId", webSiteId, "contentId", contentId, "webSiteContentTypeId", "PUBLISH_POINT"),
@@ -324,7 +324,7 @@ public class CmsEvents {
             throw e;
         }
         if (UtilValidate.isNotEmpty(publishPoints)) {
-            hasContent = true;
+            hadContent = true;
         }
         publishPoints = EntityUtil.filterByDate(publishPoints);
         if (UtilValidate.isNotEmpty(publishPoints)) {
@@ -343,20 +343,20 @@ public class CmsEvents {
                     if (subContentStatusCode == HttpServletResponse.SC_OK) {
                         return HttpServletResponse.SC_OK;
                     } else if (subContentStatusCode == HttpServletResponse.SC_GONE) {
-                        hasContent = true;
+                        hadContent = true;
                     }
                 }
             }
         }
-        if (hasContent) return HttpServletResponse.SC_GONE;
+        if (hadContent) return HttpServletResponse.SC_GONE;
         return HttpServletResponse.SC_NOT_FOUND;
     }
 
     protected static int verifySubContent(Delegator delegator, String contentId, String contentIdFrom) throws GeneralException {
         List<GenericValue> contentAssoc = delegator.findByAnd("ContentAssoc", UtilMisc.toMap("contentId", contentIdFrom, "contentIdTo", contentId, "contentAssocTypeId", "SUB_CONTENT"));
-        boolean hasContent = false;
+        boolean hadContent = false;
         if (UtilValidate.isNotEmpty(contentAssoc)) {
-            hasContent = true;
+            hadContent = true;
         }
         contentAssoc = EntityUtil.filterByDate(contentAssoc);
         if (UtilValidate.isEmpty(contentAssoc)) {
@@ -368,7 +368,7 @@ public class CmsEvents {
                     if (subContentStatusCode == HttpServletResponse.SC_OK) {
                         return HttpServletResponse.SC_OK;
                     } else if (subContentStatusCode == HttpServletResponse.SC_GONE) {
-                        hasContent = true;
+                        hadContent = true;
                     }
                 }
             }
@@ -376,7 +376,7 @@ public class CmsEvents {
             if (Debug.verboseOn()) Debug.logVerbose("Found assocs: " + contentAssoc, module);
             return HttpServletResponse.SC_OK;
         }
-        if (hasContent) return HttpServletResponse.SC_GONE;
+        if (hadContent) return HttpServletResponse.SC_GONE;
         return HttpServletResponse.SC_NOT_FOUND;
     }
 }