Fixing the parse error in moodlelib! Do I get a prize for being first after sf.net came back up? ;)

This commit is contained in:
mjollnir_ 2006-03-06 00:39:51 +00:00
parent 74ffb569c6
commit 2e05b22ab6

View file

@ -4469,7 +4469,8 @@ function display_size($size) {
function clean_filename($string) {
global $CFG;
if (empty($CFG->unicodecleanfilename) || current_charset() != 'UTF-8') {
$string = textlib_get_instance()->specialtoascii($string, current_charset());
$textlib = textlib_get_instance();
$string = $textlib->specialtoascii($string, current_charset());
$string = preg_replace('/[^\.a-zA-Z\d\_-]/','_', $string ); // only allowed chars
} else {
//clean only ascii range