Skip to content
This repository was archived by the owner on Apr 24, 2023. It is now read-only.
/ cfi Public archive

Commit fe16d42

Browse files
author
AlekVolsk
committed
v1.0.7
1 parent f834e88 commit fe16d42

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

assets/cfi.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ document.addEventListener('DOMContentLoaded', function () {
121121
} else {
122122
cfiDropArea.classList.remove('cfi-dropzone-highlight');
123123
cfiDropArea.classList.add('alert-error');
124-
cfiDropLabel.innerHTML = '<strong>' + xhr.status + '</strong><span>Look at the log</span>';
124+
cfiDropLabel.innerHTML = '<strong>' + xhr.status + '</strong><span>Unknown error, look at the log</span>';
125125
cfiDropArea.style.pointerEvents = 'auto';
126126
cfiExportArea.style.pointerEvents = 'auto';
127127
}
@@ -175,7 +175,7 @@ document.addEventListener('DOMContentLoaded', function () {
175175
} else {
176176
cfiDropArea.classList.remove('cfi-dropzone-highlight');
177177
cfiDropArea.classList.add('alert-error');
178-
cfiLabelExport.innerHTML = '<strong>' + xhr.status + '</strong><span>Look at the log</span>';
178+
cfiLabelExport.innerHTML = '<strong>' + xhr.status + '</strong><span>Unknown error, look at the log</span>';
179179
cfiDropArea.style.pointerEvents = 'auto';
180180
cfiExportArea.style.pointerEvents = 'auto';
181181
}

cfi.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,11 @@
2626

2727
class plgSystemCfi extends CMSPlugin
2828
{
29-
private $BOM = "\xEF\xBB\xBF"; // UTF BOM signature
30-
private $BOM_CP = "п»ї"; // UTF BOM signature
29+
// UTF BOM signature
30+
private $BOM = [
31+
"\xEF\xBB\xBF", // UTF-8
32+
"п»ї" // UTF-8 OO
33+
];
3134

3235
private $_app;
3336
private $_doc;
@@ -263,7 +266,7 @@ private function _importData()
263266
}
264267

265268
// unset utf-8 bom
266-
$content = str_replace([$this->BOM, $this->BOM_CP], '', $content);
269+
$content = str_replace($this->BOM, '', $content);
267270

268271
// line separator definition
269272
$rowDelimiter = "\r\n";

0 commit comments

Comments
 (0)