mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-28 01:10:51 +01:00
Simplified code/math.
This commit is contained in:
parent
d36572df47
commit
0b50ef702f
@ -62,7 +62,7 @@
|
||||
|
||||
$res = mysql_query("SELECT COUNT(`id`) as `num` FROM `posts` WHERE `thread` IS NULL", $sql) or error(mysql_error($sql));
|
||||
$arr = mysql_fetch_array($res);
|
||||
$count = floor((THREADS_PER_PAGE + $arr['num'] - 1) / (THREADS_PER_PAGE));
|
||||
$count = floor((THREADS_PER_PAGE + $arr['num'] - 1) / THREADS_PER_PAGE);
|
||||
|
||||
$pages = Array();
|
||||
for($x=0;$x<$count && $x<MAX_PAGES;$x++) {
|
||||
|
Loading…
Reference in New Issue
Block a user