Commit: 445ecce8db5e1c473ff89e68462c4b49eb75f161 Author: Adam Harvey <[email protected]> Fri, 22 Jul 2016 12:40:30 -0700 Parents: 935c5b843653c7e4a191a451e5991e530351057f Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=445ecce8db5e1c473ff89e68462c4b49eb75f161 Log: Don't show recently EOLed branches in the supported versions table. Changed the behaviour of get_active_branches() so that callers can choose whether to get recently EOLed branches or not. (This is basically for the supported versions page; the other callers -- namely the front page download links and bug tracker backend -- likely still want the previous behaviour.) After all, it's a little weird listing 5.5 as a supported version in the table when we just made a big deal of EOLing it! Changed paths: M include/branches.inc M supported-versions.php Diff: diff --git a/include/branches.inc b/include/branches.inc index c548726..9b128b9 100644 --- a/include/branches.inc +++ b/include/branches.inc @@ -122,14 +122,18 @@ function get_all_branches() { return $branches; } -function get_active_branches() { +function get_active_branches($include_recent_eols = true) { $branches = array(); $now = new DateTime; foreach ($GLOBALS['RELEASES'] as $major => $releases) { foreach ($releases as $version => $release) { if ($branch = version_number_to_branch($version)) { - if ($now < get_branch_security_eol_date($branch)->add($GLOBALS['KEEP_EOL'])) { + $threshold = get_branch_security_eol_date($branch); + if ($include_recent_eols) { + $threshold->add($GLOBALS['KEEP_EOL']); + } + if ($now < $threshold) { $branches[$major][$branch] = $release; $branches[$major][$branch]['version'] = $version; } diff --git a/supported-versions.php b/supported-versions.php index d7c5c4c..aa95113 100644 --- a/supported-versions.php +++ b/supported-versions.php @@ -47,7 +47,7 @@ $VERSION_NOTES = array( </tr> </thead> <tbody> - <?php foreach (get_active_branches() as $major => $releases): ?> + <?php foreach (get_active_branches(false) as $major => $releases): ?> <?php ksort($releases) ?> <?php foreach ($releases as $branch => $release): ?> <?php -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
