Update target_card.php

This commit is contained in:
UT from dolibit 2022-09-01 19:27:27 +02:00 committed by GitHub
parent a865388b9c
commit 78eab1a8e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,6 +21,8 @@
* \brief Page to create/edit/view target * \brief Page to create/edit/view target
*/ */
// Load Dolibarr environment
require '../main.inc.php'; require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
@ -29,7 +31,7 @@ dol_include_once('/webhook/class/target.class.php');
dol_include_once('/webhook/lib/webhook_target.lib.php'); dol_include_once('/webhook/lib/webhook_target.lib.php');
// Load translation files required by the page // Load translation files required by the page
$langs->loadLangs(array("webhook@webhook", "other")); $langs->loadLangs(array('webhook', 'other'));
// Get parameters // Get parameters
$id = GETPOST('id', 'int'); $id = GETPOST('id', 'int');
@ -69,6 +71,7 @@ if (empty($action) && empty($id) && empty($ref)) {
// Load object // Load object
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once. include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
// Permissions
// There is several ways to check permission. // There is several ways to check permission.
// Set $enablepermissioncheck to 1 to enable a minimum low level of checks // Set $enablepermissioncheck to 1 to enable a minimum low level of checks
$enablepermissioncheck = 0; $enablepermissioncheck = 0;