Commit:    d82c8f6ed3cfaa005963cd7e32f5a5bb26390381
Author:    Adam Harvey <[email protected]>         Tue, 19 Aug 2014 15:02:09 -0700
Parents:   00dc07a0bf450044c2e5631404227ff0546d4c16
Branches:  master

Link:       
http://git.php.net/?p=web/php.git;a=commitdiff;h=d82c8f6ed3cfaa005963cd7e32f5a5bb26390381

Log:
Allow branches to be specified as "EOL" even if they're still in $RELEASES.

Changed paths:
  M  include/branches.inc


Diff:
diff --git a/include/branches.inc b/include/branches.inc
index a0c4fab..1aece5c 100644
--- a/include/branches.inc
+++ b/include/branches.inc
@@ -9,7 +9,10 @@ function version_number_to_branch($version) {
        }
 }
 
-function get_eol_branches() {
+/* If you provide an array to $always_include, note that the version numbers
+ * 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) {
        $branches = array();
 
        // Gather the last release on each branch into a convenient array.
@@ -38,6 +41,24 @@ function get_eol_branches() {
                }
        }
 
+       // Include any release in the always_include list that's in $RELEASES.
+       if ($always_include) {
+               foreach ($always_include as $version) {
+                       $parts = explode('.', $version);
+                       $major = $parts[0];
+
+                       if (isset($GLOBALS['RELEASES'][$major][$version])) {
+                               $release = 
$GLOBALS['RELEASES'][$major][$version];
+                               if ($branch = 
version_number_to_branch($version)) {
+                                       $branches[$major][$branch] = array(
+                                               'date' => 
strtotime($release['source'][0]['date']),
+                                               'version' => $version,
+                                       );
+                               }
+                       }
+               }
+       }
+
        krsort($branches);
        foreach ($branches as $major => &$branch) {
                krsort($branch);


--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to