include all conf.php files and var_export() them instead of concating them

This commit is contained in:
Uwe Steinmann 2025-03-26 07:54:33 +01:00
parent edb91d3299
commit 7529c68c80

View File

@ -206,13 +206,19 @@ class SeedDMS_Extension_Mgr {
$fp = @fopen(self::getExtensionsConfFile(), "w");
if($fp) {
if($extensions) {
$EXT_CONF = [];
foreach($extensions as $_ext) {
if(file_exists($this->extdir . "/" . $_ext . "/conf.php")) {
$content = file_get_contents($this->extdir . "/" . $_ext . "/conf.php");
fwrite($fp, $content);
include $this->extdir . "/" . $_ext . "/conf.php";
// $content = file_get_contents($this->extdir . "/" . $_ext . "/conf.php");
// fwrite($fp, $content);
}
}
}
// fclose($fp);
// $fp = @fopen(self::getExtensionsConfFile(), "w");
fwrite($fp, '<?php
$EXT_CONF = '.var_export($EXT_CONF, true).';');
fclose($fp);
return true;
} else {