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 +++++--- src/web/_views/head.php | 12 ++++++------ src/web/index.php | 1 + 3 files changed, 12 insertions(+), 9 deletions(-) (limited to 'src/web') 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; } diff --git a/src/web/_views/head.php b/src/web/_views/head.php index e30e05c..ef0d86c 100644 --- a/src/web/_views/head.php +++ b/src/web/_views/head.php @@ -14,12 +14,12 @@ <?=$title?> - - - - - - + "> + "> + "> + "> + "> + "> main->get_ie_version() <= 7) echo $this->main->link_css('css/legacy.css'); diff --git a/src/web/index.php b/src/web/index.php index e33e750..eedf913 100644 --- a/src/web/index.php +++ b/src/web/index.php @@ -5,6 +5,7 @@ ini_set('html_errors', '1'); $webroot = dirname(__FILE__); $assetroot = realpath(dirname(__FILE__) . '/../assets'); $publicroot = realpath(dirname(__FILE__) . '/../public'); +$rootroot = realpath(dirname(__FILE__) . '/..'); $main_model = NULL; // loadd all third party -- cgit v1.2.3-freya