Author: jacopoc
Date: Fri Sep 9 13:19:16 2016 New Revision: 1760010 URL: http://svn.apache.org/viewvc?rev=1760010&view=rev Log: Improved: removed unused parameter from method signature of CatalogUrlFilter and updated client code accordingly. Modified: ofbiz/trunk/applications/product/src/main/java/org/apache/ofbiz/product/category/CatalogUrlFilter.java ofbiz/trunk/applications/product/src/main/java/org/apache/ofbiz/product/category/ftl/CatalogAltUrlSeoTransform.java ofbiz/trunk/applications/product/src/main/java/org/apache/ofbiz/product/category/ftl/OfbizCatalogAltUrlTransform.java Modified: ofbiz/trunk/applications/product/src/main/java/org/apache/ofbiz/product/category/CatalogUrlFilter.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/main/java/org/apache/ofbiz/product/category/CatalogUrlFilter.java?rev=1760010&r1=1760009&r2=1760010&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/main/java/org/apache/ofbiz/product/category/CatalogUrlFilter.java (original) +++ ofbiz/trunk/applications/product/src/main/java/org/apache/ofbiz/product/category/CatalogUrlFilter.java Fri Sep 9 13:19:16 2016 @@ -419,7 +419,7 @@ public class CatalogUrlFilter extends Co GenericValue product = EntityQuery.use(delegator).from("Product").where("productId", productId).cache().queryOne(); ProductContentWrapper wrapper = new ProductContentWrapper(product, request); List<String> trail = CategoryWorker.getTrail(request); - url = makeProductUrl(delegator, wrapper, trail, request.getContextPath(), previousCategoryId, productCategoryId, productId); + url = makeProductUrl(wrapper, trail, request.getContextPath(), previousCategoryId, productCategoryId, productId); } catch (GenericEntityException e) { Debug.logWarning(e, "Cannot create product's URL for: " + productId, module); return redirectUrl; @@ -427,7 +427,7 @@ public class CatalogUrlFilter extends Co return url; } - public static String makeProductUrl(Delegator delegator, ProductContentWrapper wrapper, List<String> trail, String contextPath, String previousCategoryId, String productCategoryId, String productId) { + public static String makeProductUrl(ProductContentWrapper wrapper, List<String> trail, String contextPath, String previousCategoryId, String productCategoryId, String productId) { String url = ""; StringWrapper alternativeUrl = wrapper.get("ALTERNATIVE_URL", "url"); if (UtilValidate.isNotEmpty(alternativeUrl) && UtilValidate.isNotEmpty(alternativeUrl.toString())) { Modified: ofbiz/trunk/applications/product/src/main/java/org/apache/ofbiz/product/category/ftl/CatalogAltUrlSeoTransform.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/main/java/org/apache/ofbiz/product/category/ftl/CatalogAltUrlSeoTransform.java?rev=1760010&r1=1760009&r2=1760010&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/main/java/org/apache/ofbiz/product/category/ftl/CatalogAltUrlSeoTransform.java (original) +++ ofbiz/trunk/applications/product/src/main/java/org/apache/ofbiz/product/category/ftl/CatalogAltUrlSeoTransform.java Fri Sep 9 13:19:16 2016 @@ -154,8 +154,7 @@ public class CatalogAltUrlSeoTransform i if (SeoConfigUtil.isCategoryUrlEnabled(contextPath)) { url = CatalogUrlSeoTransform.makeProductUrl(delegator, wrapper, prefixString, contextPath, productCategoryId, previousCategoryId, productId); } else { - url = CatalogUrlFilter.makeProductUrl(delegator, wrapper, null, prefixString, previousCategoryId, productCategoryId, - productId); + url = CatalogUrlFilter.makeProductUrl(wrapper, null, prefixString, previousCategoryId, productCategoryId, productId); } } else { GenericValue productCategory = delegator.findOne("ProductCategory", UtilMisc.toMap("productCategoryId", productCategoryId), false); Modified: ofbiz/trunk/applications/product/src/main/java/org/apache/ofbiz/product/category/ftl/OfbizCatalogAltUrlTransform.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/main/java/org/apache/ofbiz/product/category/ftl/OfbizCatalogAltUrlTransform.java?rev=1760010&r1=1760009&r2=1760010&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/main/java/org/apache/ofbiz/product/category/ftl/OfbizCatalogAltUrlTransform.java (original) +++ ofbiz/trunk/applications/product/src/main/java/org/apache/ofbiz/product/category/ftl/OfbizCatalogAltUrlTransform.java Fri Sep 9 13:19:16 2016 @@ -134,7 +134,7 @@ public class OfbizCatalogAltUrlTransform if (UtilValidate.isNotEmpty(productId)) { GenericValue product = EntityQuery.use(delegator).from("Product").where("productId", productId).queryOne(); ProductContentWrapper wrapper = new ProductContentWrapper(dispatcher, product, locale, EntityUtilProperties.getPropertyValue("content", "defaultMimeType", "text/html; charset=utf-8", delegator)); - url = CatalogUrlFilter.makeProductUrl(delegator, wrapper, null, ((StringModel) prefix).getAsString(), previousCategoryId, productCategoryId, productId); + url = CatalogUrlFilter.makeProductUrl(wrapper, null, ((StringModel) prefix).getAsString(), previousCategoryId, productCategoryId, productId); } else { GenericValue productCategory = EntityQuery.use(delegator).from("ProductCategory").where("productCategoryId", productCategoryId).queryOne(); CategoryContentWrapper wrapper = new CategoryContentWrapper(dispatcher, productCategory, locale, EntityUtilProperties.getPropertyValue("content", "defaultMimeType", "text/html; charset=utf-8", delegator)); |
Free forum by Nabble | Edit this page |