summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-12-02 20:07:57 +0300
committerAndrew Dolgov <[email protected]>2018-12-02 20:07:57 +0300
commitd9c5c93cef313127b9b5010fbe279fdbddedadec (patch)
tree3a1838a1d9e9ff80bbbd57cd7b09b940f6ea4095 /include
parentad1b6f0a8618ed214001e90c0e5db380758a6c84 (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')
-rwxr-xr-xinclude/functions.php12
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