fix box_dolibarr_state_board.php

63f1e44493
This commit is contained in:
Frédéric FRANCE 2024-01-18 18:07:55 +01:00 committed by GitHub
parent 7fcd0f9d2d
commit b83bc3db1e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2,7 +2,7 @@
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2015-2021 Frederic France <frederic.france@netlogic.fr>
* Copyright (C) 2015-2024 Frederic France <frederic.france@netlogic.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
@ -253,7 +253,13 @@ class box_dolibarr_state_board extends ModeleBoxes
include_once $includes[$val]; // Loading a class cost around 1Mb
$board = new $class($this->db);
$board->load_state_board();
if (method_exists($board, 'load_state_board')) {
$board->load_state_board();
} elseif (method_exists($board, 'loadStateBoard')) {
$board->loadStateBoard();
} else {
$board = -1;
}
$boardloaded[$class] = $board;
} else {
$board = $boardloaded[$classkeyforcache];