From b87d96203d972297cc4da458a4b6f671a65814e3 Mon Sep 17 00:00:00 2001 From: Christian Foellmann Date: Thu, 14 Dec 2023 12:39:08 +0100 Subject: [PATCH] NEW add data type 'project' to blockedlog --- htdocs/blockedlog/class/blockedlog.class.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/htdocs/blockedlog/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php index a69c839f369..6aef85b4333 100644 --- a/htdocs/blockedlog/class/blockedlog.class.php +++ b/htdocs/blockedlog/class/blockedlog.class.php @@ -320,6 +320,15 @@ class BlockedLog } else { $this->error++; } + } elseif ($this->element === 'project') { + require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; + + $object = new Project($this->db); + if ($object->fetch($this->fk_object) > 0) { + return $object->getNomUrl(1); + } else { + $this->error++; + } } elseif ($this->action == 'MODULE_SET') { return ''.$langs->trans("BlockedLogEnabled").''; } elseif ($this->action == 'MODULE_RESET') {