From ad07fdfd79a9bc7510eb958b71b9b6dc250d841d Mon Sep 17 00:00:00 2001 From: VESSILLER Date: Sun, 27 Nov 2022 01:06:40 +0100 Subject: [PATCH 1/2] FIX #22837 --- htdocs/core/class/html.formticket.class.php | 12 +++++++----- htdocs/ticket/card.php | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index 7d116fd692a..cea007f8e61 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; @@ -441,7 +443,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 9c1a7c709b7..1b3dd4c8e37 100644 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -700,7 +700,7 @@ if ($action == 'create' || $action == 'presend') { $formticket->withextrafields = 1; $formticket->param = array('origin' => GETPOST('origin'), 'originid' => GETPOST('originid')); - $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); From 1d7c550adb1d6c90a80535bdc17657bb794281ae Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 26 Dec 2022 16:09:05 +0100 Subject: [PATCH 2/2] Fix add BARCODE_INIT_MAX to solve timeout in barcode generation --- htdocs/barcode/codeinit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/barcode/codeinit.php b/htdocs/barcode/codeinit.php index 2293f7d9c27..f6977db8baf 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; /*