]> git.mjollnir.org Git - moodle.git/commitdiff
requires-css MDL-16151 Support for css files that use args
authorsamhemelryk <samhemelryk>
Fri, 25 Sep 2009 08:24:50 +0000 (08:24 +0000)
committersamhemelryk <samhemelryk>
Fri, 25 Sep 2009 08:24:50 +0000 (08:24 +0000)
lib/ajax/ajaxlib.php

index 3ed96dc8d9cb1fb165a40298c0cc116488c3dbeb..ea05acfc332e9c9c61ea70952960f00e19006863 100644 (file)
@@ -193,7 +193,7 @@ class page_requirements_manager {
             throw new coding_exception('Cannot require a CSS file after &lt;head> has been printed.', $stylesheet);
         }
         if (!$fullurl) {
-            if (!file_exists($CFG->dirroot . '/' . $stylesheet)) {
+            if (!file_exists($CFG->dirroot . '/' . strtok($stylesheet, '?'))) {
                 throw new coding_exception('Attempt to require a CSS file that does not exist.', $stylesheet);
             }
             $url = $CFG->httpswwwroot . '/' . $stylesheet;