]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-18880: only insert media players for swf URLs if $CFG->filter_mediaplugin_enable_...
authorgbateson <gbateson>
Sun, 19 Apr 2009 23:49:04 +0000 (23:49 +0000)
committergbateson <gbateson>
Sun, 19 Apr 2009 23:49:04 +0000 (23:49 +0000)
mod/hotpot/lib.php

index 6c0a269c9752d20da921dbda12ff845a445e5870..17e13191dd7a1d568660c400d6394d035650a80f 100644 (file)
@@ -1878,7 +1878,10 @@ class hotpot_xml_quiz extends hotpot_xml_tree {
             $quote = '["'."']?"; // single, double, or no quote
 
             // patterns to media files types and paths
-            $filetype = "avi|mpeg|mpg|mp3|mov|wmv|swf|flv";
+            $filetype = "avi|mpeg|mpg|mp3|mov|wmv|flv";
+            if ($CFG->filter_mediaplugin_enable_swf) {
+                $filetype .= '|swf';
+            }
             $filepath = ".*?\.($filetype)";
 
             $tagopen = '(?:(<)|(\\\\u003C))'; // left angle-bracket (uses two parenthese)