mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01: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:
@@ -500,17 +500,17 @@ EOF
|
||||
if (file_exists($sDotExecutable))
|
||||
{
|
||||
// create the file with Graphviz
|
||||
if (!is_dir(APPROOT."data"))
|
||||
if (!is_dir(utils::GetDataPath()))
|
||||
{
|
||||
@mkdir(APPROOT."data");
|
||||
@mkdir(utils::GetDataPath());
|
||||
}
|
||||
if (!is_dir(APPROOT."data/tmp"))
|
||||
if (!is_dir(utils::GetDataPath()."tmp"))
|
||||
{
|
||||
@mkdir(APPROOT."data/tmp");
|
||||
@mkdir(utils::GetDataPath()."tmp");
|
||||
}
|
||||
$sImageFilePath = tempnam(APPROOT."data/tmp", 'png-');
|
||||
$sImageFilePath = tempnam(utils::GetDataPath()."tmp", 'png-');
|
||||
$sDotDescription = $this->GetDotDescription();
|
||||
$sDotFilePath = tempnam(APPROOT."data/tmp", 'dot-');
|
||||
$sDotFilePath = tempnam(utils::GetDataPath()."tmp", 'dot-');
|
||||
|
||||
$rFile = @fopen($sDotFilePath, "w");
|
||||
@fwrite($rFile, $sDotDescription);
|
||||
@@ -556,17 +556,17 @@ EOF
|
||||
if (file_exists($sDotExecutable))
|
||||
{
|
||||
// create the file with Graphviz
|
||||
if (!is_dir(APPROOT."data"))
|
||||
if (!is_dir(utils::GetDataPath()))
|
||||
{
|
||||
@mkdir(APPROOT."data");
|
||||
@mkdir(utils::GetDataPath());
|
||||
}
|
||||
if (!is_dir(APPROOT."data/tmp"))
|
||||
if (!is_dir(utils::GetDataPath()."tmp"))
|
||||
{
|
||||
@mkdir(APPROOT."data/tmp");
|
||||
@mkdir(utils::GetDataPath()."tmp");
|
||||
}
|
||||
$sXdotFilePath = tempnam(APPROOT."data/tmp", 'xdot-');
|
||||
$sXdotFilePath = tempnam(utils::GetDataPath()."tmp", 'xdot-');
|
||||
$sDotDescription = $this->GetDotDescription(true); // true => don't put (localized) labels in the file, since it makes it harder to parse
|
||||
$sDotFilePath = tempnam(APPROOT."data/tmp", 'dot-');
|
||||
$sDotFilePath = tempnam(utils::GetDataPath()."tmp", 'dot-');
|
||||
|
||||
$rFile = @fopen($sDotFilePath, "w");
|
||||
@fwrite($rFile, $sDotDescription);
|
||||
|
||||
Reference in New Issue
Block a user