浏览代码

Merge pull request #27101 from cfoellmann/19/PR/blockedlog-project

NEW add data type 'project' to blockedlog
Laurent Destailleur 1 年之前
父节点
当前提交
41ccd47cbe
共有 1 个文件被更改,包括 9 次插入0 次删除
  1. 9 0
      htdocs/blockedlog/class/blockedlog.class.php

+ 9 - 0
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 '<i class="opacitymedium">'.$langs->trans("BlockedLogEnabled").'</i>';
 		} elseif ($this->action == 'MODULE_RESET') {