From d9c5c93cef313127b9b5010fbe279fdbddedadec Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 2 Dec 2018 20:07:57 +0300 Subject: 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() --- include/functions.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/functions.php') 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 -- cgit v1.2.3