|
|
|
All non-english (national) characters replace to _.
This problem solved as follows:
In file /lib/moodlelib.php
function clean_filename($string) {
$string = eregi_replace(\.\.+, , $string);
// $string = preg_replace('/[^\.a-zA-Z\d\_-]/','_', $string ); // only allowed chars
$string = preg_replace('/[^[:alnum:]\.-]/','_', $string ); // only allowed chars **but not only english**
$string = eregi_replace(_+, _, $string);
return $string;
}
|
|
Description
|
All non-english (national) characters replace to _.
This problem solved as follows:
In file /lib/moodlelib.php
function clean_filename($string) {
$string = eregi_replace(\.\.+, , $string);
// $string = preg_replace('/[^\.a-zA-Z\d\_-]/','_', $string ); // only allowed chars
$string = preg_replace('/[^[:alnum:]\.-]/','_', $string ); // only allowed chars **but not only english**
$string = eregi_replace(_+, _, $string);
return $string;
} |
Show » |
|
Necessary else to correct file /files/index.php
All changes in attachment!
Additional changes:
1. Color of message File upload success changed from red to green.
2. User now can Choose folders (see #2880)