From a8b7f0d0db2aa64efb6d176de321402d1f5e5bdb Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Wed, 25 Sep 2024 14:42:59 -0400 Subject: generate array of file time stamps for production --- src/web/core/core.php | 5 +++-- src/web/index.php | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/web/core/core.php b/src/web/core/core.php index f1ce07e..feaecdf 100644 --- a/src/web/core/core.php +++ b/src/web/core/core.php @@ -25,8 +25,9 @@ abstract class Core { { if (ENVIRONMENT == 'devlopment') return time(); - $path = PHP_ROOT . '/' . $path; - return @filemtime($path); + if (isset(FILE_TIMES[$path])) + return FILE_TIMES[$path]; + return 0; } /** diff --git a/src/web/index.php b/src/web/index.php index 63e5b61..577bc60 100644 --- a/src/web/index.php +++ b/src/web/index.php @@ -48,6 +48,9 @@ require(WEB_ROOT . '/core/controller.php'); require(WEB_ROOT . '/core/model.php'); require(WEB_ROOT . '/core/router.php'); +// load file stamps +require(WEB_ROOT . '/stamp.php'); + // ============================== START == function __init() { -- cgit v1.2.3-freya