Skip to content

Commit

Permalink
Remove the eol.php special case for 5.3.29.
Browse files Browse the repository at this point in the history
Instead, let's have an optional "eol" flag for releases in the $RELEASES array,
and use that to drive eol.php.
  • Loading branch information
LawnGnome committed Oct 1, 2014
1 parent cd03151 commit 295c610
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion eol.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</tr>
</thead>
<tbody>
<?php foreach (get_eol_branches(array('5.3.29')) as $major => $branches):
<?php foreach (get_eol_branches() as $major => $branches):

foreach ($branches as $branch => $detail) {
try {
Expand Down
14 changes: 11 additions & 3 deletions include/branches.inc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ function version_number_to_branch($version) {
* must be in $RELEASES _and_ must be the full version number, not the branch:
* ie provide array('5.3.29'), not array('5.3'). */
function get_eol_branches($always_include = null) {
$always_include = $always_include ? $always_include : array();
$branches = array();

// Gather the last release on each branch into a convenient array.
Expand All @@ -31,12 +32,19 @@ function get_eol_branches($always_include = null) {
}

/* Exclude releases from active branches, where active is defined as "in
* the $RELEASES array". */
* the $RELEASES array and not explicitly marked as EOL there". */
foreach ($GLOBALS['RELEASES'] as $major => $releases) {
foreach ($releases as $version => $release) {
if ($branch = version_number_to_branch($version)) {
if (isset($branches[$major][$branch])) {
unset($branches[$major][$branch]);
if (empty($release['eol'])) {
/* This branch isn't EOL: remove it from our array. */
if (isset($branches[$major][$branch])) {
unset($branches[$major][$branch]);
}
} else {
/* Add the release information to the EOL branches array, since it
* should be newer than the information we got from $OLDRELEASES. */
$always_include[] = $version;
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion include/version.inc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
* "date" => "this files release date",
* "note" => "this file was updated 29feb due to broken phar files..",
* ),
* "announcement" => "bool, release announcement exists in releases/?"
* "announcement" => "bool, release announcement exists in releases/?",
* "eol" => "bool, true to mark as EOL (affects bug tracker and eol.php)"
* ),
* ),
* );
Expand Down Expand Up @@ -127,6 +128,7 @@ $RELEASES = array(
),
$PHP_5_3_VERSION => array(
"announcement" => true,
"eol" => true,
"source" => array(
array(
"filename" => "php-$PHP_5_3_VERSION.tar.bz2",
Expand Down

0 comments on commit 295c610

Please sign in to comment.