cvs: php-news-web / group.php

From: Date: Wed, 21 Sep 2005 22:08:57 +0000
Subject: cvs: php-news-web / group.php
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-29412@lists.php.net to get a copy of this message
nlopess Wed Sep 21 18:08:57 2005 EDT Modified files: /php-news-web group.php Log: fix bug in the groups pages: it was showing 21 articles per pages instead of 20, causing duplicates http://cvs.php.net/diff.php/php-news-web/group.php?r1=1.20&r2=1.21&ty=u Index: php-news-web/group.php diff -u php-news-web/group.php:1.20 php-news-web/group.php:1.21 --- php-news-web/group.php:1.20 Wed Jan 26 11:52:39 2005 +++ php-news-web/group.php Wed Sep 21 18:08:57 2005 @@ -33,10 +33,10 @@ } list (, $f, $l, $g) = explode(" ", $res); -if (!$i || $i > $l - 20 || $i < $f) { - $i = $l - $f > 20 ? $l - 20 : $f; +if (!$i || $i > $l - 19 || $i < $f) { + $i = $l - $f > 19 ? $l - 19 : $f; } -$n = min($l + 1, $i + 20); +$n = min($l, $i + 19); $res = nntp_cmd($s,"XOVER $i-$n", 224); if (!$res) { @@ -157,8 +157,8 @@ $c = $l - $f + 1; echo ' <td align="center" class="alisthead">'.htmlspecialchars($g)." ($i-$j of $c)</td>\n"; echo ' <td align="right" class="nav">'; - if ($i+20 < $l) { - $n = min($i + 20, $l - 20); + if ($i+20 <= $l) { + $n = min($i + 20, $l - 19); echo "<a href=\"/" . htmlspecialchars($g) . "/start/$n\"><b>next &raquo;</b></a>"; } else {

« previous php.mirrors (#29412) next »