Skip to content
Snippets Groups Projects
Commit 73785925 authored by echicken's avatar echicken
Browse files

In printBoards, try to find the most recent non-deleted message to show as...

In printBoards, try to find the most recent non-deleted message to show as 'latest' - reported by Khelair.
parent afb68e40
No related branches found
No related tags found
No related merge requests found
......@@ -68,10 +68,14 @@ var printBoards = function() {
continue;
}
out += ((webIni.maxMessages > 0 && webIni.maxMessages < msgBase.total_msgs)?webIni.maxMessages:msgBase.total_msgs) + " messages.<br />";
var h = msgBase.get_msg_header(msgBase.last_msg);
msgBase.close();
if(h !== null)
for(var n = msgBase.last_msg; n >= msgBase.first_msg; n--) {
var h = msgBase.get_msg_header(n);
if(h === null || h.attr&MSG_DELETE)
continue;
out += format("Latest: %s, by %s on %s", h.subject, h.from, system.timestr(h.when_written_time));
break;
}
msgBase.close();
if(user.alias != webIni.WebGuest && msg_area.sub[msgBase.cfg.code].can_post) {
out += format(
"<br />"
......
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