Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/persistence/ForumCondition.java =================================================================== diff -u -r05db875c7974d705f89231416ff6dfe91a5e70f1 -r5f9002d411275757eef348aeb88c918b2ccedd17 --- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/persistence/ForumCondition.java (.../ForumCondition.java) (revision 05db875c7974d705f89231416ff6dfe91a5e70f1) +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/persistence/ForumCondition.java (.../ForumCondition.java) (revision 5f9002d411275757eef348aeb88c918b2ccedd17) @@ -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);