| |
| |
|
|
|
|
| |
|
| |
|
| :: |
| Author |
Message |
wwwmaster
Joined: 10 Mar 2007 Posts: 9
|
Posted: Wed Apr 04, 2007 11:06 pm Post subject: Pagination bug in RC2 |
|
|
Hello,
I haven't tested RC3 yet, but the pagination is wrong in rss_forum.php in RC2. The pagination is calculated with the following lines spread in rss_forum.php:
| Code: |
$paginated = $board_config['posts_per_page'];
$pages = ceil($topic['topic_replies'] / $paginated);
$start = $this->mod_r_config['start'] . $paginated * ($pages-1);
|
Let's take an example:
The posts per page is set to 15, and a thread has 46 posts. The calculation of the number of the last page goes like this:
ceil(45/15) is 3.
the number in $start will be 15*3 = 45. However, since the thread has 46 posts total (original one + 45 replies), the wrong page will be displayed.
To fix this, one has to replace the $pages... line with this:
| Code: |
$pages = ceil(($topic['topic_replies']+1) / $paginated);
|
|
|
|
| Back to top |
|
 |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14403
|
|
| Back to top |
|
 |
|
| Navigation |
Similar Topics |
|
|
|
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |