From 79aa0bbd1c3f067b6950929444d44724b4eafa2b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 24 Aug 2018 12:28:44 +0200 Subject: [PATCH] Fix duplicate load --- htdocs/modulebuilder/template/myobject_card.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/htdocs/modulebuilder/template/myobject_card.php b/htdocs/modulebuilder/template/myobject_card.php index 78a9070eefd..6c6324e6e8d 100644 --- a/htdocs/modulebuilder/template/myobject_card.php +++ b/htdocs/modulebuilder/template/myobject_card.php @@ -80,7 +80,7 @@ $extrafields = new ExtraFields($db); $diroutputmassaction=$conf->mymodule->dir_output . '/temp/massgeneration/'.$user->id; $hookmanager->initHooks(array('myobjectcard','globalcard')); // Note that conf->hooks_modules contains array // Fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label('myobject'); +$extralabels = $extrafields->fetch_name_optionals_label($object->table_element); $search_array_options=$extrafields->getOptionalsFromPost($extralabels,'','search_'); // Initialize array of search criterias @@ -98,9 +98,6 @@ if (empty($action) && empty($id) && empty($ref)) $action='view'; //if ($user->societe_id > 0) $socid = $user->societe_id; //$result = restrictedArea($user, 'mymodule', $id); -// fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label($object->table_element); - // 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