From 621df74e00fd750ff7d6cc8cf9fdb0e86ee2031c Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Thu, 2 Dec 2010 05:46:09 +0000 Subject: [PATCH] MDL-25474 do not try to use caching for dynamic JS - it can not work --- lib/outputrequirementslib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/outputrequirementslib.php b/lib/outputrequirementslib.php index 54cb95927d5..7be93287a80 100644 --- a/lib/outputrequirementslib.php +++ b/lib/outputrequirementslib.php @@ -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 { -- 2.43.0