mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
FIX: unitialised var (#29728)
* FIX: unitialised var is never initialised if reshook) for tabContentCreateOrder * Update card.php Changed initialisation value --------- Co-authored-by: Benjamin Falière <benjamin.faliere@altairis.fr>
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2022 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2023 Benjamin Falière <benjamin.faliere@altairis.fr>
|
||||
* Copyright (C) 2023-2024 Benjamin Falière <benjamin.faliere@altairis.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -2878,8 +2878,6 @@ if ($action == 'create' && $usercancreate) {
|
||||
$object->printObjectLines($action, $mysoc, $soc, $lineid, 1);
|
||||
}
|
||||
|
||||
$numlines = count($object->lines);
|
||||
|
||||
/*
|
||||
* Form to add new line
|
||||
*/
|
||||
@@ -2919,6 +2917,8 @@ if ($action == 'create' && $usercancreate) {
|
||||
// Note that $action and $object may be modified by hook
|
||||
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action);
|
||||
if (empty($reshook)) {
|
||||
$numlines = count($object->lines);
|
||||
|
||||
// Reopen a closed order
|
||||
if (($object->statut == Commande::STATUS_CLOSED || $object->statut == Commande::STATUS_CANCELED) && $usercancreate) {
|
||||
print dolGetButtonAction('', $langs->trans('ReOpen'), 'default', $_SERVER["PHP_SELF"].'?action=reopen&token='.newToken().'&id='.$object->id, '');
|
||||
|
||||
Reference in New Issue
Block a user