update code toward php8 compliance
This commit is contained in:
parent
236b86bdd3
commit
1b5465d7d0
@ -481,7 +481,7 @@ if (empty($reshook)) {
|
||||
$objectclass = 'Bookkeeping';
|
||||
$objectlabel = 'Bookkeeping';
|
||||
$permissiontoread = $user->hasRight('societe', 'lire');
|
||||
$permissiontodelete = $user->rights->societe->supprimer;
|
||||
$permissiontodelete = $user->hasRight('societe', 'supprimer');
|
||||
$permissiontoadd = $user->rights->societe->creer;
|
||||
$uploaddir = $conf->societe->dir_output;
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
|
||||
|
||||
@ -263,7 +263,7 @@ for ($i = 1; $i <= 4; $i++) {
|
||||
<a class="butAction" href="<?php echo $_SERVER["PHP_SELF"].'?socid='.$this->control->tpl['id'].'&action=edit&token='.newToken().'&canvas='.urlencode($canvas); ?>"><?php echo $langs->trans("Modify"); ?></a>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($user->rights->societe->supprimer) { ?>
|
||||
<?php if ($user->hasRight('societe', 'supprimer')) { ?>
|
||||
<?php if ($conf->use_javascript_ajax) { ?>
|
||||
<span id="action-delete" class="butActionDelete"><?php echo $langs->trans('Delete'); ?></span>
|
||||
<?php } else { ?>
|
||||
|
||||
@ -190,7 +190,7 @@ if ($this->control->tpl['action_delete']) {
|
||||
<a class="butAction" href="<?php echo $_SERVER["PHP_SELF"].'?socid='.$this->control->tpl['id'].'&action=edit&token='.newToken().'&canvas='.urlencode($canvas); ?>"><?php echo $langs->trans("Modify"); ?></a>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($user->rights->societe->supprimer) { ?>
|
||||
<?php if ($user->hasRight('societe', 'supprimer')) { ?>
|
||||
<?php if ($conf->use_javascript_ajax) { ?>
|
||||
<span id="action-delete" class="butActionDelete"><?php echo $langs->trans('Delete'); ?></span>
|
||||
<?php } else { ?>
|
||||
|
||||
@ -527,7 +527,7 @@ class Thirdparties extends DolibarrApi
|
||||
*/
|
||||
public function delete($id)
|
||||
{
|
||||
if (!DolibarrApiAccess::$user->rights->societe->supprimer) {
|
||||
if (!DolibarrApiAccess::$user->hasRight('societe', 'supprimer')) {
|
||||
throw new RestException(401);
|
||||
}
|
||||
$result = $this->company->fetch($id);
|
||||
|
||||
@ -162,7 +162,7 @@ if (empty($reshook)) {
|
||||
$objectclass = 'WebsiteAccount';
|
||||
$objectlabel = 'WebsiteAccount';
|
||||
$permissiontoread = $user->hasRight('societe', 'lire');
|
||||
$permissiontodelete = $user->rights->societe->supprimer;
|
||||
$permissiontodelete = $user->hasRight('societe', 'supprimer');
|
||||
$uploaddir = $conf->societe->multidir_output[$object->entity];
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user