Merge branch 'w07_MDL-26380_20_mediafilterperf' of git://github.com/skodak/moodle

This commit is contained in:
Eloy Lafuente (stronk7) 2011-02-14 01:41:19 +01:00
commit 42bdecde6d

View File

@ -46,6 +46,11 @@ class filter_mediaplugin extends moodle_text_filter {
// non string data can not be filtered anyway
return $text;
}
if (stripos($text, '</a>') === false) {
// performance shortcut - all regexes bellow end with the </a> tag,
// if not present nothing can match
return $text;
}
$newtext = $text; // fullclone is slow and not needed here
if (!empty($CFG->filter_mediaplugin_enable_mp3)) {