From 71dd230ee687ef631d9e4f29cd4283880f6347da Mon Sep 17 00:00:00 2001 From: Luffy Date: Wed, 26 Aug 2026 14:32:55 +0800 Subject: [PATCH 1/2] Add Cache-Control header to revcheck.php for improved caching --- www/revcheck.php | 1 + 1 file changed, 1 insertion(+) diff --git a/www/revcheck.php b/www/revcheck.php index 7d30004..daf2dc2 100644 --- a/www/revcheck.php +++ b/www/revcheck.php @@ -52,6 +52,7 @@ } site_header(); +header('Cache-Control: public, max-age=3600'); switch($tool) { case 'translators': $translators = get_translators($dbhandle, $lang); From b57ed739438e7a8cb47b77df6e6a310a2014ed33 Mon Sep 17 00:00:00 2001 From: Luffy <52o@qq52o.cn> Date: Wed, 2 Sep 2026 11:06:58 +0800 Subject: [PATCH 2/2] Refactor site_header to accept configuration array and update Cache-Control handling in revcheck.php --- include/lib_general.inc.php | 3 ++- www/revcheck.php | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/lib_general.inc.php b/include/lib_general.inc.php index af48826..603bec8 100644 --- a/include/lib_general.inc.php +++ b/include/lib_general.inc.php @@ -28,7 +28,7 @@ function get_svn_dir($project) return $GLOBALS['PROJECTS'][$project][1] . '/'; } -function site_header() +function site_header(array $config = []) { $TITLE = 'Documentation Tools'; $SUBDOMAIN = 'doc'; @@ -38,6 +38,7 @@ function site_header() array('href' => '/revcheck.php', 'text' => 'Translation Status'), array('href' => '/phd.php', 'text' => 'PhD Homepage'), ); + $CONFIG = $config; require __DIR__ . '/../shared/templates/header.inc'; echo << 3600]); switch($tool) { case 'translators': $translators = get_translators($dbhandle, $lang);