Skip to content

Commit b30ae19

Browse files
committed
Replace usages of get_eol_branches
1 parent 7fb1756 commit b30ae19

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

eol.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
<?php
2+
3+
use phpweb\Releases\Branches;
4+
25
$_SERVER['BASE_PAGE'] = 'eol.php';
36

47
include_once __DIR__ . '/include/prepend.inc';
@@ -46,7 +49,7 @@
4649
</tr>
4750
</thead>
4851
<tbody>
49-
<?php foreach (get_eol_branches() as $major => $branches): ?>
52+
<?php foreach (Branches::eol() as $major => $branches): ?>
5053
<?php foreach ($branches as $branch => $detail): ?>
5154
<?php $eolDate = get_branch_security_eol_date($branch) ?>
5255
<?php $eolPeriod = format_interval($eolDate, new DateTime('now')) ?>

include/branches.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ function get_active_branches(bool $include_recent_eols = true) {
142142
/* If you provide an array to $always_include, note that the version numbers
143143
* must be in $RELEASES _and_ must be the full version number, not the branch:
144144
* ie provide array('5.3.29'), not array('5.3'). */
145+
#[Deprecated('Use Branches::eol()')]
145146
function get_eol_branches($always_include = null) {
146147
$always_include = $always_include ?: [];
147148
$branches = [];

releases/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@
170170

171171
function recentEOLBranchesHTML(): string {
172172
$eol = [];
173-
foreach (get_eol_branches() as $branches) {
173+
foreach (Branches::eol() as $branches) {
174174
foreach ($branches as $branch => $detail) {
175175
$detail_date = $detail['date'];
176176
while (isset($eol[$detail_date])) $detail_date++;

0 commit comments

Comments
 (0)