fix creation of cached extension configuration

This commit is contained in:
Uwe Steinmann 2015-04-16 08:03:23 +02:00
parent 869b6a6dae
commit d16559c3d1

View File

@ -57,17 +57,21 @@ class SeedDMS_Extension_Mgr {
*/
function createExtensionConf() { /* {{{ */
$extensions = self::getExtensions();
$fp = fopen($this->cachedir."/extensions.php", "w");
if($extensions) {
foreach($extensions as $_ext) {
if(file_exists($this->extdir . "/" . $_ext . "/conf.php")) {
$content = file_get_contents($this->extdir . "/" . $_ext . "/conf.php");
fwrite($fp, $content);
$fp = fopen(self::getExtensionsConfFile(), "w");
if($fp) {
if($extensions) {
foreach($extensions as $_ext) {
if(file_exists($this->extdir . "/" . $_ext . "/conf.php")) {
$content = file_get_contents($this->extdir . "/" . $_ext . "/conf.php");
fwrite($fp, $content);
}
}
}
fclose($fp);
return true;
} else {
return false;
}
fclose($fp);
//include($this->cachedir."/extensions.php");
} /* }}} */
function getExtensions() { /* {{{ */