add timestamp on all css/js files
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
11
inc/spot.php
11
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')
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user