Commit: e76a1c72ad19000de0ce777af4aeb903154f2853 Author: Adam Harvey <ahar...@php.net> Thu, 3 Dec 2015 13:06:44 -0800 Parents: 2c6315e737957afe892159627631e16eb83224a8 Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=e76a1c72ad19000de0ce777af4aeb903154f2853 Log: Use get_active_branches() for the download links on the index. Changed paths: M index.php Diff: diff --git a/index.php b/index.php index f720918..4013d0d 100644 --- a/index.php +++ b/index.php @@ -36,6 +36,7 @@ else { $_SERVER['BASE_PAGE'] = 'index.php'; include_once 'include/prepend.inc'; +include_once 'include/branches.inc'; include_once 'include/pregen-confs.inc'; include_once 'include/pregen-news.inc'; include_once 'include/version.inc'; @@ -94,13 +95,14 @@ $intro = <<<EOF <div class="download"> <h3>Download</h3> EOF; -if(!empty($RELEASES[5])) { - $intro .= "<ul>\n"; - foreach ($RELEASES[5] as $version => $release) { + +$intro .= "<ul>\n"; +foreach (get_active_branches() as $major => $releases) { + foreach ($releases as $release) { + $version = $release['version']; $intro .= " - <li><a class='download-link' href='/downloads.php#v$version'>$version</a><span class='dot'>·</span><a class='notes' href='/ChangeLog-5.php#$version'>Release Notes</a></li>\n"; + <li><a class='download-link' href='/downloads.php#v$version'>$version</a><span class='dot'>·</span><a class='notes' href='/ChangeLog-5.php#$version'>Release Notes</a></li>\n"; } - $intro .= "</ul>\n"; } $intro .= <<<EOF </div> -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php