diff --git a/source/java/org/alfresco/web/bean/SearchContext.java b/source/java/org/alfresco/web/bean/SearchContext.java index 7003feb0b2..bfd59c38cf 100644 --- a/source/java/org/alfresco/web/bean/SearchContext.java +++ b/source/java/org/alfresco/web/bean/SearchContext.java @@ -165,15 +165,6 @@ public final class SearchContext implements Serializable StringBuilder nameAttrBuf = new StringBuilder(128); StringBuilder additionalAttrsBuf = new StringBuilder(128); - /*Map simpleAdditionalAttrBufs = new HashMap(); - if (this.simpleSearchAdditionalAttrs != null) - { - for (QName qName : this.simpleSearchAdditionalAttrs) - { - simpleAdditionalAttrBufs.put(qName, new StringBuilder(64)); - } - }*/ - if (text.length() != 0 && text.length() >= minimum) { if (text.indexOf(' ') == -1 && text.charAt(0) != '"') @@ -422,7 +413,8 @@ public final class SearchContext implements Serializable String fullTextQuery = fullTextBuf.toString(); String nameAttrQuery = nameAttrBuf.toString(); - String additionalAttrsQuery = additionalAttrsBuf.toString(); + String additionalAttrsQuery = + (this.simpleSearchAdditionalAttrs.size() != 0) ? additionalAttrsBuf.toString() : ""; if (text.length() != 0 && text.length() >= minimum) { @@ -430,7 +422,8 @@ public final class SearchContext implements Serializable switch (mode) { case SearchContext.SEARCH_ALL: - query = '(' + fileTypeQuery + " AND " + '(' + nameAttrQuery + ' ' + additionalAttrsQuery + ' ' + fullTextQuery + ')' + ')' + " OR " + + query = '(' + fileTypeQuery + " AND " + '(' + nameAttrQuery + ' ' + additionalAttrsQuery + ' ' + fullTextQuery + ')' + ')' + + " OR " + '(' + folderTypeQuery + " AND " + nameAttrQuery + ' ' + additionalAttrsQuery + ')'; break; diff --git a/source/web/jsp/browse/browse.jsp b/source/web/jsp/browse/browse.jsp index 593918a22d..4d221d2505 100644 --- a/source/web/jsp/browse/browse.jsp +++ b/source/web/jsp/browse/browse.jsp @@ -210,16 +210,6 @@ - <%-- Error Messages --%> - - - - <%-- messages tag to show messages not handled by other specific message tags --%> - - - - - <%-- Custom Template View --%> @@ -524,6 +514,16 @@ + <%-- Error Messages --%> + + + + <%-- messages tag to show messages not handled by other specific message tags --%> + + + + + <%-- separator row with bottom panel graphics --%>