Fixed the when-there-are-no-posts-there-are-no-pages bug

This commit is contained in:
Savetheinternet 2011-02-17 17:14:57 +11:00
parent 55f082a421
commit afcb4703f4

View File

@ -478,6 +478,8 @@
$count = current($query->fetch()); $count = current($query->fetch());
$count = floor(($config['threads_per_page'] + $count - 1) / $config['threads_per_page']); $count = floor(($config['threads_per_page'] + $count - 1) / $config['threads_per_page']);
if($count < 1) $count = 1;
$pages = Array(); $pages = Array();
for($x=0;$x<$count && $x<$config['max_pages'];$x++) { for($x=0;$x<$count && $x<$config['max_pages'];$x++) {
$pages[] = Array( $pages[] = Array(