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')
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<link type="image/x-icon" href="images/favicon.ico" rel="shortcut icon" />
|
||||
<link type="image/png" href="images/favicon.png" rel="icon" sizes="32x32" />
|
||||
<link type="text/css" href="[#]css_timestamp[#]" rel="stylesheet" media="all" />
|
||||
<script type="text/javascript" src="script/leaflet.min.js"></script>
|
||||
<script type="text/javascript" src="script/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="script/jquery.mods.js"></script>
|
||||
<script type="text/javascript" src="script/spot.js"></script>
|
||||
<link type="text/css" href="[#]filepath_css[#]" rel="stylesheet" media="all" />
|
||||
<script type="text/javascript" src="[#]filepath_js_leaflet[#]"></script>
|
||||
<script type="text/javascript" src="[#]filepath_js_jquery[#]"></script>
|
||||
<script type="text/javascript" src="[#]filepath_js_jquery_mods[#]"></script>
|
||||
<script type="text/javascript" src="[#]filepath_js_spot[#]"></script>
|
||||
<script type="text/javascript">
|
||||
var oSpot = new Spot([#]GLOBAL_VARS[#]);
|
||||
$(document).ready(oSpot.init);
|
||||
|
||||
@@ -63,7 +63,7 @@ oSpot.pageInit = function(asHash)
|
||||
),
|
||||
$.ajax({
|
||||
dataType: 'json',
|
||||
url: self.consts.geo_folder+self.vars(['project', 'geofile']),
|
||||
url: self.vars(['project', 'geofile']),
|
||||
mimeType: 'application/json'
|
||||
})
|
||||
).done(function(oMessages, aoTracks) {
|
||||
|
||||
Reference in New Issue
Block a user