Issue Details (XML | Word | Printable)

Key: MDL-2855
Type: New Feature New Feature
Status: Open Open
Priority: Major Major
Assignee: Petr Skoda
Reporter: Dmitry Pupinin
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

Impossible use non-english characters in file's and folder's name

Created: 07/Apr/05 07:17 PM   Updated: 30/Nov/06 04:32 AM
Return to search
Component/s: Languages, Lib
Affects Version/s: 2.0
Fix Version/s: None

Environment: All

Participants: Dmitry Pupinin, Martin Dougiamas and Petr Skoda
Security Level: None
Affected Branches: MOODLE_20_STABLE


 Description  « Hide
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;

}

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Martin Dougiamas added a comment - 10/Aug/05 01:55 PM
From Dmitry Pupinin (dlnsk at nspu.ru) Monday, 11 April 2005, 01:22 AM:

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)