Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/persistence/ForumCondition.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/persistence/ForumCondition.java,v diff -u -r1.4 -r1.5 --- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/persistence/ForumCondition.java 9 Dec 2008 05:40:32 -0000 1.4 +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/persistence/ForumCondition.java 15 Apr 2016 09:11:30 -0000 1.5 @@ -180,7 +180,8 @@ Set topicsCopy = new TreeSet(new ConditionTopicComparator()); for (Message conditionTopic : getTopics()) { for (Message contentTopic : (Set) forum.getMessages()) { - if (contentTopic.getIsAuthored() && contentTopic.getCreated().equals(conditionTopic.getCreated())) { + if (contentTopic.getIsAuthored() && contentTopic.getToolSession() == null + && contentTopic.getCreated().equals(conditionTopic.getCreated())) { topicsCopy.add(contentTopic); } } @@ -202,9 +203,9 @@ * It filters the given text in order to find any of the unwanted words. * * @param excludedWords - * words to search for + * words to search for * @param textToMatch - * string to be filtered + * string to be filtered * @return true if at least one of the words from the list is found in the text */ private boolean matchExcludedWordsOnly(List excludedWords, String textToMatch) { @@ -213,8 +214,9 @@ } StringBuilder stringPattern = new StringBuilder(); for (String excludedWord : excludedWords) { - stringPattern.append("(?:").append(TextSearchCondition.NON_WORD_DELIMITER_REGEX).append( - Pattern.quote(excludedWord)).append(TextSearchCondition.NON_WORD_DELIMITER_REGEX).append(")|"); + stringPattern.append("(?:").append(TextSearchCondition.NON_WORD_DELIMITER_REGEX) + .append(Pattern.quote(excludedWord)).append(TextSearchCondition.NON_WORD_DELIMITER_REGEX) + .append(")|"); } stringPattern.deleteCharAt(stringPattern.length() - 1); Pattern regexPattern = Pattern.compile(stringPattern.toString(), TextSearchCondition.PATTERN_MATCHING_OPTIONS);