From 99fc498b2ff4cf3329b0b51cd8153dbac4efb4e7 Mon Sep 17 00:00:00 2001 From: moodler Date: Fri, 16 Mar 2007 05:20:45 +0000 Subject: [PATCH] SOme small fixes for filter_string ... MDL-8713 --- lib/weblib.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/weblib.php b/lib/weblib.php index 90796d4d132..865903c237d 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -1529,12 +1529,16 @@ function filter_string($string, $courseid=NULL) { $stringfilters = explode(',', $CFG->stringfilters); // ..use the list we have } else { // Otherwise try to derive a list from textfilters - if (strpos($CFG->textfilters, 'filter/multilang')) { // Multilang is here + if (strpos($CFG->textfilters, 'filter/multilang') !== false) { // Multilang is here $stringfilters = array('filter/multilang'); // Let's use just that $CFG->stringfilters = 'filter/multilang'; // Save it for next time through + } else { + $CFG->stringfilters = ''; // Save the result and return + return $string; } } + foreach ($stringfilters as $stringfilter) { if (is_readable($CFG->dirroot .'/'. $stringfilter .'/filter.php')) { include_once($CFG->dirroot .'/'. $stringfilter .'/filter.php');