From 2e05b22ab641c5d01d72058d077ce6c3f880a174 Mon Sep 17 00:00:00 2001 From: mjollnir_ Date: Mon, 6 Mar 2006 00:39:51 +0000 Subject: [PATCH] Fixing the parse error in moodlelib! Do I get a prize for being first after sf.net came back up? ;) --- lib/moodlelib.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 28ba985ecff..c0e58452bd3 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -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