Skip to content
Snippets Groups Projects
Commit ef7835a1 authored by srosse's avatar srosse
Browse files

OO-1835: log an error if the thread doesn't exists and reload the thread list

parent 882c5a7d
No related branches found
No related tags found
No related merge requests found
......@@ -240,16 +240,22 @@ public class ForumController extends BasicController implements GenericEventList
private void doProcessSelectEvent(UserRequest ureq, SelectMessageEvent sme) {
Message thread = fm.getMessageById(sme.getMessageKey());
Message scrollTo = null;
if(sme.getScrollToMessageKey() != null) {
scrollTo = fm.getMessageById(sme.getScrollToMessageKey());
}
if(SelectMessageEvent.SELECT_THREAD.equals(sme.getCommand())) {
doThreadView(ureq, thread, scrollTo);
} else if(SelectMessageEvent.SELECT_MARKED.equals(sme.getCommand())) {
doMarkedView(ureq, thread, scrollTo);
} else if(SelectMessageEvent.SELECT_NEW.equals(sme.getCommand())) {
doNewView(ureq, thread, scrollTo);
if(thread == null) {
logError("Thread doesn't exists: " + sme.getMessageKey(), new Exception());
reloadThreadList = true;
doThreadList(ureq);
} else {
Message scrollTo = null;
if(sme.getScrollToMessageKey() != null) {
scrollTo = fm.getMessageById(sme.getScrollToMessageKey());
}
if(SelectMessageEvent.SELECT_THREAD.equals(sme.getCommand())) {
doThreadView(ureq, thread, scrollTo);
} else if(SelectMessageEvent.SELECT_MARKED.equals(sme.getCommand())) {
doMarkedView(ureq, thread, scrollTo);
} else if(SelectMessageEvent.SELECT_NEW.equals(sme.getCommand())) {
doNewView(ureq, thread, scrollTo);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment