From 58902c70d6a985e85b60e7341240165e37dd959c Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 28 Sep 2020 09:49:07 -0400 Subject: [PATCH] use output_script_if_exists to cache_bust most of the js --- web/skins/classic/includes/functions.php | 40 +++++++++++++++--------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/web/skins/classic/includes/functions.php b/web/skins/classic/includes/functions.php index d72b611bb..bd20dc534 100644 --- a/web/skins/classic/includes/functions.php +++ b/web/skins/classic/includes/functions.php @@ -58,10 +58,18 @@ function xhtmlHeaders($file, $title) { global $skin; $html = array(); foreach ( $files as $file ) { - if ( $cache_bust ) { - $html[] = ''; - } else { - $html[] = ''; + if ( file_exists('skins/'.$skin.'/'.$file) ) { + if ( $cache_bust ) { + $html[] = ''; + } else { + $html[] = ''; + } + } else if ( file_exists($file) ) { + if ( $cache_bust ) { + $html[] = ''; + } else { + $html[] = ''; + } } } $html[] = ''; // So we ge a trailing \n @@ -865,17 +873,19 @@ function xhtmlFooter() { - - - - - - - - - - - +