update code toward php8 compliance
This commit is contained in:
parent
1bacb20a87
commit
b411ec8b59
@ -51,7 +51,7 @@ if ($result > 0) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$permissionnote = $user->rights->adherent->creer; // Used by the include of actions_setnotes.inc.php
|
$permissionnote = $user->hasRight('adherent', 'creer'); // Used by the include of actions_setnotes.inc.php
|
||||||
|
|
||||||
// Fetch object
|
// Fetch object
|
||||||
if ($id > 0 || !empty($ref)) {
|
if ($id > 0 || !empty($ref)) {
|
||||||
@ -71,10 +71,10 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Define variables to determine what the current user can do on the members
|
// Define variables to determine what the current user can do on the members
|
||||||
$canaddmember = $user->rights->adherent->creer;
|
$canaddmember = $user->hasRight('adherent', 'creer');
|
||||||
// Define variables to determine what the current user can do on the properties of a member
|
// Define variables to determine what the current user can do on the properties of a member
|
||||||
if ($id) {
|
if ($id) {
|
||||||
$caneditfieldmember = $user->rights->adherent->creer;
|
$caneditfieldmember = $user->hasRight('adherent', 'creer');
|
||||||
}
|
}
|
||||||
|
|
||||||
$hookmanager->initHooks(array('membernote'));
|
$hookmanager->initHooks(array('membernote'));
|
||||||
@ -155,7 +155,7 @@ if ($id) {
|
|||||||
|
|
||||||
|
|
||||||
$cssclass = 'titlefield';
|
$cssclass = 'titlefield';
|
||||||
$permission = $user->rights->adherent->creer; // Used by the include of notes.tpl.php
|
$permission = $user->hasRight('adherent', 'creer'); // Used by the include of notes.tpl.php
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -112,10 +112,10 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Define variables to determine what the current user can do on the members
|
// Define variables to determine what the current user can do on the members
|
||||||
$canaddmember = $user->rights->adherent->creer;
|
$canaddmember = $user->hasRight('adherent', 'creer');
|
||||||
// Define variables to determine what the current user can do on the properties of a member
|
// Define variables to determine what the current user can do on the properties of a member
|
||||||
if ($id) {
|
if ($id) {
|
||||||
$caneditfieldmember = $user->rights->adherent->creer;
|
$caneditfieldmember = $user->hasRight('adherent', 'creer');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
@ -594,7 +594,7 @@ if ($rowid > 0) {
|
|||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||||
print $langs->trans("LinkedToDolibarrThirdParty");
|
print $langs->trans("LinkedToDolibarrThirdParty");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if ($action != 'editthirdparty' && $user->rights->adherent->creer) {
|
if ($action != 'editthirdparty' && $user->hasRight('adherent', 'creer')) {
|
||||||
print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editthirdparty&token='.newToken().'&rowid='.$object->id.'">'.img_edit($langs->trans('SetLinkToThirdParty'), 1).'</a></td>';
|
print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editthirdparty&token='.newToken().'&rowid='.$object->id.'">'.img_edit($langs->trans('SetLinkToThirdParty'), 1).'</a></td>';
|
||||||
}
|
}
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
@ -636,7 +636,7 @@ if ($rowid > 0) {
|
|||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||||
print $langs->trans("LinkedToDolibarrUser");
|
print $langs->trans("LinkedToDolibarrUser");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if ($action != 'editlogin' && $user->rights->adherent->creer) {
|
if ($action != 'editlogin' && $user->hasRight('adherent', 'creer')) {
|
||||||
print '<td class="right">';
|
print '<td class="right">';
|
||||||
if ($user->rights->user->user->creer) {
|
if ($user->rights->user->user->creer) {
|
||||||
print '<a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editlogin&token='.newToken().'&rowid='.$object->id.'">'.img_edit($langs->trans('SetLinkToUser'), 1).'</a>';
|
print '<a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editlogin&token='.newToken().'&rowid='.$object->id.'">'.img_edit($langs->trans('SetLinkToUser'), 1).'</a>';
|
||||||
|
|||||||
@ -753,7 +753,7 @@ if ($rowid > 0) {
|
|||||||
|
|
||||||
// Actions
|
// Actions
|
||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
if ($user->rights->adherent->creer) {
|
if ($user->hasRight('adherent', 'creer')) {
|
||||||
print '<a class="editfielda marginleftonly" href="card.php?rowid='.$objp->rowid.'&action=edit&token='.newToken().'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?rowid='.$object->id).'">'.img_edit().'</a>';
|
print '<a class="editfielda marginleftonly" href="card.php?rowid='.$objp->rowid.'&action=edit&token='.newToken().'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?rowid='.$object->id).'">'.img_edit().'</a>';
|
||||||
}
|
}
|
||||||
if ($user->rights->adherent->supprimer) {
|
if ($user->rights->adherent->supprimer) {
|
||||||
|
|||||||
@ -53,10 +53,10 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Define variables to determine what the current user can do on the members
|
// Define variables to determine what the current user can do on the members
|
||||||
$canaddmember = $user->rights->adherent->creer;
|
$canaddmember = $user->hasRight('adherent', 'creer');
|
||||||
// Define variables to determine what the current user can do on the properties of a member
|
// Define variables to determine what the current user can do on the properties of a member
|
||||||
if ($id) {
|
if ($id) {
|
||||||
$caneditfieldmember = $user->rights->adherent->creer;
|
$caneditfieldmember = $user->hasRight('adherent', 'creer');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user