mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 11:08:45 +02:00
N°6648 - Use \utils::GetDataPath() instead of hard-coded paths (#555)
* N°6648 - Use \utils::GetDataPath() instead of hard-coded paths * Update setup/applicationinstaller.class.inc.php Co-authored-by: Thomas Casteleyn <thomas.casteleyn@super-visions.com> --------- Co-authored-by: Thomas Casteleyn <thomas.casteleyn@super-visions.com>
This commit is contained in:
@@ -111,17 +111,17 @@ $sDotExecutable = MetaModel::GetConfig()->Get('graphviz_path');
|
||||
if (file_exists($sDotExecutable))
|
||||
{
|
||||
// create the file with Graphviz
|
||||
$sImageFilePath = APPROOT."data/lifecycle/".$sClass.".svg";
|
||||
if (!is_dir(APPROOT."data"))
|
||||
$sImageFilePath = utils::GetDataPath()."lifecycle/".$sClass.".svg";
|
||||
if (!is_dir(utils::GetDataPath()))
|
||||
{
|
||||
@mkdir(APPROOT."data");
|
||||
@mkdir(utils::GetDataPath());
|
||||
}
|
||||
if (!is_dir(APPROOT."data/lifecycle"))
|
||||
if (!is_dir(utils::GetDataPath()."lifecycle"))
|
||||
{
|
||||
@mkdir(APPROOT."data/lifecycle");
|
||||
@mkdir(utils::GetDataPath()."lifecycle");
|
||||
}
|
||||
$sDotDescription = GraphvizLifecycle($sClass);
|
||||
$sDotFilePath = APPROOT."data/lifecycle/{$sClass}.dot";
|
||||
$sDotFilePath = utils::GetDataPath()."lifecycle/{$sClass}.dot";
|
||||
|
||||
$rFile = @fopen($sDotFilePath, "w");
|
||||
@fwrite($rFile, $sDotDescription);
|
||||
|
||||
Reference in New Issue
Block a user