Verschiedene Probleme mit einigen Admin-Klassen korrgiert.
git-svn-id: https://svn.libreccm.org/ccm/trunk@2184 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
fe52693426
commit
2f4c3a41d7
|
|
@ -62,7 +62,7 @@ public class FileAttachmentConfig extends AbstractConfig {
|
||||||
/**
|
/**
|
||||||
* Constructor, don't use it directly!
|
* Constructor, don't use it directly!
|
||||||
*/
|
*/
|
||||||
protected FileAttachmentConfig() {
|
public FileAttachmentConfig() {
|
||||||
|
|
||||||
super();
|
super();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,33 +11,32 @@ import com.arsdigita.util.parameter.Parameter;
|
||||||
*/
|
*/
|
||||||
public class NotesConfig extends AbstractConfig {
|
public class NotesConfig extends AbstractConfig {
|
||||||
|
|
||||||
private static final NotesConfig INSTANCE = new NotesConfig();
|
private static NotesConfig INSTANCE;
|
||||||
|
|
||||||
static {
|
|
||||||
INSTANCE.load();
|
|
||||||
}
|
|
||||||
|
|
||||||
private final Parameter assetStepSortKey = new IntegerParameter(
|
private final Parameter assetStepSortKey = new IntegerParameter(
|
||||||
"com.arsdigita.cms.contentassets.notes.asset_step_sortkey",
|
"com.arsdigita.cms.contentassets.notes.asset_step_sortkey",
|
||||||
Parameter.REQUIRED,
|
Parameter.REQUIRED,
|
||||||
3);
|
3);
|
||||||
|
|
||||||
protected NotesConfig() {
|
public NotesConfig() {
|
||||||
|
|
||||||
super();
|
super();
|
||||||
|
|
||||||
register(assetStepSortKey);
|
register(assetStepSortKey);
|
||||||
|
|
||||||
loadInfo();
|
loadInfo();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final NotesConfig getInstance() {
|
public static final NotesConfig getInstance() {
|
||||||
|
if (INSTANCE == null) {
|
||||||
|
INSTANCE = new NotesConfig();
|
||||||
|
INSTANCE.load();
|
||||||
|
}
|
||||||
return INSTANCE;
|
return INSTANCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getAssetStepSortKey() {
|
public Integer getAssetStepSortKey() {
|
||||||
return (Integer) get(assetStepSortKey);
|
return (Integer) get(assetStepSortKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,20 +11,14 @@ import com.arsdigita.util.parameter.Parameter;
|
||||||
*/
|
*/
|
||||||
public class RelatedLinkConfig extends AbstractConfig {
|
public class RelatedLinkConfig extends AbstractConfig {
|
||||||
|
|
||||||
private static final RelatedLinkConfig INSTANCE = new RelatedLinkConfig();
|
private static RelatedLinkConfig INSTANCE;
|
||||||
|
|
||||||
static {
|
|
||||||
INSTANCE.load();
|
|
||||||
}
|
|
||||||
|
|
||||||
private final Parameter assetStepSortKey = new IntegerParameter(
|
private final Parameter assetStepSortKey = new IntegerParameter(
|
||||||
"com.arsdigita.cms.relatedlink.contentassets.asset_step_sortkey",
|
"com.arsdigita.cms.relatedlink.contentassets.asset_step_sortkey",
|
||||||
Parameter.REQUIRED,
|
Parameter.REQUIRED,
|
||||||
1);
|
1);
|
||||||
|
|
||||||
protected RelatedLinkConfig() {
|
public RelatedLinkConfig() {
|
||||||
|
|
||||||
super();
|
|
||||||
|
|
||||||
register(assetStepSortKey);
|
register(assetStepSortKey);
|
||||||
|
|
||||||
|
|
@ -32,6 +26,10 @@ public class RelatedLinkConfig extends AbstractConfig {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final RelatedLinkConfig getInstance() {
|
public static final RelatedLinkConfig getInstance() {
|
||||||
|
if (INSTANCE == null) {
|
||||||
|
INSTANCE = new RelatedLinkConfig();
|
||||||
|
INSTANCE.load();
|
||||||
|
}
|
||||||
return INSTANCE;
|
return INSTANCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@
|
||||||
*/
|
*/
|
||||||
package com.arsdigita.navigation;
|
package com.arsdigita.navigation;
|
||||||
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -46,22 +45,20 @@ import com.arsdigita.web.Web;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manages the processing of URLs in the Navigation application.
|
* Manages the processing of URLs in the Navigation application.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class NavigationFileResolver extends DefaultApplicationFileResolver {
|
public class NavigationFileResolver extends DefaultApplicationFileResolver {
|
||||||
|
|
||||||
private static final Logger s_log =
|
private static final Logger s_log =
|
||||||
Logger.getLogger(NavigationFileResolver.class);
|
Logger.getLogger(NavigationFileResolver.class);
|
||||||
|
private static final String CATEGORY_PATH_ATTR =
|
||||||
|
NavigationFileResolver.class + ".categoryPath";
|
||||||
|
// path is set in a cookie, which navigation models may use if they wish
|
||||||
|
public static final String PATH_COOKIE_NAME = "ad_path";
|
||||||
|
public static final char PATH_COOKIE_SEPARATOR = '|';
|
||||||
|
|
||||||
private static final String CATEGORY_PATH_ATTR =
|
|
||||||
NavigationFileResolver.class + ".categoryPath";
|
|
||||||
|
|
||||||
// path is set in a cookie, which navigation models may use if they wish
|
|
||||||
public static final String PATH_COOKIE_NAME = "ad_path";
|
|
||||||
public static final char PATH_COOKIE_SEPARATOR = '|';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public RequestDispatcher resolve(String templatePath,
|
public RequestDispatcher resolve(String templatePath,
|
||||||
|
|
@ -74,8 +71,8 @@ public class NavigationFileResolver extends DefaultApplicationFileResolver {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (path.equals("/category.jsp")) {
|
if (path.equals("/category.jsp")) {
|
||||||
Navigation nav = (Navigation)Web.getContext().getApplication();
|
Navigation nav = (Navigation) Web.getContext().getApplication();
|
||||||
|
|
||||||
String id = sreq.getParameter("categoryID");
|
String id = sreq.getParameter("categoryID");
|
||||||
if (s_log.isDebugEnabled()) {
|
if (s_log.isDebugEnabled()) {
|
||||||
s_log.debug("dispatching to category " + id);
|
s_log.debug("dispatching to category " + id);
|
||||||
|
|
@ -83,9 +80,9 @@ public class NavigationFileResolver extends DefaultApplicationFileResolver {
|
||||||
|
|
||||||
String useContext = sreq.getParameter("useContext");
|
String useContext = sreq.getParameter("useContext");
|
||||||
if (s_log.isDebugEnabled()) {
|
if (s_log.isDebugEnabled()) {
|
||||||
s_log.debug("Using use context " + useContext );
|
s_log.debug("Using use context " + useContext);
|
||||||
}
|
}
|
||||||
if ( null == useContext ) {
|
if (null == useContext) {
|
||||||
useContext = Template.DEFAULT_USE_CONTEXT;
|
useContext = Template.DEFAULT_USE_CONTEXT;
|
||||||
}
|
}
|
||||||
Category cat = null;
|
Category cat = null;
|
||||||
|
|
@ -94,7 +91,7 @@ public class NavigationFileResolver extends DefaultApplicationFileResolver {
|
||||||
try {
|
try {
|
||||||
cat = new Category(new BigDecimal(id));
|
cat = new Category(new BigDecimal(id));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
s_log.warn("Could not load category for id "+id);
|
s_log.warn("Could not load category for id " + id);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -107,7 +104,7 @@ public class NavigationFileResolver extends DefaultApplicationFileResolver {
|
||||||
// check that the category is in the tree of categories
|
// check that the category is in the tree of categories
|
||||||
Category root = null;
|
Category root = null;
|
||||||
DataCollection objs = SessionManager.getSession()
|
DataCollection objs = SessionManager.getSession()
|
||||||
.retrieve(Domain.BASE_DATA_OBJECT_TYPE);
|
.retrieve(Domain.BASE_DATA_OBJECT_TYPE);
|
||||||
objs.addEqualsFilter("model.ownerUseContext.categoryOwner.id", nav.getID());
|
objs.addEqualsFilter("model.ownerUseContext.categoryOwner.id", nav.getID());
|
||||||
String dispatcherContext = null;
|
String dispatcherContext = null;
|
||||||
TemplateContext tc = Navigation.getContext().getTemplateContext();
|
TemplateContext tc = Navigation.getContext().getTemplateContext();
|
||||||
|
|
@ -143,43 +140,42 @@ public class NavigationFileResolver extends DefaultApplicationFileResolver {
|
||||||
cats.add(parents.getCategory());
|
cats.add(parents.getCategory());
|
||||||
}
|
}
|
||||||
|
|
||||||
Category[] catsArray = (Category[])
|
Category[] catsArray = (Category[]) cats.toArray(new Category[cats.size()]);
|
||||||
cats.toArray(new Category[cats.size()]);
|
|
||||||
|
|
||||||
sreq.setAttribute(CATEGORY_PATH_ATTR,
|
sreq.setAttribute(CATEGORY_PATH_ATTR,
|
||||||
catsArray);
|
catsArray);
|
||||||
setPathCookie(sresp, catsArray);
|
setPathCookie(sresp, catsArray);
|
||||||
return resolveTemplate(catsArray[catsArray.length-1], useContext);
|
return resolveTemplate(catsArray[catsArray.length - 1], useContext);
|
||||||
} else {
|
} else {
|
||||||
String useContext = Template.DEFAULT_USE_CONTEXT;
|
String useContext = Template.DEFAULT_USE_CONTEXT;
|
||||||
if (path.endsWith( ".jsp" )) {
|
if (path.endsWith(".jsp")) {
|
||||||
int lastSlash = path.lastIndexOf( '/' );
|
int lastSlash = path.lastIndexOf('/');
|
||||||
|
|
||||||
useContext = path.substring( lastSlash + 1, path.length() - 4 );
|
useContext = path.substring(lastSlash + 1, path.length() - 4);
|
||||||
path = path.substring( 0, lastSlash );
|
path = path.substring(0, lastSlash);
|
||||||
|
|
||||||
if (s_log.isDebugEnabled()) {
|
if (s_log.isDebugEnabled()) {
|
||||||
s_log.debug( "useContext=" + useContext + ",path=" + path );
|
s_log.debug("useContext=" + useContext + ",path=" + path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Category root = getRootCategory();
|
Category root = getRootCategory();
|
||||||
Category[] cats = resolvePath(root, path);
|
Category[] cats = resolvePath(root, path);
|
||||||
|
|
||||||
if (cats == null || cats.length == 0) {
|
if (cats == null || cats.length == 0) {
|
||||||
if (s_log.isDebugEnabled()) {
|
if (s_log.isDebugEnabled()) {
|
||||||
s_log.debug("No category found");
|
s_log.debug("No category found");
|
||||||
}
|
}
|
||||||
sreq.setAttribute(CATEGORY_PATH_ATTR,
|
sreq.setAttribute(CATEGORY_PATH_ATTR,
|
||||||
new Category[] { root });
|
new Category[]{root});
|
||||||
setPathCookie(sresp, new Category[] { root });
|
setPathCookie(sresp, new Category[]{root});
|
||||||
return super.resolve(templatePath, sreq, sresp, app);
|
return super.resolve(templatePath, sreq, sresp, app);
|
||||||
} else {
|
} else {
|
||||||
Category cat = cats[cats.length-1];
|
Category cat = cats[cats.length - 1];
|
||||||
if (s_log.isDebugEnabled()) {
|
if (s_log.isDebugEnabled()) {
|
||||||
s_log.debug("Got cat " + cat);
|
s_log.debug("Got cat " + cat);
|
||||||
}
|
}
|
||||||
setPathCookie(sresp, cats);
|
setPathCookie(sresp, cats);
|
||||||
sreq.setAttribute(CATEGORY_PATH_ATTR,
|
sreq.setAttribute(CATEGORY_PATH_ATTR,
|
||||||
cats);
|
cats);
|
||||||
RequestDispatcher rd = resolveTemplate(cat, useContext);
|
RequestDispatcher rd = resolveTemplate(cat, useContext);
|
||||||
|
|
@ -190,50 +186,46 @@ public class NavigationFileResolver extends DefaultApplicationFileResolver {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* sets current path in a cookie
|
* sets current path in a cookie
|
||||||
*
|
*
|
||||||
* @param catsArray
|
* @param catsArray
|
||||||
*/
|
*/
|
||||||
private void setPathCookie(HttpServletResponse resp, Category[] catsArray) {
|
private void setPathCookie(HttpServletResponse resp, Category[] catsArray) {
|
||||||
|
|
||||||
// 1st part of cookie value is website - if cookie domain covers several Aplaws sites,
|
// 1st part of cookie value is website - if cookie domain covers several Aplaws sites,
|
||||||
// and the navigation model retains the cookie for more than one request,
|
// and the navigation model retains the cookie for more than one request,
|
||||||
// we could potentially link to one site with a path relating to another site. A check on this part
|
// we could potentially link to one site with a path relating to another site. A check on this part
|
||||||
// of the cookie will prevent problems
|
// of the cookie will prevent problems
|
||||||
StringBuffer path = new StringBuffer(Web.getConfig().getSiteName());
|
StringBuffer path = new StringBuffer(Web.getConfig().getSiteName());
|
||||||
|
|
||||||
// 2nd part of cookie value is the application that set it. Again may be used if a navigation model
|
// 2nd part of cookie value is the application that set it. Again may be used if a navigation model
|
||||||
// retains the cookie. If we link to another application, it's navigation model may
|
// retains the cookie. If we link to another application, it's navigation model may
|
||||||
// use this when deciding whether to trust the given path
|
// use this when deciding whether to trust the given path
|
||||||
|
|
||||||
path.append(PATH_COOKIE_SEPARATOR + Kernel.getContext().getResource().getID().toString());
|
path.append(PATH_COOKIE_SEPARATOR + Kernel.getContext().getResource().getID().toString());
|
||||||
for (int i = 0; i < catsArray.length; i ++) {
|
for (int i = 0; i < catsArray.length; i++) {
|
||||||
Category cat = catsArray[i];
|
Category cat = catsArray[i];
|
||||||
path.append(PATH_COOKIE_SEPARATOR + cat.getID().toString());
|
path.append(PATH_COOKIE_SEPARATOR + cat.getID().toString());
|
||||||
}
|
}
|
||||||
Cookie cookie = new Cookie(PATH_COOKIE_NAME, path.toString());
|
Cookie cookie = new Cookie(PATH_COOKIE_NAME, path.toString());
|
||||||
s_log.debug("setting cookie with value: " + path);
|
s_log.debug("setting cookie with value: " + path);
|
||||||
cookie.setMaxAge(-1);
|
cookie.setMaxAge(-1);
|
||||||
cookie.setPath("/");
|
cookie.setPath("/");
|
||||||
String domain = Kernel.getSecurityConfig().getCookieDomain();
|
String domain = Kernel.getSecurityConfig().getCookieDomain();
|
||||||
if (domain != null) {
|
if (domain != null) {
|
||||||
cookie.setDomain(domain);
|
cookie.setDomain(domain);
|
||||||
}
|
}
|
||||||
resp.addCookie(cookie);
|
resp.addCookie(cookie);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static Category[] getCategoryPath(HttpServletRequest req) {
|
public static Category[] getCategoryPath(HttpServletRequest req) {
|
||||||
return (Category[])req.getAttribute(CATEGORY_PATH_ATTR);
|
return (Category[]) req.getAttribute(CATEGORY_PATH_ATTR);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getTemplateContext() {
|
private String getTemplateContext() {
|
||||||
TemplateContext ctx = Navigation.getContext().getTemplateContext();
|
TemplateContext ctx = Navigation.getContext().getTemplateContext();
|
||||||
if (ctx == null) {
|
if (ctx == null) {
|
||||||
|
|
@ -244,26 +236,23 @@ public class NavigationFileResolver extends DefaultApplicationFileResolver {
|
||||||
}
|
}
|
||||||
|
|
||||||
private RequestDispatcher resolveTemplate(Category cat, String useContext) {
|
private RequestDispatcher resolveTemplate(Category cat, String useContext) {
|
||||||
Template template = null;
|
Template template = null;
|
||||||
if (Navigation.getConfig().inheritTemplates()) {
|
if (Navigation.getConfig().inheritTemplates()) {
|
||||||
template = Template.matchBest(cat,
|
template = Template.matchBest(cat,
|
||||||
getTemplateContext(),
|
getTemplateContext(),
|
||||||
useContext);
|
useContext);
|
||||||
} else {
|
} else {
|
||||||
template = Template.matchExact(cat,
|
template = Template.matchExact(cat,
|
||||||
getTemplateContext(),
|
getTemplateContext(),
|
||||||
useContext);
|
useContext);
|
||||||
}
|
}
|
||||||
// If there's an explicit use context which doesn't exist, give a 404
|
// If there's an explicit use context which doesn't exist, give a 404
|
||||||
if (!Template.DEFAULT_USE_CONTEXT.equals( useContext ) &&
|
if (!Template.DEFAULT_USE_CONTEXT.equals(useContext) && null == template) {
|
||||||
null == template) {
|
s_log.debug("No template found in context " + getTemplateContext() + " for category " + cat.getID()
|
||||||
s_log.debug("No template found in context " +
|
+ " with use context " + useContext);
|
||||||
getTemplateContext() + " for category " +
|
|
||||||
cat.getID() + " with use context " +
|
|
||||||
useContext );
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
String path = null;
|
String path = null;
|
||||||
if (template == null) {
|
if (template == null) {
|
||||||
if (s_log.isDebugEnabled()) {
|
if (s_log.isDebugEnabled()) {
|
||||||
|
|
@ -274,20 +263,20 @@ public class NavigationFileResolver extends DefaultApplicationFileResolver {
|
||||||
path = template.getURL();
|
path = template.getURL();
|
||||||
}
|
}
|
||||||
RequestDispatcher rd = Web.findResourceDispatcher(
|
RequestDispatcher rd = Web.findResourceDispatcher(
|
||||||
new String[] { "ROOT"} ,
|
new String[]{"ROOT"},
|
||||||
path);
|
path);
|
||||||
|
|
||||||
if (s_log.isDebugEnabled()) {
|
if (s_log.isDebugEnabled()) {
|
||||||
s_log.debug("Got dispatcher " + rd);
|
s_log.debug("Got dispatcher " + rd);
|
||||||
}
|
}
|
||||||
|
|
||||||
return rd;
|
return rd;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Category getRootCategory() {
|
private Category getRootCategory() {
|
||||||
Navigation nav = (Navigation)Web.getContext().getApplication();
|
Navigation nav = (Navigation) Web.getContext().getApplication();
|
||||||
TemplateContext ctx = Navigation.getContext().getTemplateContext();
|
TemplateContext ctx = Navigation.getContext().getTemplateContext();
|
||||||
|
|
||||||
if (s_log.isDebugEnabled()) {
|
if (s_log.isDebugEnabled()) {
|
||||||
s_log.debug("Finding root for " + nav + " in context " + ctx);
|
s_log.debug("Finding root for " + nav + " in context " + ctx);
|
||||||
}
|
}
|
||||||
|
|
@ -296,12 +285,12 @@ public class NavigationFileResolver extends DefaultApplicationFileResolver {
|
||||||
|
|
||||||
Category root = Category.getRootForObject(nav,
|
Category root = Category.getRootForObject(nav,
|
||||||
dispatcherContext);
|
dispatcherContext);
|
||||||
|
|
||||||
if (root == null && dispatcherContext != null) {
|
if (root == null && dispatcherContext != null) {
|
||||||
s_log.debug("No specific root found, trying generic context");
|
s_log.debug("No specific root found, trying generic context");
|
||||||
root = Category.getRootForObject(nav, null);
|
root = Category.getRootForObject(nav, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
Assert.exists(root, Category.class);
|
Assert.exists(root, Category.class);
|
||||||
if (s_log.isDebugEnabled()) {
|
if (s_log.isDebugEnabled()) {
|
||||||
s_log.debug("Got root category " + root);
|
s_log.debug("Got root category " + root);
|
||||||
|
|
@ -309,42 +298,36 @@ public class NavigationFileResolver extends DefaultApplicationFileResolver {
|
||||||
return root;
|
return root;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* category resolution retained as an instance method to
|
* category resolution retained as an instance method to allow it to be overridden. Default functionality contained
|
||||||
* allow it to be overridden. Default functionality
|
* in static resolveCategory method
|
||||||
* contained in static resolveCategory method
|
*
|
||||||
* @param root
|
* @param root
|
||||||
* @param path
|
* @param path
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
protected Category[] resolvePath (Category root, String path) {
|
protected Category[] resolvePath(Category root, String path) {
|
||||||
return NavigationFileResolver.resolveCategory(root, path);
|
return NavigationFileResolver.resolveCategory(root, path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Match a URL with the category tree and return the requested
|
* Match a URL with the category tree and return the requested category if exists.
|
||||||
* category if exists.
|
|
||||||
*
|
*
|
||||||
* Quasimodo:
|
* Quasimodo: Originally addEqualsFilter has been used to filter the appropriate category directly inside the SQL
|
||||||
* Originally addEqualsFilter has been used to filter the
|
* query. This is possible anymore due to the localised URLs of the new localised categories (or at least: not found
|
||||||
* appropriate category directly inside the SQL query. This is
|
* it). Therefore we do the filtering in Java now.
|
||||||
* possible anymore due to the localised URLs of the new
|
|
||||||
* localised categories (or at least: not found it).
|
|
||||||
* Therefore we do the filtering in Java now.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static Category[] resolveCategory(Category root,
|
public static Category[] resolveCategory(Category root,
|
||||||
String path) {
|
String path) {
|
||||||
String[] bits = StringUtils.split(path, '/');
|
String[] bits = StringUtils.split(path, '/');
|
||||||
|
|
||||||
List cats = new ArrayList();
|
List cats = new ArrayList();
|
||||||
cats.add(root);
|
cats.add(root);
|
||||||
|
|
||||||
Category cat = root;
|
Category cat = root;
|
||||||
for (int i = 0 ; i < bits.length ; i++) {
|
for (int i = 0; i < bits.length; i++) {
|
||||||
if ("".equals(bits[i])) {
|
if ("".equals(bits[i])) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
@ -359,7 +342,7 @@ public class NavigationFileResolver extends DefaultApplicationFileResolver {
|
||||||
boolean found = false;
|
boolean found = false;
|
||||||
while (children.next()) {
|
while (children.next()) {
|
||||||
cat = children.getCategory();
|
cat = children.getCategory();
|
||||||
if(cat.getURL().equals(bits[i]) && cat.isEnabled() == true) {
|
if (cat.getURL().equals(bits[i]) && cat.isEnabled() == true) {
|
||||||
if (s_log.isDebugEnabled()) {
|
if (s_log.isDebugEnabled()) {
|
||||||
s_log.debug("Got category " + cat);
|
s_log.debug("Got category " + cat);
|
||||||
}
|
}
|
||||||
|
|
@ -370,14 +353,14 @@ public class NavigationFileResolver extends DefaultApplicationFileResolver {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// } else {
|
// } else {
|
||||||
if(found == false) {
|
if (found == false) {
|
||||||
if (s_log.isDebugEnabled()) {
|
if (s_log.isDebugEnabled()) {
|
||||||
s_log.debug("No category found ");
|
s_log.debug("No category found ");
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (Category[])cats.toArray(new Category[cats.size()]);
|
return (Category[]) cats.toArray(new Category[cats.size()]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue