Commit 0a845cd4 authored by deuce's avatar deuce
Browse files

Never allow 0 total pages.

parent a3d64535
...@@ -28,6 +28,8 @@ else { ...@@ -28,6 +28,8 @@ else {
template.can_delete=msg_area.sub[sub].is_operator; template.can_delete=msg_area.sub[sub].is_operator;
} }
var total_pages=Math.floor(msgarray.length/max_messages+(msgarray.length%max_messages?1:0)); var total_pages=Math.floor(msgarray.length/max_messages+(msgarray.length%max_messages?1:0));
if(total_pages==0)
total_pages=1;
var firstpage=0; var firstpage=0;
var lastpage=firstpage+max_pages-1; var lastpage=firstpage+max_pages-1;
if(lastpage>=total_pages) if(lastpage>=total_pages)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment