Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions htdocs/knowledgemanagement/knowledgerecord_card.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<?php
/* Copyright (C) 2017-2021 Laurent Destailleur <[email protected]>
* Copyright (C) 2024-2025 MDW <[email protected]>
* Copyright (C) 2024-2025 MDW <[email protected]>
* Copyright (C) 2024-2025 Frédéric France <[email protected]>
* Copyright (C) 2024 Pierre Ardoin <[email protected]>
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -90,7 +92,13 @@
$permissiontovalidate = ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $permissiontoadd) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('knowledgemanagement', 'knowledgerecord_advance', 'validate')));
$permissionnote = $user->hasRight('knowledgemanagement', 'knowledgerecord', 'write'); // Used by the include of actions_setnotes.inc.php
$permissiondellink = $user->hasRight('knowledgemanagement', 'knowledgerecord', 'write'); // Used by the include of actions_dellink.inc.php
$upload_dir = $conf->knowledgemanagement->multidir_output[isset($object->entity) ? $object->entity : 1];
// Ensure upload directory is defined for current entity
// S'assurer que le répertoire de téléversement est défini pour l'entité courante
$entityForUpload = isset($object->entity) ? $object->entity : $conf->entity;
if (empty($conf->knowledgemanagement->multidir_output[$entityForUpload])) {

Check failure on line 98 in htdocs/knowledgemanagement/knowledgerecord_card.php

View workflow job for this annotation

GitHub Actions / pre-commit / pre-commit

Line indented incorrectly; expected 0 tabs, found 1
$entityForUpload = $conf->entity;
}

Check failure on line 100 in htdocs/knowledgemanagement/knowledgerecord_card.php

View workflow job for this annotation

GitHub Actions / pre-commit / pre-commit

Line indented incorrectly; expected 0 tabs, found 1
$upload_dir = !empty($conf->knowledgemanagement->multidir_output[$entityForUpload]) ? $conf->knowledgemanagement->multidir_output[$entityForUpload] : $conf->knowledgemanagement->dir_output;

Check failure on line 101 in htdocs/knowledgemanagement/knowledgerecord_card.php

View workflow job for this annotation

GitHub Actions / phan / Run phan

PhanTypeMismatchDimFetchNullable When fetching an array index from a value of type non-empty-associative-array<int,string>, found an array index of type ?int, but expected the index to be of the non-nullable type int

// Security check - Protection if external user
//if ($user->socid > 0) accessforbidden();
Expand Down
Loading