Fix : bad call of extrafields into categories
This commit is contained in:
parent
afaf5698a5
commit
b2b8fbb227
@ -31,9 +31,6 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
|||||||
|
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
|
|
||||||
$extrafields = new ExtraFields($db);
|
|
||||||
$extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
|
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid=GETPOST('socid','int');
|
$socid=GETPOST('socid','int');
|
||||||
if (!$user->rights->categorie->lire) accessforbidden();
|
if (!$user->rights->categorie->lire) accessforbidden();
|
||||||
@ -64,6 +61,9 @@ if ($catorigin && $type == 0) $idCatOrigin = $catorigin;
|
|||||||
|
|
||||||
$object = new Categorie($db);
|
$object = new Categorie($db);
|
||||||
|
|
||||||
|
$extrafields = new ExtraFields($db);
|
||||||
|
$extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
@ -244,7 +244,7 @@ if ($user->rights->categorie->creer)
|
|||||||
print '<tr><td>'.$langs->trans("AddIn").'</td><td>';
|
print '<tr><td>'.$langs->trans("AddIn").'</td><td>';
|
||||||
print $form->select_all_categories($type, $catorigin);
|
print $form->select_all_categories($type, $catorigin);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||||
if (empty($reshook))
|
if (empty($reshook))
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user