Skip to content

Commit 2f3f99a

Browse files
committed
replace tab by 4 spaces during creation
1 parent b5d48bf commit 2f3f99a

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

class/Files/CreateFile.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@
3232
*/
3333
class CreateFile extends CreateTableFields
3434
{
35+
/**
36+
* @var string
37+
*/
38+
private $tab = ' ';
39+
3540
/**
3641
* @var mixed
3742
*/
@@ -213,7 +218,8 @@ public function getFileName()
213218
*/
214219
private function setContent($content)
215220
{
216-
$this->content = $content;
221+
//replace tabs by 4 spaces
222+
$this->content = preg_replace('/\t/', $this->tab, $content);
217223
}
218224

219225
/**

docs/changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
- added clone feature for items (mjoel/goffy)
3232
- update test data (mamba/goffy)
3333
- added start/limit handling (goffy)
34+
- replace tab by 4 spaces during creation (goffy)
3435

3536
<h5>3.04 Final [2020-11-11]</h5> Dev: XOOPS 2.5.11, PHP 7.4.5
3637
<hr>

0 commit comments

Comments
 (0)