Skip to content

Commit 5482a52

Browse files
authored
Merge branch 'master' into fix/include
2 parents d41b324 + 26b50b7 commit 5482a52

7 files changed

Lines changed: 21 additions & 6 deletions

File tree

phpstan.neon.dist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ parameters:
1717
- var/ (?)
1818
- public/manual/en
1919
- include/releases.inc
20-
- include/pregen-news.inc
21-
- include/pregen-confs.inc
20+
- public/include/pregen-news.inc
21+
- public/include/pregen-confs.inc

public/images/supported-versions.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?php
2+
use phpweb\ProjectGlobals;
3+
24
require_once __DIR__ . '/../../include/prepend.inc';
3-
require_once __DIR__ . '/../../include/branches.inc';
5+
require_once ProjectGlobals::getProjectRoot(). '/include/branches.inc';
46

57
// Sizing constants.
68
$margin_left = 80;
@@ -55,6 +57,7 @@ function date_horiz_coord(DateTime $date) {
5557

5658
if (!isset($non_standalone)) {
5759
header('Content-Type: image/svg+xml');
60+
header('Cache-Control: public, max-age=10800'); // 3 hours
5861
echo '<?xml version="1.0"?>';
5962
}
6063

public/releases/active.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88
require_once __DIR__ . '/../../include/branches.inc';
99

1010
header('Content-Type: application/json; charset=UTF-8');
11+
header('Cache-Control: public, max-age=900');
1112

1213
echo json_encode(get_active_branches());

public/releases/index.php

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

3+
use phpweb\ProjectGlobals;
4+
35
$_SERVER['BASE_PAGE'] = 'releases/index.php';
46
require_once __DIR__ . '/../../include/prepend.inc';
5-
require_once __DIR__ . "/../../include/branches.inc";
7+
require_once ProjectGlobals::getProjectRoot(). '/include/branches.inc';
68

79
if (isset($_GET["serialize"]) || isset($_GET["json"])) {
810
$RELEASES = $RELEASES + $OLDRELEASES;

public/supported-versions.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
11
<?php
2+
3+
use phpweb\ProjectGlobals;
4+
25
$_SERVER['BASE_PAGE'] = 'supported-versions.php';
36

47
require_once __DIR__ . '/../include/prepend.inc';
5-
require_once __DIR__ . '/../include/branches.inc';
8+
require_once ProjectGlobals::getProjectRoot(). '/include/branches.inc';
69

7-
site_header('Supported Versions', ['css' => ['supported-versions.css']]);
10+
site_header(
11+
'Supported Versions',
12+
[
13+
'css' => ['supported-versions.css'],
14+
'cache_control' => 3 * 60 * 60, // 3 hours
15+
]
16+
);
817

918
// Version notes: if you need to make a note about a version having an unusual
1019
// support lifetime, add it under a heading with an anchor, and add the anchor

0 commit comments

Comments
 (0)