PITS /
01198: small problem in action=rdf
Summary: small problem in action=rdf
Created: 2010-05-23 21:15
Status: Closed - fixed for 2.2.18
Category: Bug
From: CarlosAB
Assigned:
Priority: 3
Version: 2.2.16
OS: freebsd, apache, php 5.2.8
Description: With "?action=rdf" it lists one item less at the top than the actual number of items at the bottom.
The fix is so simple, haven't tested troughly but here it is: (a diff is too much I guess)
# around line 196 to 210
$rdfseq = '';
$pl = array();
foreach($pagelist as $pn) {
if (!PageExists($pn)) continue;
if (!isset($PCache[$pn]['time']))
{ $page = ReadPage($pn, READPAGE_CURRENT); PCache($pn, $page); }
$pc = & $PCache[$pn];
$pl[] = $pn;
// commented here
//if (@$opt['count'] && count($pl) >= $opt['count']) break;
$rdfseq .= FmtPageName("<rdf:li resource=\"{\$PageUrl}\" />\n", $pn);
if ($pc['time'] > $feedtime) $feedtime = $pc['time'];
// replaced it here
if (@$opt['count'] && count($pl) >= $opt['count']) break;
}
$pagelist = $pl;