Skip to content
Snippets Groups Projects
Commit 2105fdc0 authored by deuce's avatar deuce
Browse files

Fix total_pages calculation

parent e4b867eb
No related branches found
No related tags found
No related merge requests found
......@@ -27,7 +27,7 @@ else {
msgarray=get_all_message_offsets();
template.can_delete=msg_area.sub[sub].is_operator;
}
var total_pages=Math.floor(msgarray.length/max_messages);
var total_pages=Math.floor(msgarray.length/max_messages+(msgarray.length%max_messages?1:0));
var firstpage=0;
var lastpage=firstpage+max_pages-1;
if(lastpage>total_pages)
......
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