com web/php: Use get_active_branches() for the do wnload links on the index.: index.php

From: Date: Thu, 03 Dec 2015 21:06:44 +0000
Subject: com web/php: Use get_active_branches() for the do wnload links on the index.: index.php
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-24340@lists.php.net to get a copy of this message
Commit: e76a1c72ad19000de0ce777af4aeb903154f2853 Author: Adam Harvey <aharvey@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'>&middot;</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'>&middot;</span><a class='notes' href='/ChangeLog-5.php#$version'>Release Notes</a></li>\n"; } - $intro .= "</ul>\n"; } $intro .= <<<EOF </div>

« previous php.webmaster (#24340) next »