@@ -13,6 +13,7 @@ function version_number_to_branch($version) {
13
13
* must be in $RELEASES _and_ must be the full version number, not the branch:
14
14
* ie provide array('5.3.29'), not array('5.3'). */
15
15
function get_eol_branches ($ always_include = null ) {
16
+ $ always_include = $ always_include ? $ always_include : array ();
16
17
$ branches = array ();
17
18
18
19
// Gather the last release on each branch into a convenient array.
@@ -31,12 +32,19 @@ function get_eol_branches($always_include = null) {
31
32
}
32
33
33
34
/* Exclude releases from active branches, where active is defined as "in
34
- * the $RELEASES array". */
35
+ * the $RELEASES array and not explicitly marked as EOL there ". */
35
36
foreach ($ GLOBALS ['RELEASES ' ] as $ major => $ releases ) {
36
37
foreach ($ releases as $ version => $ release ) {
37
38
if ($ branch = version_number_to_branch ($ version )) {
38
- if (isset ($ branches [$ major ][$ branch ])) {
39
- unset($ branches [$ major ][$ branch ]);
39
+ if (empty ($ release ['eol ' ])) {
40
+ /* This branch isn't EOL: remove it from our array. */
41
+ if (isset ($ branches [$ major ][$ branch ])) {
42
+ unset($ branches [$ major ][$ branch ]);
43
+ }
44
+ } else {
45
+ /* Add the release information to the EOL branches array, since it
46
+ * should be newer than the information we got from $OLDRELEASES. */
47
+ $ always_include [] = $ version ;
40
48
}
41
49
}
42
50
}
0 commit comments