MDL-25474 do not try to use caching for dynamic JS - it can not work

This commit is contained in:
Petr Skoda
2010-12-02 05:46:09 +00:00
parent 6d5b79c51d
commit 621df74e00
+2 -2
View File
@@ -371,7 +371,7 @@ class page_requirements_manager {
throw new coding_exception('Attempt to require a JavaScript file that does not exist.', $url);
}
}
if (!empty($CFG->cachejs) and !empty($CFG->jsrev) and strpos($url, '/lib/editor/') !== 0) {
if (!empty($CFG->cachejs) and !empty($CFG->jsrev) and strpos($url, '/lib/editor/') !== 0 and substr($url, -3) === '.js') {
return new moodle_url($CFG->httpswwwroot.'/lib/javascript.php', array('file'=>$url, 'rev'=>$CFG->jsrev));
} else {
return new moodle_url($CFG->httpswwwroot.$url);
@@ -535,7 +535,7 @@ class page_requirements_manager {
}
}
}
if ($this->headdone) {
$this->extramodules[$module['name']] = $module;
} else {