diff options
author | Andrew Dolgov <[email protected]> | 2018-12-02 20:07:57 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2018-12-02 20:07:57 +0300 |
commit | d9c5c93cef313127b9b5010fbe279fdbddedadec (patch) | |
tree | 3a1838a1d9e9ff80bbbd57cd7b09b940f6ea4095 /include/functions.php | |
parent | ad1b6f0a8618ed214001e90c0e5db380758a6c84 (diff) |
move some more stuff out of common.js
rework client-side cookie functions a bit
limit dojo cachebust based on server scripts modification time
remove param_escape()
Diffstat (limited to 'include/functions.php')
-rwxr-xr-x | include/functions.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/functions.php b/include/functions.php index baed6fb20..dcb2e7518 100755 --- a/include/functions.php +++ b/include/functions.php @@ -2566,3 +2566,15 @@ function arr_qmarks($arr) { return str_repeat('?,', count($arr) - 1) . '?'; } + + function get_scripts_timestamp() { + $files = glob("js/*.js"); + $ts = 0; + + foreach ($files as $file) { + $file_ts = filemtime($file); + if ($file_ts > $ts) $ts = $file_ts; + } + + return $ts; + }
\ No newline at end of file |