зеркало из https://github.com/mozilla/pjs.git
oops was printing the oldest 15 to the rdf file, not the newest
This commit is contained in:
Родитель
e44a3c1a48
Коммит
d37641f813
|
@ -184,11 +184,12 @@ RDFHEAD
|
||||||
print $header;
|
print $header;
|
||||||
|
|
||||||
my $index = @articles - 1;
|
my $index = @articles - 1;
|
||||||
if ( $index > 15) {
|
# only print newest 15 articles
|
||||||
$index = 15;
|
my $min = 0;
|
||||||
}
|
if ($index > 15) {
|
||||||
for (my $i=$index; $i > 0 ; $i--) {
|
$min = $index - 15;
|
||||||
#may need to substitute &lt; for < since rdf adds extra layer
|
}
|
||||||
|
for (my $i=$index; $i > $min ; $i--) {
|
||||||
print (" <item>\n");
|
print (" <item>\n");
|
||||||
print (" <title>" . $articles[$i]->{'Subject'} . "</title>\n");
|
print (" <title>" . $articles[$i]->{'Subject'} . "</title>\n");
|
||||||
print (" <link>http://www.dejanews.com/[LB=http://www.mozilla.org/]/msgid.xp?MID=<" . $articles[$i]->{'Message-ID'} . "></link>\n");
|
print (" <link>http://www.dejanews.com/[LB=http://www.mozilla.org/]/msgid.xp?MID=<" . $articles[$i]->{'Message-ID'} . "></link>\n");
|
||||||
|
|
Загрузка…
Ссылка в новой задаче