From e512f1082fe0a46f1d4cacf2aa946d5c3bc6b0d0 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Thu, 30 Aug 2018 02:33:22 +0200 Subject: [PATCH] Fix multicompany we can need to use multicompany with evry modulepart ex. newpayment.php, ticket, onlinesign... --- htdocs/viewimage.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/viewimage.php b/htdocs/viewimage.php index 45cbcd1c6a5..dbe76ae49c4 100644 --- a/htdocs/viewimage.php +++ b/htdocs/viewimage.php @@ -56,11 +56,12 @@ if ((isset($_GET["modulepart"]) && $_GET["modulepart"] == 'medias')) if (! defined("NOLOGIN")) define("NOLOGIN",1); if (! defined("NOCSRFCHECK")) define("NOCSRFCHECK",1); // We accept to go on this page from external web site. if (! defined("NOIPCHECK")) define("NOIPCHECK",1); // Do not check IP defined into conf $dolibarr_main_restrict_ip - // For multicompany - $entity=(! empty($_GET['entity']) ? (int) $_GET['entity'] : (! empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); - if (is_numeric($entity)) define("DOLENTITY", $entity); } +// For multicompany +$entity=(! empty($_GET['entity']) ? (int) $_GET['entity'] : (! empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); +if (is_numeric($entity)) define("DOLENTITY", $entity); + /** * Header empty *