Skip to content

Commit c9d1179

Browse files
aspangaroeldy
authored andcommitted
FIX Import/Export - Do not list imports or exports of Builder module backups of module descriptor files (#36192)
* FIX Import/Export - Do not list imports or exports of Builder module backups of module descriptor files * FIX
1 parent a7ec88c commit c9d1179

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

htdocs/exports/class/export.class.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,11 @@ public function load_arrays($user, $filter = '')
194194
if (is_resource($handle)) {
195195
// Search module files
196196
while (($file = readdir($handle)) !== false) {
197+
// Ignore Module Builder backup files (*.php.back)
198+
if (preg_match('/\.back$/i', $file)) {
199+
continue;
200+
}
201+
197202
$reg = array();
198203
if (is_readable($dir.$file) && preg_match("/^(mod.*)\.class\.php$/i", $file, $reg)) {
199204
$modulename = $reg[1];

htdocs/imports/class/import.class.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,11 @@ public function load_arrays($user, $filter = '')
195195

196196
// Search module files
197197
while (($file = readdir($handle)) !== false) {
198+
// Ignore Module Builder backup files (*.php.back)
199+
if (preg_match('/\.back$/i', $file)) {
200+
continue;
201+
}
202+
198203
if (!preg_match("/^(mod.*)\.class\.php/i", $file, $reg)) {
199204
continue;
200205
}

0 commit comments

Comments
 (0)