From aa314ae90109f97c116a161e0aeefcbb15d01030 Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Sat, 29 Jun 2024 21:35:49 -0400 Subject: fix --- src/web/_model/main.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/web/_model/main.php') diff --git a/src/web/_model/main.php b/src/web/_model/main.php index 6767010..5728932 100644 --- a/src/web/_model/main.php +++ b/src/web/_model/main.php @@ -23,7 +23,7 @@ class Main_model extends Model { private function asset_stamp($path): int { $root = $GLOBALS['webroot']; $path = $root . '/../public/' . $path; - return filemtime($path); + return @filemtime($path); } /** @@ -45,7 +45,8 @@ class Main_model extends Model { public function get_url_full($path): string { $host = $_SERVER['HTTP_HOST']; $base = lang('base_path'); - $url = "http://{$host}{$base}{$path}"; + $time = @filemtime($GLOBALS['rootroot'] . '/' . $path); + $url = "http://{$host}{$base}{$path}?timestamp={$time}"; return $url; } @@ -57,7 +58,8 @@ class Main_model extends Model { return $this->get_url_full($path); } $base = lang('base_path'); - $url = "{$base}{$path}"; + $time = @filemtime($GLOBALS['rootroot'] . '/' . $path); + $url = "{$base}{$path}?timestamp={$time}"; return $url; } -- cgit v1.2.3-freya