From 9cf67c4d5f63a2434238809ac5f6af64cc49cb4a Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Thu, 30 Aug 2018 01:13:06 +0200 Subject: [PATCH] fix multicompany in public ticket page --- htdocs/public/ticket/index.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htdocs/public/ticket/index.php b/htdocs/public/ticket/index.php index bb0499f43e6..0c68302278b 100644 --- a/htdocs/public/ticket/index.php +++ b/htdocs/public/ticket/index.php @@ -25,6 +25,12 @@ if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); if (!defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) +// For MultiCompany module. +// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php +// TODO This should be useless. Because entity must be retreive from object ref and not from url. +$entity=(! empty($_GET['entity']) ? (int) $_GET['entity'] : (! empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); +if (is_numeric($entity)) define("DOLENTITY", $entity); + require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/ticket/class/actions_ticket.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formticket.class.php';