Skip to content

Commit

Permalink
Fix duplicate load
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Aug 24, 2018
1 parent a153b2f commit 79aa0bb
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions htdocs/modulebuilder/template/myobject_card.php
Expand Up @@ -80,7 +80,7 @@
$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
Expand All @@ -98,9 +98,6 @@
//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

Expand Down

0 comments on commit 79aa0bb

Please sign in to comment.