Merge branch 'w32_MDL-40889_m25_jsminify' of https://github.com/skodak/moodle into MOODLE_25_STABLE

This commit is contained in:
Sam Hemelryk
2013-08-06 09:55:10 +12:00
+6 -1
View File
@@ -107,6 +107,11 @@ function js_minify($files) {
return '';
}
// We do not really want any 304 here!
// There does not seem to be any better way to prevent them here.
unset($_SERVER['HTTP_IF_NONE_MATCH']);
unset($_SERVER['HTTP_IF_MODIFIED_SINCE']);
if (0 === stripos(PHP_OS, 'win')) {
Minify::setDocRoot(); // IIS may need help
}
@@ -132,7 +137,7 @@ function js_minify($files) {
$error = 'unknown';
try {
$result = Minify::serve('Files', $options);
if ($result['success']) {
if ($result['success'] and $result['statusCode'] == 200) {
return $result['content'];
}
} catch (Exception $e) {