Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7b55e20
)
NOBUG: BOM rebombed from 19_STABLE
author
Eloy Lafuente
<stronk7@moodle.org>
Thu, 8 Apr 2010 18:16:26 +0000
(18:16 +0000)
committer
Eloy Lafuente
<stronk7@moodle.org>
Thu, 8 Apr 2010 18:16:26 +0000
(18:16 +0000)
mod/data/import.php
patch
|
blob
|
blame
|
history
diff --git
a/mod/data/import.php
b/mod/data/import.php
index
6130149
..
34ae1b0
100755
(executable)
--- a/
mod/data/import.php
+++ b/
mod/data/import.php
@@
-108,9
+108,12
@@
if ($um->preprocess_files() && confirm_sesskey()) {
@apache_child_terminate();
}
- //Fix mac/dos newlines
+ // Fix mac/dos newlines
+ // TODO: Switch to cvslib when possible
+ $textlib = textlib_get_instance();
$text = my_file_get_contents($filename);
$text = preg_replace('!\r\n?!',"\n",$text);
+ $text = $textlib->trim_utf8_bom($text); // remove Unicode BOM from first line
$fp = fopen($filename, "w");
fwrite($fp, $text);
fclose($fp);