on initial page hit, the cookie might not be set. Use global instead.

pull/2077/head
Isaac Connor 2017-12-13 11:21:50 -05:00
parent c509b6fbf4
commit e364641d7b
1 changed files with 2 additions and 1 deletions

View File

@ -2139,7 +2139,8 @@ function cache_bust( $file ) {
# Use the last modified timestamp to create a link that gets a different filename
# To defeat caching. Should probably use md5 hash
$parts = pathinfo($file);
$cacheFile = 'cache/'.$parts['filename'].'-'.$_COOKIE['zmCSS'].'-'.filemtime($file).'.'.$parts['extension'];
global $css;
$cacheFile = 'cache/'.$parts['filename'].'-'.$css.'-'.filemtime($file).'.'.$parts['extension'];
if ( file_exists( ZM_PATH_WEB.'/'.$cacheFile ) or symlink( ZM_PATH_WEB.'/'.$file, ZM_PATH_WEB.'/'.$cacheFile ) ) {
return $cacheFile;
} else {