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

Commit f834e88

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

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

assets/cfi.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ document.addEventListener('DOMContentLoaded', function () {
129129

130130
formData.append('cfifile', file);
131131
formData.append('cfistate', 'import');
132-
formData.append('cficonvert', cfiCbConvert.checked);
132+
formData.append('cficonvert', Number(cfiCbConvert.checked));
133133
formData.append(Joomla.getOptions('csrf.token'), '1');
134134
xhr.send(formData);
135135
}

cfi.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,8 @@ private function _importData()
257257
$content = trim(file_get_contents($this->_file));
258258

259259
// convert to UTF-8
260-
if ((bool) $this->_app->input->get('cficonvert', false)) {
260+
$isConvert = (int) $this->_app->input->get('cficonvert', 0);
261+
if ($isConvert > 0) {
261262
$content = mb_convert_encoding($content, 'UTF-8', $this->_cp);
262263
}
263264

0 commit comments

Comments
 (0)