diff --git a/htdocs/barcode/codeinit.php b/htdocs/barcode/codeinit.php index 610b3e70d8c..c76f6404b6b 100644 --- a/htdocs/barcode/codeinit.php +++ b/htdocs/barcode/codeinit.php @@ -44,7 +44,7 @@ $thirdpartytmp = new Societe($db); $modBarCodeProduct = ''; -$maxperinit = 1000; +$maxperinit = empty($conf->global->BARCODE_INIT_MAX) ? 1000 : $conf->global->BARCODE_INIT_MAX; /* diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index 6866bfa8356..ea180372cc1 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -127,12 +127,14 @@ class FormTicket /** * Show the form to input ticket * - * @param int $withdolfichehead With dol_get_fiche_head() and dol_get_fiche_end() - * @param string $mode Mode ('create' or 'edit') - * @param int $public 1=If we show the form for the public interface + * @param int $withdolfichehead With dol_get_fiche_head() and dol_get_fiche_end() + * @param string $mode Mode ('create' or 'edit') + * @param int $public 1=If we show the form for the public interface + * @param Contact|null $with_contact [=NULL] Contact to link to this ticket if exists + * @param string $action [=''] Action in card * @return void */ - public function showForm($withdolfichehead = 0, $mode = 'edit', $public = 0) + public function showForm($withdolfichehead = 0, $mode = 'edit', $public = 0, Contact $with_contact = null, $action = '') { global $conf, $langs, $user, $hookmanager; @@ -520,7 +522,7 @@ class FormTicket // Other attributes $parameters = array(); - $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $ticketstat, $this->action); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $ticketstat, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) { print $ticketstat->showOptionals($extrafields, 'create'); } diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index 7decdeadd7b..8d8dd2a3d58 100644 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -751,7 +751,7 @@ if ($action == 'create' || $action == 'presend') { $formticket->withcancel = 1; - $formticket->showForm(1, 'create', 0); + $formticket->showForm(1, 'create', 0, null, $action); /*} elseif ($action == 'edit' && $user->rights->ticket->write && $object->fk_statut < Ticket::STATUS_CLOSED) { $formticket = new FormTicket($db);