Author: lektran
Date: Mon Mar 22 17:15:12 2010
New Revision: 926200
URL:
http://svn.apache.org/viewvc?rev=926200&view=revLog:
Remove pathInfo.indexOf(/) and just do the split regardless, the end result is the same.
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=926200&r1=926199&r2=926200&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:12 2010
@@ -168,15 +168,11 @@ public class CmsEvents {
// get the contentId/mapKey from URL
if (contentId == null) {
if (Debug.verboseOn()) Debug.logVerbose("Current PathInfo: " + pathInfo, module);
- if (pathInfo.indexOf("/") != -1) {
- String[] pathSplit = pathInfo.split("/");
- if (Debug.verboseOn()) Debug.logVerbose("Split pathinfo: " + pathSplit.length, module);
- contentId = pathSplit[0];
- if (pathSplit.length > 1) {
- mapKey = pathSplit[1];
- }
- } else {
- contentId = pathInfo;
+ String[] pathSplit = pathInfo.split("/");
+ if (Debug.verboseOn()) Debug.logVerbose("Split pathinfo: " + pathSplit.length, module);
+ contentId = pathSplit[0];
+ if (pathSplit.length > 1) {
+ mapKey = pathSplit[1];
}
}