From e138f2ca4164e45412d4594d7d34a7f3b8ab16d1 Mon Sep 17 00:00:00 2001 From: franzz Date: Sat, 26 Jan 2019 18:05:17 +0100 Subject: [PATCH] add timestamp on all css/js files --- inc/project.php | 4 +--- inc/spot.php | 11 ++++++++--- masks/index.html | 10 +++++----- masks/project.html | 2 +- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/inc/project.php b/inc/project.php index 7852dc3..7b54431 100644 --- a/inc/project.php +++ b/inc/project.php @@ -91,9 +91,7 @@ class Project extends PhpObject { case 1: $asProject['mode'] = self::MODE_BLOG; break; case 2: $asProject['mode'] = self::MODE_HISTO; break; } - - $sGeoFilePath = self::GEO_FOLDER.$asProject['geofile']; - $asProject['geofile'] = file_exists($sGeoFilePath)?$asProject['geofile'].'?'.date("YmdHis", filemtime($sGeoFilePath)):$asProject['geofile']; + $asProject['geofile'] = Spot::addTimestampToFilePath(self::GEO_FOLDER.$asProject['geofile']); } return $asProjects; } diff --git a/inc/spot.php b/inc/spot.php index aad4caf..793873b 100755 --- a/inc/spot.php +++ b/inc/spot.php @@ -107,12 +107,17 @@ class Spot extends Main 'projects' => $this->oProject->getProjects() ), 'consts' => array( - 'modes' => Project::MODES, - 'geo_folder'=> Project::GEO_FOLDER + 'modes' => Project::MODES ) ), 'index', - array('css_timestamp'=>$this->addTimestampToFilePath('style/spot.css')) + array( + 'filepath_css' => self::addTimestampToFilePath('style/spot.css'), + 'filepath_js_leaflet' => self::addTimestampToFilePath('script/leaflet.min.js'), + 'filepath_js_jquery' => self::addTimestampToFilePath('script/jquery.min.js'), + 'filepath_js_jquery_mods' => self::addTimestampToFilePath('script/jquery.mods.js'), + 'filepath_js_spot' => self::addTimestampToFilePath('script/spot.js') + ) ); } diff --git a/masks/index.html b/masks/index.html index df99c3d..bc928d9 100755 --- a/masks/index.html +++ b/masks/index.html @@ -4,11 +4,11 @@ - - - - - + + + + +