Permalink
Browse files

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

  • Loading branch information...
1 parent 6d5b79c commit 621df74e00fd750ff7d6cc8cf9fdb0e86ee2031c @skodak skodak committed Dec 2, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/outputrequirementslib.php
@@ -371,7 +371,7 @@ protected function js_fix_url($url) {
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 @@ public function js_module($module) {
}
}
}
-
+
if ($this->headdone) {
$this->extramodules[$module['name']] = $module;
} else {

0 comments on commit 621df74

Please sign in to comment.