Commit 59977847 authored by Kevin Dibble's avatar Kevin Dibble Committed by Robert Lyon
Browse files

Bug 1184947 : Chinese names of files when exporting

The only issue found when looking into this bug
is the directory name reported is not set.
it was using the variable $todir but the actual
directory name is in the variable $to.

On the Chinese character issue: this is server side:
When creating a leap2a export - the file name gets
appended with an id.  This is expected behaviour as
without this id before the file name, the leap 2a cannot
be re-imported.

So the 0-測試.txt is expected working.

The garbling of Chinese names is not to do with the
import/export, but the language locale support on the
server itself.

behatnotneeded

Change-Id: I6184bd4857cc28545b10ada94a258ae86f808b8e
(cherry picked from commit 39bf1159)
parent 30c3b530
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -228,7 +228,7 @@ class PluginExportHtml extends PluginExport {
        foreach ($copydata as $from => $to) {
            $to = $this->get('exportdir') . '/' . $this->get('rootdir') . $to;
            if (!check_dir_exists(dirname($to))) {
                $SESSION->add_error_msg(get_string('couldnotcreatedirectory', 'export', $todir));
                $SESSION->add_error_msg(get_string('couldnotcreatedirectory', 'export', $to));
            }
            if (!copy($from, $to)) {
                $SESSION->add_error_msg(get_string('couldnotcopystaticfile', 'export', $from));