summaryrefslogtreecommitdiff
path: root/archives/html
diff options
context:
space:
mode:
authorAlvaro Herrera2009-03-22 01:15:18 +0000
committerAlvaro Herrera2009-03-22 01:15:18 +0000
commit61518c6bb98c86ad2c4b1ffc2f5740c15fa840d7 (patch)
tree559942f3515aa42b7e7cf2e1408a1484d4fb6c11 /archives/html
parent734b0daf8ee77c7f5328fe03693dbede81ee2dac (diff)
Make the whole thing work for weekly archives too (cf. pgsql-tr-genel)
git-svn-id: file:///Users/dpage/pgweb/svn-repo/trunk@2439 8f5c7a92-453e-0410-a47f-ad33c8a6b003
Diffstat (limited to 'archives/html')
-rw-r--r--archives/html/list_index.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/archives/html/list_index.php b/archives/html/list_index.php
index fdd76963..8041fbc9 100644
--- a/archives/html/list_index.php
+++ b/archives/html/list_index.php
@@ -23,7 +23,10 @@ $f = fopen("months", 'r');
if ($f) {
$prevyear = 0;
while ($line = fgets($f)) {
- list ($year, $month) = sscanf($line, "%s %s");
+ /* some lists have weekly archives; the "months" file will have
+ * 3 columns in that case
+ */
+ list ($year, $month, $sub) = sscanf($line, "%s %s %s");
$month = rtrim($month);
$tpl->setCurrentBlock('month');
@@ -33,7 +36,10 @@ if ($f) {
else $yeartext = $year;
$tpl->setVariable('year_text', $yeartext);
$tpl->setVariable('month', $month);
- $tpl->setVariable('month_text', $months[$month - 1]);
+ if (isset($sub))
+ $tpl->setVariable('month_text', $months[$month - 1].", week ".$sub);
+ else
+ $tpl->setVariable('month_text', $months[$month - 1]);
$tpl->parse('month');
$prevyear = $year;
}