Re: Bug#510894: www.debian.org: DWN Index for 2007 also shows 2006 issues
Tags: patch
past years only want the same year's and don't want to include previous year's.
only CURRENT year wants more entry.
open(CURRENT, "CURRENT-ISSUE-IS") or open(CURRENT, "$eng_dir/CURRENT-ISSUE-IS") or return '';
my $currentissue=<CURRENT>;# </CURRENT>
chomp $currentissue;
my ($currentyear)=$currentissue=~m:^(\d+)/:;
$currentissue=~s:^\d+/::;
close CURRENT;
so, $currentyear is the year where "CURRENT-ISSUE-IS" says:
this can be used to determine if this is the CURRENT year or not.
--
victory
no need to CC me :-)
--- /deb/webwml/english/template/debian/weeklynews/index.1.27.wml Mon Aug 29 07:09:59 2005
+++ /deb/webwml/english/template/debian/weeklynews/index.wml Thu Mar 24 05:42:14 2011
@@ -61,11 +61,11 @@
last if ($stopat ne '' && $count >= $stopat);
}
close DIR;
# Get more if necessary.
- if ($count < 10 && $reccount < 3 ) {
+ if ($year == $currentyear && $count < 10 && $reccount < 3 ) {
$str.=get_weeklynews_list($year - 1, $eng_dir, $match, $noyear, $count, 10, $reccount++);
}
return $str;
}
--- /deb/webwml/english/template/debian/weeklynews/index.1.27.wml Mon Aug 29 07:09:59 2005
+++ /deb/webwml/english/template/debian/weeklynews/index.wml Thu Mar 24 05:42:14 2011
@@ -61,11 +61,11 @@
last if ($stopat ne '' && $count >= $stopat);
}
close DIR;
# Get more if necessary.
- if ($count < 10 && $reccount < 3 ) {
+ if ($year == $currentyear && $count < 10 && $reccount < 3 ) {
$str.=get_weeklynews_list($year - 1, $eng_dir, $match, $noyear, $count, 10, $reccount++);
}
return $str;
}
Reply to: