Skip to content

Commit

Permalink
Fix tempory path
Browse files Browse the repository at this point in the history
  • Loading branch information
yllen authored and cedric-anne committed Oct 26, 2020
1 parent cd60c47 commit e79d891
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions inc/session.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ static function getParam($param) {
}
if (in_array($param, ['results', 'error_lines'])) {
$fic = $_SESSION['datainjection'][$param];
return file_get_contents(GLPI_DOC_DIR.'/_tmp/'.$fic);
return file_get_contents(GLPI_TMP_DIR.'/'.$fic);
}
return $_SESSION['datainjection'][$param];
}
Expand All @@ -63,7 +63,7 @@ static function setParam($param, $results) {

if (in_array($param, ['results', 'error_lines'])) {
$fic = Session::getLoginUserID().'_'.$param.'_'.microtime(true);
file_put_contents(GLPI_DOC_DIR.'/_tmp/'.$fic, $results);
file_put_contents(GLPI_TMP_DIR.'/'.$fic, $results);
$_SESSION['datainjection'][$param] = $fic;
} else {
$_SESSION['datainjection'][$param] = $results;
Expand All @@ -79,10 +79,10 @@ static function setParam($param, $results) {
static function removeParams() {

if (isset($_SESSION['datainjection']['results'])) {
unlink(GLPI_DOC_DIR.'/_tmp/'.$_SESSION['datainjection']['results']);
unlink(GLPI_TMP_DIR.'/'.$_SESSION['datainjection']['results']);
}
if (isset($_SESSION['datainjection']['error_lines'])) {
unlink(GLPI_DOC_DIR.'/_tmp/'.$_SESSION['datainjection']['error_lines']);
unlink(GLPI_TMP_DIR.'/'.$_SESSION['datainjection']['error_lines']);
}
unset($_SESSION['datainjection']);
}
Expand Down

0 comments on commit e79d891

Please sign in to comment.