Skip to content

Commit

Permalink
history plugin: Fix missing loop startkey case in 18c8be6
Browse files Browse the repository at this point in the history
  • Loading branch information
ophian committed Jan 4, 2024
1 parent 7592605 commit a4b6f10
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function introspect(&$propbag)
$propbag->add('description', PLUGIN_HISTORY_DESC);
$propbag->add('stackable', true);
$propbag->add('author', 'Jannis Hermanns, Ian Styx');
$propbag->add('version', '1.39');
$propbag->add('version', '1.40');
$propbag->add('requirements', array(
'serendipity' => '2.0',
'smarty' => '3.1',
Expand Down Expand Up @@ -292,7 +292,7 @@ function generate_content(&$title)
#}

$today = date('Y-m-d', $nowts);
$xyears = $xyears+1; // adds one search year plus into the array - because we are counting yeardays backward
$xyears = $xyears+1; // adds one additional search year plus into the array - because we are counting yeardays backward

$cy = date('Y', $nowts);
$sy = ($cy-$xyears);
Expand All @@ -311,7 +311,8 @@ function generate_content(&$title)
$leap[] = date('L', strtotime("$i-01-01"));
}
// loop xyears backward days by leap year (cases)
for($y=1; $y < $xyears; $y++) {
$skey = $sc ? 0 : 1; // the $startkey
for($y=$skey; $y < $xyears; $y++) {
if ($y == 0 && !$sc) {
$adddays = 365; // don't count the top current leap year + day in case it is January and February
} else {
Expand Down

0 comments on commit a4b6f10

Please sign in to comment.