Skip to content

Commit

Permalink
Merge branch 'MDL-67348-master' of git://github.com/andrewnicols/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
abgreeve committed Nov 27, 2019
2 parents 21418c9 + d950843 commit f88437b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions theme/styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,15 @@
$candidatesheet = "{$candidatedir}/" . theme_styles_get_filename($type, $themesubrev, $usesvg);
$etag = theme_styles_get_etag($themename, $rev, $type, $themesubrev, $usesvg);

if (file_exists($candidatesheet)) {
if (!empty($_SERVER['HTTP_IF_NONE_MATCH']) || !empty($_SERVER['HTTP_IF_MODIFIED_SINCE'])) {
// We do not actually need to verify the etag value because our files
// never change in cache because we increment the rev counter.
css_send_unmodified(filemtime($candidatesheet), $etag);
}
css_send_cached_css($candidatesheet, $etag);
}

// Ok, now we need to start normal moodle script, we need to load all libs and $DB.
define('ABORT_AFTER_CONFIG_CANCEL', true);

Expand Down

0 comments on commit f88437b

Please sign in to comment.