|
|
|
@ -92,12 +92,15 @@ function releases() {
|
|
|
|
|
return $releases; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function branches_to_show() { |
|
|
|
|
function branches_to_show($eol = false) { |
|
|
|
|
$now = date('Y-m-d'); |
|
|
|
|
return array_reduce( |
|
|
|
|
releases(), |
|
|
|
|
function ($branches, $release) use ($now) { |
|
|
|
|
if ($release['eol'] == '' || $release['eol'] > $now) { |
|
|
|
|
function ($branches, $release) use ($eol, $now) { |
|
|
|
|
if ($eol && $release['eol'] != '' && new DateTime($release['eol']) > min_date()) { |
|
|
|
|
$branches[] = $release; |
|
|
|
|
} |
|
|
|
|
elseif ($release['eol'] == '' || $release['eol'] > $now) { |
|
|
|
|
$branches[] = $release; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -114,7 +117,7 @@ function top($branch) {
|
|
|
|
|
function ($branch) { |
|
|
|
|
return $branch['branch']; |
|
|
|
|
}, |
|
|
|
|
branches_to_show() |
|
|
|
|
branches_to_show(true) |
|
|
|
|
); |
|
|
|
|
$i = array_search($branch, $branches, true); |
|
|
|
|
|
|
|
|
@ -138,5 +141,5 @@ function width($margin_left) {
|
|
|
|
|
function height($header_height) { |
|
|
|
|
global $svg; |
|
|
|
|
|
|
|
|
|
return $header_height + $svg['footer_height'] + (count(branches_to_show()) * $svg['branch_height']); |
|
|
|
|
return $header_height + $svg['footer_height'] + (count(branches_to_show(true)) * $svg['branch_height']); |
|
|
|
|
} |
|
|
|
|