Skip to content

Commit

Permalink
#480 [Task] fix: use saturne_require_object_mod
Browse files Browse the repository at this point in the history
  • Loading branch information
Théo David committed Aug 21, 2023
1 parent 2944789 commit 02ef5c4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions class/actions_dolisirh.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,19 +78,19 @@ public function doActions(array $parameters, $object, string $action): int
require_once DOL_DOCUMENT_ROOT . '/projet/class/task.class.php';
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';

require_once __DIR__ . '/../../saturne/lib/object.lib.php';

$product = new Product($this->db);
$task = new Task($this->db);
$project = new Project($this->db);
$categorie = new Categorie($this->db);

$taskRefClass = empty($conf->global->PROJECT_TASK_ADDON) ? 'mod_task_simple' : $conf->global->PROJECT_TASK_ADDON;
$numRefConf = strtoupper($task->element) . '_ADDON';

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();
} else {
$modTask = null;
}
$numberingModuleName = [
'project/task' => $conf->global->$numRefConf,
];
$modTask = saturne_require_objects_mod($numberingModuleName);

$dateStart = 0;
$dateEnd = 0;
Expand Down

0 comments on commit 02ef5c4

Please sign in to comment.