From 6abf682faa6dd79776392d34bda5933ee8856adf Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Mon, 14 Jan 2013 12:01:44 +0100 Subject: [PATCH] Multi-company compatibility with transverse mode for pdf models --- htdocs/core/lib/functions2.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index c06e037d6cd..69b02ffbbb4 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -1250,7 +1250,7 @@ function getListOfModels($db,$type,$maxfilenamelength=0) $sql = "SELECT nom as id, nom as lib, libelle as label, description as description"; $sql.= " FROM ".MAIN_DB_PREFIX."document_model"; $sql.= " WHERE type = '".$type."'"; - $sql.= " AND entity = ".$conf->entity; + $sql.= " AND entity IN (0,".(! empty($conf->multicompany->enabled) && ! empty($conf->multicompany->transverse_mode)?"1,":"").$conf->entity.")"; $resql = $db->query($sql); if ($resql)