update code for PHP8 compliance
This commit is contained in:
parent
d9dcecb6be
commit
6298dc2f0d
@ -52,8 +52,8 @@ $confirm = GETPOST('confirm', 'alpha');
|
|||||||
|
|
||||||
$chartofaccounts = GETPOST('chartofaccounts', 'int');
|
$chartofaccounts = GETPOST('chartofaccounts', 'int');
|
||||||
|
|
||||||
$permissiontoadd = !empty($user->rights->accounting->chartofaccount);
|
$permissiontoadd = $user->hasRight('accounting', 'chartofaccount');
|
||||||
$permissiontodelete = !empty($user->rights->accounting->chartofaccount);
|
$permissiontodelete = $user->hasRight('accounting', 'chartofaccount');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->socid > 0) {
|
if ($user->socid > 0) {
|
||||||
@ -294,7 +294,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// List of mass actions available
|
// List of mass actions available
|
||||||
if ($user->rights->accounting->chartofaccount) {
|
if ($user->hasRight('accounting', 'chartofaccount')) {
|
||||||
$arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete");
|
$arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete");
|
||||||
}
|
}
|
||||||
if (in_array($massaction, array('presend', 'predelete', 'closed'))) {
|
if (in_array($massaction, array('presend', 'predelete', 'closed'))) {
|
||||||
@ -590,7 +590,7 @@ if ($resql) {
|
|||||||
|
|
||||||
// Action
|
// Action
|
||||||
print '<td class="center nowraponall">';
|
print '<td class="center nowraponall">';
|
||||||
if ($user->rights->accounting->chartofaccount) {
|
if ($user->hasRight('accounting', 'chartofaccount')) {
|
||||||
print '<a class="editfielda" href="./card.php?action=update&token='.newToken().'&id='.$obj->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?'.$param).'">';
|
print '<a class="editfielda" href="./card.php?action=update&token='.newToken().'&id='.$obj->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?'.$param).'">';
|
||||||
print img_edit();
|
print img_edit();
|
||||||
print '</a>';
|
print '</a>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user