From 5a466bfac3cc3f90dadada3fccc055bb857acadf Mon Sep 17 00:00:00 2001 From: Shish Date: Sun, 20 Sep 2015 17:40:04 +0100 Subject: [PATCH] include config modification data in JS/CSS caches --- core/page.class.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/core/page.class.php b/core/page.class.php index c03b0853..03db3bae 100644 --- a/core/page.class.php +++ b/core/page.class.php @@ -333,8 +333,13 @@ class Page { $this->add_html_header("", 41); $this->add_html_header("", 42); + $config_latest = 0; + foreach(zglob("data/config/*") as $conf) { + $config_latest = max($config_latest, filemtime($conf)); + } + $css_files = array(); - $css_latest = 0; + $css_latest = $config_latest; foreach(array_merge(zglob("lib/*.css"), zglob("ext/*/style.css"), zglob("themes/$theme_name/style.css")) as $css) { $css_files[] = $css; $css_latest = max($css_latest, filemtime($css)); @@ -354,7 +359,7 @@ class Page { $this->add_html_header("", 43); $js_files = array(); - $js_latest = 0; + $js_latest = $config_latest; foreach(array_merge(zglob("lib/*.js"), zglob("ext/*/script.js"), zglob("themes/$theme_name/script.js")) as $js) { $js_files[] = $js; $js_latest = max($js_latest, filemtime($js));