Skip to content

Commit 84510c3

Browse files
committed
Replace usages of get_eol_branches
1 parent 48e3ad9 commit 84510c3

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

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 = [];

public/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
require_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')) ?>

public/releases/index.php

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

168168
function recentEOLBranchesHTML(): string {
169169
$eol = [];
170-
foreach (get_eol_branches() as $branches) {
170+
foreach (Branches::eol() as $branches) {
171171
foreach ($branches as $branch => $detail) {
172172
$detail_date = $detail['date'];
173173
while (isset($eol[$detail_date])) $detail_date++;

0 commit comments

Comments
 (0)