]> git.mjollnir.org Git - moodle.git/commitdiff
Make sure XML is enabled
authormoodler <moodler>
Tue, 20 Jan 2004 10:03:34 +0000 (10:03 +0000)
committermoodler <moodler>
Tue, 20 Jan 2004 10:03:34 +0000 (10:03 +0000)
filter/multilang/multilang.php

index 71a352a682c060abf8605d05507a946e5be6e744..396cf98ae31141b4400b3854750d241d11c70023 100644 (file)
@@ -48,6 +48,11 @@ if (function_exists($textfilter_function)) {
 \r
 function multilang_filter($courseid, $text) {\r
 \r
+/// Make sure XML is enabled in this PHP\r
+    if (!function_exists('xml_parser_create')) {\r
+        return $text;\r
+    }\r
+\r
 /// Do a quick check using stripos to avoid unnecessary work\r
     if (stripos($text, '<lang') === false) {\r
         return $text;\r