Skip to content

Commit b477bf6

Browse files
committed
Remove all changes to files moved into public/
1 parent 718680b commit b477bf6

9 files changed

Lines changed: 27 additions & 46 deletions

File tree

public/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
require_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>

public/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
require_once __DIR__ . '/../include/prepend.inc';
@@ -20,9 +17,9 @@ function branches_to_show() {
2017
$branches = [];
2118

2219
// Flatten out the majors.
23-
foreach (Branches::get_all_branches() as $major_branches) {
20+
foreach (get_all_branches() as $major_branches) {
2421
foreach ($major_branches as $branch => $version) {
25-
if (version_compare($branch, '5.3', 'ge') && Branches::getBranchSecurityEOLDate($branch) > min_date()) {
22+
if (version_compare($branch, '5.3', 'ge') && get_branch_security_eol_date($branch) > min_date()) {
2623
$branches[$branch] = $version;
2724
}
2825
}
@@ -139,9 +136,9 @@ function date_horiz_coord(DateTime $date) {
139136
<g class="branches">
140137
<?php foreach ($branches as $branch => $version): ?>
141138
<?php
142-
$x_release = date_horiz_coord(Branches::getBranchReleaseDate($branch));
143-
$x_bug = date_horiz_coord(Branches::getBranchBugsEOLDate($branch));
144-
$x_eol = date_horiz_coord(Branches::getBranchSecurityEOLDate($branch));
139+
$x_release = date_horiz_coord(get_branch_release_date($branch));
140+
$x_bug = date_horiz_coord(get_branch_bug_eol_date($branch));
141+
$x_eol = date_horiz_coord(get_branch_security_eol_date($branch));
145142
?>
146143
<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 ?>" />
147144
<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 ?>" />

public/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);

public/releases/active.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111

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

14-
echo json_encode(Branches::active());
14+
echo json_encode(get_active_branches());

public/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
require_once __DIR__ . '/../../include/prepend.inc';
@@ -14,15 +12,15 @@ function formatDate($date = null) {
1412
}
1513

1614
$current = [];
17-
foreach (Branches::get_all_branches() as $major => $releases) {
15+
foreach (get_all_branches() as $major => $releases) {
1816
foreach ($releases as $branch => $release) {
1917
$current[$branch] = [
2018
'branch' => $branch,
2119
'latest' => ($release['version'] ?? null),
2220
'state' => get_branch_support_state($branch),
23-
'initial_release' => formatDate(Branches::getBranchReleaseDate($branch)),
24-
'active_support_end' => formatDate(Branches::getBranchBugsEOLDate($branch)),
25-
'security_support_end' => formatDate(Branches::getBranchSecurityEOLDate($branch)),
21+
'initial_release' => formatDate(get_branch_release_date($branch)),
22+
'active_support_end' => formatDate(get_branch_bug_eol_date($branch)),
23+
'security_support_end' => formatDate(get_branch_security_eol_date($branch)),
2624
];
2725
}
2826
}

public/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
require __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) {

public/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
require_once __DIR__ . '/../../include/prepend.inc';
75
require_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

@@ -170,7 +165,7 @@
170165

171166
function recentEOLBranchesHTML(): string {
172167
$eol = [];
173-
foreach (Branches::eol() as $branches) {
168+
foreach (get_eol_branches() as $branches) {
174169
foreach ($branches as $branch => $detail) {
175170
$detail_date = $detail['date'];
176171
while (isset($eol[$detail_date])) $detail_date++;

public/releases/states.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ function formatDate($date = null) {
1919
return $date !== null ? $date->format('c') : null;
2020
}
2121

22-
foreach (Branches::get_all_branches() as $major => $releases) {
22+
foreach (get_all_branches() as $major => $releases) {
2323
$states[$major] = [];
2424
foreach ($releases as $branch => $release) {
2525
$states[$major][$branch] = [
26-
'state' => Branches::getBranchSupportStatus($branch),
27-
'initial_release' => formatDate(Branches::getBranchReleaseDate($branch)),
28-
'active_support_end' => formatDate(Branches::getBranchBugsEOLDate($branch)),
29-
'security_support_end' => formatDate(Branches::getBranchSecurityEOLDate($branch)),
26+
'state' => get_branch_support_state($branch),
27+
'initial_release' => formatDate(get_branch_release_date($branch)),
28+
'active_support_end' => formatDate(get_branch_bug_eol_date($branch)),
29+
'security_support_end' => formatDate(get_branch_security_eol_date($branch)),
3030
];
3131
}
3232
krsort($states[$major]);

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