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";
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Create the cached file containing extension information
|
||||
*
|
||||
* This function will always create a file, even if no extensions
|
||||
* are installed.
|
||||
*/
|
||||
function createExtensionConf() { /* {{{ */
|
||||
$extensions = self::getExtensions();
|
||||
if($extensions) {
|
||||
$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);
|
||||
}
|
||||
}
|
||||
fclose($fp);
|
||||
include($this->cachedir."/extensions.php");
|
||||
}
|
||||
fclose($fp);
|
||||
//include($this->cachedir."/extensions.php");
|
||||
} /* }}} */
|
||||
|
||||
function getExtensions() { /* {{{ */
|
||||
|
|
Loading…
Reference in New Issue
Block a user