Missing token and clean code (#31689)

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
Alexandre SPANGARO 2024-11-05 15:25:09 +01:00 committed by GitHub
parent 1b1e5979ed
commit 07f737cea4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -742,7 +742,7 @@ if ($resql) {
// Active
print '<td class="center" class="nowrap">';
if ($canbedisabled) {
print '<a href="'.$url.'action='.$acts[$obj->active].'">'.$actl[$obj->active].'</a>';
print '<a class="reposition" href="'.$url.'action='.$acts[$obj->active].'&token='.newToken().'">'.$actl[$obj->active].'</a>';
} else {
print $langs->trans("AlwaysActive");
}
@ -796,12 +796,8 @@ $db->close();
*/
function fieldListAccountingReport($fieldlist, $obj = null, $tabname = '', $context = '')
{
global $db;
global $form, $mysoc;
$formadmin = new FormAdmin($db);
$formcompany = new FormCompany($db);
foreach ($fieldlist as $field => $value) {
if ($fieldlist[$field] == 'country') {
print '<td>';