Skip to content

Commit

Permalink
#348 [AdminConf] fix: modProject and task check error
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-eoxia committed Jul 7, 2023
1 parent 95071f7 commit 6a63b33
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions admin/setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
$now = dol_now();
$projectRefClass = empty($conf->global->PROJECT_ADDON) ? 'mod_project_simple' : $conf->global->PROJECT_ADDON;

if (!empty($conf->global->PROJECT_ADDON) && is_readable(DOL_DOCUMENT_ROOT . '/core/modules/project/' . $conf->global->PROJECT_ADDON . '.php')) {
if (!empty($projectRefClass) && is_readable(DOL_DOCUMENT_ROOT . '/core/modules/project/' . $projectRefClass . '.php')) {
require_once DOL_DOCUMENT_ROOT . '/core/modules/project/' . $projectRefClass . '.php';
$modProject = new $projectRefClass();
$projectRef = $modProject->getNextValue('', null);
Expand Down Expand Up @@ -118,7 +118,7 @@

$taskRefClass = empty($conf->global->PROJECT_TASK_ADDON) ? 'mod_task_simple' : $conf->global->PROJECT_TASK_ADDON;

if (!empty($conf->global->PROJECT_TASK_ADDON) && is_readable(DOL_DOCUMENT_ROOT . '/core/modules/project/task/' . $conf->global->PROJECT_TASK_ADDON . '.php')) {
if (!empty($taskRefClass) && is_readable(DOL_DOCUMENT_ROOT . '/core/modules/project/task/' . $taskRefClass . '.php')) {
require_once DOL_DOCUMENT_ROOT . '/core/modules/project/task/' . $conf->global->PROJECT_TASK_ADDON . '.php';
$modTask = new $taskRefClass();
$taskRef = $modTask->getNextValue('', null);
Expand Down

0 comments on commit 6a63b33

Please sign in to comment.