diff options
author | Freya Murphy <freya@freyacat.org> | 2024-06-29 21:35:49 -0400 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2024-06-29 21:35:49 -0400 |
commit | aa314ae90109f97c116a161e0aeefcbb15d01030 (patch) | |
tree | a8db3fb325a1fa0b20007877a64107312721caab /src/web/_model | |
parent | hi images (diff) | |
download | website-aa314ae90109f97c116a161e0aeefcbb15d01030.tar.gz website-aa314ae90109f97c116a161e0aeefcbb15d01030.tar.bz2 website-aa314ae90109f97c116a161e0aeefcbb15d01030.zip |
fix
Diffstat (limited to 'src/web/_model')
-rw-r--r-- | src/web/_model/main.php | 8 |
1 files changed, 5 insertions, 3 deletions
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; } |