From d9c5c93cef313127b9b5010fbe279fdbddedadec Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 2 Dec 2018 20:07:57 +0300 Subject: [PATCH] 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() --- classes/dlg.php | 10 +-- classes/pref/feeds.php | 4 +- include/functions.php | 12 ++++ index.php | 2 +- js/Article.js | 2 +- js/CommonDialogs.js | 34 ++++++++++ js/CommonFilters.js | 4 +- js/Feeds.js | 2 +- js/PrefFilterTree.js | 2 +- js/PrefLabelTree.js | 2 +- js/PrefUsers.js | 2 +- js/Utils.js | 2 +- js/common.js | 126 ++++++++--------------------------- js/tt-rss.js | 32 ++++----- plugins/af_psql_trgm/init.js | 2 +- plugins/mail/mail.js | 2 +- plugins/mailto/init.js | 2 +- plugins/note/note.js | 2 +- plugins/share/share.js | 2 +- prefs.php | 2 +- 20 files changed, 111 insertions(+), 137 deletions(-) diff --git a/classes/dlg.php b/classes/dlg.php index 7e66c4b5e..32c41ee34 100644 --- a/classes/dlg.php +++ b/classes/dlg.php @@ -52,7 +52,7 @@ class Dlg extends Handler_Protected { print " "; - print ""; print ""; @@ -85,7 +85,7 @@ class Dlg extends Handler_Protected { print "
"; - print ""; print "
"; @@ -150,7 +150,7 @@ class Dlg extends Handler_Protected { print "
"; print ""; print "
"; @@ -179,7 +179,7 @@ class Dlg extends Handler_Protected { print " "; - print ""; print ""; @@ -195,7 +195,7 @@ class Dlg extends Handler_Protected { print " "; print ""; print ""; } diff --git a/classes/pref/feeds.php b/classes/pref/feeds.php index 3b949073c..7ae7a04c1 100755 --- a/classes/pref/feeds.php +++ b/classes/pref/feeds.php @@ -745,9 +745,9 @@ class Pref_Feeds extends Handler_Protected { - - "; 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 diff --git a/index.php b/index.php index 4a85ff236..6035ac186 100644 --- a/index.php +++ b/index.php @@ -91,7 +91,7 @@