summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@n0v4.com>2011-02-17 17:14:57 +1100
committerSavetheinternet <savetheinternet@n0v4.com>2011-02-17 17:14:57 +1100
commitafcb4703f42792496f4174a69f49d82bb7249582 (patch)
tree2b92fdf2377cea7c926eddb3c919418b02968a4f /inc
parent55f082a4217cdc584dea6a59157d7cd725c7e329 (diff)
Fixed the when-there-are-no-posts-there-are-no-pages bug
Diffstat (limited to 'inc')
-rw-r--r--inc/functions.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/inc/functions.php b/inc/functions.php
index 0e6b54ad..c5b8f9b6 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -477,7 +477,9 @@
$count = current($query->fetch());
$count = floor(($config['threads_per_page'] + $count - 1) / $config['threads_per_page']);
-
+
+ if($count < 1) $count = 1;
+
$pages = Array();
for($x=0;$x<$count && $x<$config['max_pages'];$x++) {
$pages[] = Array(