Skip to content

Commit 1e85c70

Browse files
committed
Remove all changes to files moved into public/
1 parent 46f8046 commit 1e85c70

9 files changed

Lines changed: 27 additions & 50 deletions

File tree

eol.php

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

74
include_once __DIR__ . '/include/prepend.inc';
@@ -49,9 +46,9 @@
4946
</tr>
5047
</thead>
5148
<tbody>
52-
<?php foreach (Branches::eol() as $major => $branches): ?>
49+
<?php foreach (get_eol_branches() as $major => $branches): ?>
5350
<?php foreach ($branches as $branch => $detail): ?>
54-
<?php $eolDate = Branches::getBranchSecurityEOLDate($branch) ?>
51+
<?php $eolDate = get_branch_security_eol_date($branch) ?>
5552
<?php $eolPeriod = format_interval($eolDate, new DateTime('now')) ?>
5653
<tr>
5754
<td><?php echo htmlspecialchars($branch); ?></td>

images/supported-versions.php

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
<?php
2-
3-
use phpweb\Releases\Branches;
4-
52
include_once __DIR__ . '/../include/prepend.inc';
63
include_once __DIR__ . '/../include/branches.inc';
74

@@ -18,9 +15,9 @@ function branches_to_show() {
1815
$branches = [];
1916

2017
// Flatten out the majors.
21-
foreach (Branches::get_all_branches() as $major_branches) {
18+
foreach (get_all_branches() as $major_branches) {
2219
foreach ($major_branches as $branch => $version) {
23-
if (version_compare($branch, '5.3', 'ge') && Branches::getBranchSecurityEOLDate($branch) > min_date()) {
20+
if (version_compare($branch, '5.3', 'ge') && get_branch_security_eol_date($branch) > min_date()) {
2421
$branches[$branch] = $version;
2522
}
2623
}
@@ -137,9 +134,9 @@ function date_horiz_coord(DateTime $date) {
137134
<g class="branches">
138135
<?php foreach ($branches as $branch => $version): ?>
139136
<?php
140-
$x_release = date_horiz_coord(Branches::getBranchReleaseDate($branch));
141-
$x_bug = date_horiz_coord(Branches::getBranchBugsEOLDate($branch));
142-
$x_eol = date_horiz_coord(Branches::getBranchSecurityEOLDate($branch));
137+
$x_release = date_horiz_coord(get_branch_release_date($branch));
138+
$x_bug = date_horiz_coord(get_branch_bug_eol_date($branch));
139+
$x_eol = date_horiz_coord(get_branch_security_eol_date($branch));
143140
?>
144141
<rect class="stable" x="<?php echo $x_release ?>" y="<?php echo $version['top'] ?>" width="<?php echo $x_bug - $x_release ?>" height="<?php echo $branch_height ?>" />
145142
<rect class="security" x="<?php echo $x_bug ?>" y="<?php echo $version['top'] ?>" width="<?php echo $x_eol - $x_bug ?>" height="<?php echo $branch_height ?>" />

index.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?php
22

33
use phpweb\News\NewsHandler;
4-
use phpweb\Releases\Branches;
54

65
(function ($uri): void {
76
// Special redirect cases not able to be captured in error.php
@@ -93,7 +92,7 @@
9392
EOF;
9493

9594
$intro .= "<ul class='hero__versions'>\n";
96-
$active_branches = Branches::active();
95+
$active_branches = get_active_branches();
9796
krsort($active_branches);
9897
foreach ($active_branches as $major => $releases) {
9998
krsort($releases);

releases/active.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
<?php
22

3-
use phpweb\Releases\Branches;
4-
53
$_SERVER['BASE_PAGE'] = 'releases/active.php';
64

75
include_once __DIR__ . '/../include/prepend.inc';
86
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/branches.inc';
97

108
header('Content-Type: application/json; charset=UTF-8');
119

12-
echo json_encode(Branches::active());
10+
echo json_encode(get_active_branches());

releases/branches.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<?php
22

3-
use phpweb\Releases\Branches;
4-
53
include_once __DIR__ . '/../include/prepend.inc';
64
include_once __DIR__ . '/../include/branches.inc';
75

@@ -12,15 +10,15 @@ function formatDate($date = null) {
1210
}
1311

1412
$current = [];
15-
foreach (Branches::get_all_branches() as $major => $releases) {
13+
foreach (get_all_branches() as $major => $releases) {
1614
foreach ($releases as $branch => $release) {
1715
$current[$branch] = [
1816
'branch' => $branch,
1917
'latest' => ($release['version'] ?? null),
2018
'state' => get_branch_support_state($branch),
21-
'initial_release' => formatDate(Branches::getBranchReleaseDate($branch)),
22-
'active_support_end' => formatDate(Branches::getBranchBugsEOLDate($branch)),
23-
'security_support_end' => formatDate(Branches::getBranchSecurityEOLDate($branch)),
19+
'initial_release' => formatDate(get_branch_release_date($branch)),
20+
'active_support_end' => formatDate(get_branch_bug_eol_date($branch)),
21+
'security_support_end' => formatDate(get_branch_security_eol_date($branch)),
2422
];
2523
}
2624
}

releases/feed.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<?php
22

3-
use phpweb\Releases\Branches;
4-
53
header("Content-Type: application/atom+xml");
64

75
include __DIR__ . "/../include/version.inc";
@@ -24,7 +22,7 @@
2422
ob_start();
2523

2624
// Flatten major versions out of RELEASES.
27-
$RELEASED_VERSIONS = array_reduce(Branches::getReleaseData(), 'array_merge', []);
25+
$RELEASED_VERSIONS = array_reduce($RELEASES, 'array_merge', []);
2826
$FEED_UPDATED = 0;
2927
krsort($RELEASED_VERSIONS);
3028
foreach ($RELEASED_VERSIONS as $version => $release) {

releases/index.php

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,16 @@
11
<?php
22

3-
use phpweb\Releases\Branches;
4-
53
$_SERVER['BASE_PAGE'] = 'releases/index.php';
64
include_once __DIR__ . '/../include/prepend.inc';
75
include_once __DIR__ . "/../include/branches.inc";
86

9-
$RELEASES = Branches::getReleaseData();
10-
$OLDRELEASES = Branches::getOldReleaseData();
11-
127
if (isset($_GET["serialize"]) || isset($_GET["json"])) {
13-
$RELEASES = Branches::getReleaseData() + Branches::getOldReleaseData();
8+
$RELEASES = $RELEASES + $OLDRELEASES;
149

1510
$machineReadable = [];
1611

1712
$supportedVersions = [];
18-
foreach (Branches::active(false) as $major => $releases) {
13+
foreach (get_active_branches(false) as $major => $releases) {
1914
$supportedVersions[$major] = array_keys($releases);
2015
}
2116

@@ -173,7 +168,7 @@
173168

174169
function recentEOLBranchesHTML(): string {
175170
$eol = [];
176-
foreach (Branches::eol() as $branches) {
171+
foreach (get_eol_branches() as $branches) {
177172
foreach ($branches as $branch => $detail) {
178173
$detail_date = $detail['date'];
179174
while (isset($eol[$detail_date])) $detail_date++;

releases/states.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
# Please use /releases/branches.php instead.
44
# This API *may* be removed at an indeterminate point in the future.
55

6-
use phpweb\Releases\Branches;
7-
86
$_SERVER['BASE_PAGE'] = 'releases/active.php';
97

108
include_once __DIR__ . '/../include/prepend.inc';
@@ -18,14 +16,14 @@ function formatDate($date = null) {
1816
return $date !== null ? $date->format('c') : null;
1917
}
2018

21-
foreach (Branches::get_all_branches() as $major => $releases) {
19+
foreach (get_all_branches() as $major => $releases) {
2220
$states[$major] = [];
2321
foreach ($releases as $branch => $release) {
2422
$states[$major][$branch] = [
25-
'state' => Branches::getBranchSupportStatus($branch),
26-
'initial_release' => formatDate(Branches::getBranchReleaseDate($branch)),
27-
'active_support_end' => formatDate(Branches::getBranchBugsEOLDate($branch)),
28-
'security_support_end' => formatDate(Branches::getBranchSecurityEOLDate($branch)),
23+
'state' => get_branch_support_state($branch),
24+
'initial_release' => formatDate(get_branch_release_date($branch)),
25+
'active_support_end' => formatDate(get_branch_bug_eol_date($branch)),
26+
'security_support_end' => formatDate(get_branch_security_eol_date($branch)),
2927
];
3028
}
3129
krsort($states[$major]);

supported-versions.php

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
<?php
2-
3-
use phpweb\Releases\Branches;
4-
52
$_SERVER['BASE_PAGE'] = 'supported-versions.php';
63

74
include_once __DIR__ . '/include/prepend.inc';
@@ -54,14 +51,14 @@
5451
</tr>
5552
</thead>
5653
<tbody>
57-
<?php foreach (Branches::active(false) as $major => $releases): ?>
54+
<?php foreach (get_active_branches(false) as $major => $releases): ?>
5855
<?php ksort($releases) ?>
5956
<?php foreach ($releases as $branch => $release): ?>
6057
<?php
61-
$state = Branches::getBranchSupportStatus($branch);
62-
$initial = Branches::getBranchReleaseDate($branch);
63-
$until = Branches::getBranchBugsEOLDate($branch);
64-
$eol = Branches::getBranchSecurityEOLDate($branch);
58+
$state = get_branch_support_state($branch);
59+
$initial = get_branch_release_date($branch);
60+
$until = get_branch_bug_eol_date($branch);
61+
$eol = get_branch_security_eol_date($branch);
6562
$now = new DateTime('now');
6663
?>
6764
<tr class="<?php echo $state ?>">

0 commit comments

Comments
 (0)