Merge pull request #22030 from dolibit-ut/patch-502
Update target_contact.php
This commit is contained in:
commit
51394d703a
@ -16,11 +16,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file target_contact.php
|
* \file htdocs/webhook/target_contact.php
|
||||||
* \ingroup webhook
|
* \ingroup webhook
|
||||||
* \brief Tab for contacts linked to Target
|
* \brief Tab for contacts linked to Target
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||||
@ -28,7 +30,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", "companies", "other", "mails"));
|
$langs->loadLangs(array('webhook', 'companies', 'other', 'mails'));
|
||||||
|
|
||||||
$id = (GETPOST('id') ?GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility
|
$id = (GETPOST('id') ?GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility
|
||||||
$ref = GETPOST('ref', 'alpha');
|
$ref = GETPOST('ref', 'alpha');
|
||||||
@ -41,12 +43,14 @@ $object = new Target($db);
|
|||||||
$extrafields = new ExtraFields($db);
|
$extrafields = new ExtraFields($db);
|
||||||
$diroutputmassaction = $conf->webhook->dir_output.'/temp/massgeneration/'.$user->id;
|
$diroutputmassaction = $conf->webhook->dir_output.'/temp/massgeneration/'.$user->id;
|
||||||
$hookmanager->initHooks(array('targetcontact', 'globalcard')); // Note that conf->hooks_modules contains array
|
$hookmanager->initHooks(array('targetcontact', 'globalcard')); // Note that conf->hooks_modules contains array
|
||||||
|
|
||||||
// Fetch optionals attributes and labels
|
// Fetch optionals attributes and labels
|
||||||
$extrafields->fetch_name_optionals_label($object->table_element);
|
$extrafields->fetch_name_optionals_label($object->table_element);
|
||||||
|
|
||||||
// Load object
|
// Load object
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
|
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
|
||||||
|
|
||||||
|
// 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;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user