Author: lektran
Date: Tue Sep 22 11:05:40 2009
New Revision: 817601
URL:
http://svn.apache.org/viewvc?rev=817601&view=revLog:
Add a new method to allow a content url to be generated without a request object
Modified:
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/taglib/ContentUrlTag.java
Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/taglib/ContentUrlTag.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/taglib/ContentUrlTag.java?rev=817601&r1=817600&r2=817601&view=diff==============================================================================
--- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/taglib/ContentUrlTag.java (original)
+++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/taglib/ContentUrlTag.java Tue Sep 22 11:05:40 2009
@@ -66,7 +66,11 @@
return;
}
GenericValue webSite = WebSiteWorker.getWebSite(request);
- if (request.isSecure()) {
+ appendContentPrefix(webSite, request.isSecure(), urlBuffer);
+ }
+
+ public static void appendContentPrefix(GenericValue webSite, boolean secure, Appendable urlBuffer) throws IOException {
+ if (secure) {
if (webSite != null && UtilValidate.isNotEmpty(webSite.getString("secureContentPrefix"))) {
urlBuffer.append(webSite.getString("secureContentPrefix").trim());
} else {