mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
fix creating of configuration file
createExtensionConf() will in any case create a file, even if there are no extensions available. It will not automatically include that file anymore.
This commit is contained in:
parent
48ae373d87
commit
803d819c03
|
@ -57,19 +57,25 @@ class SeedDMS_Extension_Mgr {
|
||||||
return $this->cachedir."/extensions.php";
|
return $this->cachedir."/extensions.php";
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create the cached file containing extension information
|
||||||
|
*
|
||||||
|
* This function will always create a file, even if no extensions
|
||||||
|
* are installed.
|
||||||
|
*/
|
||||||
function createExtensionConf() { /* {{{ */
|
function createExtensionConf() { /* {{{ */
|
||||||
$extensions = self::getExtensions();
|
$extensions = self::getExtensions();
|
||||||
|
$fp = fopen($this->cachedir."/extensions.php", "w");
|
||||||
if($extensions) {
|
if($extensions) {
|
||||||
$fp = fopen($this->cachedir."/extensions.php", "w");
|
|
||||||
foreach($extensions as $_ext) {
|
foreach($extensions as $_ext) {
|
||||||
if(file_exists($this->extdir . "/" . $_ext . "/conf.php")) {
|
if(file_exists($this->extdir . "/" . $_ext . "/conf.php")) {
|
||||||
$content = file_get_contents($this->extdir . "/" . $_ext . "/conf.php");
|
$content = file_get_contents($this->extdir . "/" . $_ext . "/conf.php");
|
||||||
fwrite($fp, $content);
|
fwrite($fp, $content);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fclose($fp);
|
|
||||||
include($this->cachedir."/extensions.php");
|
|
||||||
}
|
}
|
||||||
|
fclose($fp);
|
||||||
|
//include($this->cachedir."/extensions.php");
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
function getExtensions() { /* {{{ */
|
function getExtensions() { /* {{{ */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user