Skip to content

Commit 61ddab5

Browse files
authored
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 9d70bcb commit 61ddab5

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
@@ -195,6 +195,11 @@ public function load_arrays($user, $filter = '')
195195
if (is_resource($handle)) {
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
$reg = array();
199204
if (is_readable($dir.$file) && preg_match("/^(mod.*)\.class\.php$/i", $file, $reg)) {
200205
$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)