Fix : php 8.0 warnings
This commit is contained in:
parent
fb0250d777
commit
f497f4d6e9
@ -275,9 +275,8 @@ class Paiement extends CommonObject
|
||||
return -1;
|
||||
}
|
||||
if (empty($currencyofpayment)) {
|
||||
$currencyofpayment = $this->multicurrency_code[$key];
|
||||
}
|
||||
if ($currencyofpayment != $this->multicurrency_code[$key]) {
|
||||
$currencyofpayment = isset($this->multicurrency_code[$key]) ? $this->multicurrency_code[$key] : "";
|
||||
} else if ($currencyofpayment != $this->multicurrency_code[$key]) {
|
||||
// If we have invoices with different currencies in the payment, we stop here
|
||||
$this->error = 'ErrorYouTryToPayInvoicesWithDifferentCurrenciesInSamePayment';
|
||||
return -1;
|
||||
|
||||
@ -47,7 +47,8 @@ $cancel = GETPOST('cancel', 'aZ09');
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'conferenceorboothattendeecard'; // To manage different context of search
|
||||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
|
||||
//$lineid = GETPOST('lineid', 'int');
|
||||
$lineid = GETPOST('lineid', 'int');
|
||||
$mode = GETPOST('mode', 'alpha');
|
||||
|
||||
$conf_or_booth_id = GETPOST('conforboothid', 'int');
|
||||
$fk_project = GETPOST('fk_project', 'int');
|
||||
@ -233,7 +234,7 @@ if (!empty($withproject)) {
|
||||
// Title
|
||||
$morehtmlref .= $projectstatic->title;
|
||||
// Thirdparty
|
||||
if ($projectstatic->thirdparty->id > 0) {
|
||||
if (!empty($projectstatic->thirdparty->id) && $projectstatic->thirdparty->id > 0) {
|
||||
$morehtmlref .= '<br>'.$projectstatic->thirdparty->getNomUrl(1, 'project');
|
||||
}
|
||||
$morehtmlref .= '</div>';
|
||||
@ -384,7 +385,7 @@ if (!empty($withproject)) {
|
||||
//print '</span>';
|
||||
print '</td><td>';
|
||||
$linksuggest = $dolibarr_main_url_root.'/public/project/index.php?id='.$projectstatic->id;
|
||||
$encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$projectstatic->id, 'md5');
|
||||
$encodedsecurekey = dol_hash(getDolGlobalString("EVENTORGANIZATION_SECUREKEY").'conferenceorbooth'.$projectstatic->id, 'md5');
|
||||
$linksuggest .= '&securekey='.urlencode($encodedsecurekey);
|
||||
//print '<div class="urllink">';
|
||||
//print '<input type="text" value="'.$linksuggest.'" id="linkregister" class="quatrevingtpercent paddingrightonly">';
|
||||
@ -401,7 +402,7 @@ if (!empty($withproject)) {
|
||||
//print '</span>';
|
||||
print '</td><td>';
|
||||
$link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_new.php?id='.$projectstatic->id.'&type=global';
|
||||
$encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$projectstatic->id, 'md5');
|
||||
$encodedsecurekey = dol_hash(getDolGlobalString("EVENTORGANIZATION_SECUREKEY").'conferenceorbooth'.$projectstatic->id, 'md5');
|
||||
$link_subscription .= '&securekey='.urlencode($encodedsecurekey);
|
||||
//print '<div class="urllink">';
|
||||
//print '<input type="text" value="'.$linkregister.'" id="linkregister" class="quatrevingtpercent paddingrightonly">';
|
||||
@ -563,7 +564,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
|
||||
// Object card
|
||||
// ------------------------------------------------------------
|
||||
$linkback = '<a href="'.dol_buildpath('/eventorganization/conferenceorboothattendee_list.php', 1).'?restore_lastsearch_values=1'.($confOrBooth->id > 0 ? '&conforboothid='.((int) $confOrBooth->id) : '').$moreparam.'">'.$langs->trans("BackToList").'</a>';
|
||||
$linkback = '<a href="'.dol_buildpath('/eventorganization/conferenceorboothattendee_list.php', 1).'?restore_lastsearch_values=1'.(!empty($confOrBooth->id) && $confOrBooth->id > 0 ? '&conforboothid='.((int) $confOrBooth->id) : '').$moreparam.'">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
$morehtmlref = '<div class="refidno">';
|
||||
|
||||
@ -610,7 +611,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
print dolGetButtonAction('', $langs->trans('Modify'), 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.(!empty($confOrBooth->id)?'&conforboothid='.$confOrBooth->id:'').(!empty($projectstatic->id)?'&fk_project='.$projectstatic->id:'').'&action=edit&token='.newToken(), '', $permissiontoadd);
|
||||
|
||||
// Clone
|
||||
print dolGetButtonAction('', $langs->trans('ToClone'), 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$object->socid.'&action=clone&token='.newToken().(!empty($projectstatic->id)?'&fk_project='.$projectstatic->id:''), '', $permissiontoadd);
|
||||
print dolGetButtonAction('', $langs->trans('ToClone'), 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=clone&token='.newToken().(!empty($projectstatic->id)?'&fk_project='.$projectstatic->id:''), '', $permissiontoadd);
|
||||
|
||||
// Delete (need delete permission, or if draft, just need create/modify permission)
|
||||
print dolGetButtonAction('', $langs->trans('Delete'), 'delete', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=delete&token='.newToken().(!empty($projectstatic->id)?'&fk_project='.$projectstatic->id:''), '', $permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd));
|
||||
|
||||
@ -57,6 +57,7 @@ $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selec
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'conferenceorboothattendeelist'; // To manage different context of search
|
||||
$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
|
||||
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
|
||||
$mode = GETPOST('mode', 'alpha');
|
||||
|
||||
$id = GETPOST('id', 'int');
|
||||
$conf_or_booth_id = GETPOST('conforboothid', 'int');
|
||||
@ -239,11 +240,6 @@ $now = dol_now();
|
||||
|
||||
//$help_url="EN:Module_ConferenceOrBoothAttendee|FR:Module_ConferenceOrBoothAttendee_FR|ES:Módulo_ConferenceOrBoothAttendee";
|
||||
$help_url = '';
|
||||
if ($confOrBooth->id > 0) {
|
||||
$title = $langs->trans('ListOfAttendeesPerConference');
|
||||
} else {
|
||||
$title = $langs->trans('ListOfAttendeesOfEvent');
|
||||
}
|
||||
$morejs = array();
|
||||
$morecss = array();
|
||||
|
||||
@ -377,7 +373,11 @@ if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
if ($confOrBooth->id > 0) {
|
||||
$title = $langs->trans('ListOfAttendeesPerConference');
|
||||
} else {
|
||||
$title = $langs->trans('ListOfAttendeesOfEvent');
|
||||
}
|
||||
|
||||
llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'classforhorizontalscrolloftabs');
|
||||
|
||||
@ -412,7 +412,7 @@ if ($projectstatic->id > 0 || $confOrBooth > 0) {
|
||||
// Title
|
||||
$morehtmlref .= $projectstatic->title;
|
||||
// Thirdparty
|
||||
if ($projectstatic->thirdparty->id > 0) {
|
||||
if (!empty($projectstatic->thirdparty->id) && $projectstatic->thirdparty->id > 0) {
|
||||
$morehtmlref .= '<br>'.$projectstatic->thirdparty->getNomUrl(1, 'project');
|
||||
}
|
||||
$morehtmlref .= '</div>';
|
||||
@ -591,7 +591,7 @@ if ($projectstatic->id > 0 || $confOrBooth > 0) {
|
||||
//print '</span>';
|
||||
print '</td><td>';
|
||||
$linksuggest = $dolibarr_main_url_root.'/public/project/index.php?id='.$projectstatic->id;
|
||||
$encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$projectstatic->id, 'md5');
|
||||
$encodedsecurekey = dol_hash(getDolUserString("EVENTORGANIZATION_SECUREKEYEVENTORGANIZATION_SECUREKEY").'conferenceorbooth'.$projectstatic->id, 'md5');
|
||||
$linksuggest .= '&securekey='.urlencode($encodedsecurekey);
|
||||
//print '<div class="urllink">';
|
||||
//print '<input type="text" value="'.$linksuggest.'" id="linkregister" class="quatrevingtpercent paddingrightonly">';
|
||||
@ -608,7 +608,7 @@ if ($projectstatic->id > 0 || $confOrBooth > 0) {
|
||||
//print '</span>';
|
||||
print '</td><td>';
|
||||
$link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_new.php?id='.$projectstatic->id.'&type=global';
|
||||
$encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$projectstatic->id, 'md5');
|
||||
$encodedsecurekey = dol_hash(getDolUserString("EVENTORGANIZATION_SECUREKEY").'conferenceorbooth'.$projectstatic->id, 'md5');
|
||||
$link_subscription .= '&securekey='.urlencode($encodedsecurekey);
|
||||
//print '<div class="urllink">';
|
||||
//print '<input type="text" value="'.$linkregister.'" id="linkregister" class="quatrevingtpercent paddingrightonly">';
|
||||
@ -630,7 +630,7 @@ if ($projectstatic->id > 0 || $confOrBooth > 0) {
|
||||
if (empty($confOrBooth->id)) {
|
||||
$head = conferenceorboothProjectPrepareHead($projectstatic);
|
||||
$tab = 'attendees';
|
||||
print dol_get_fiche_head($head, $tab, $langs->trans("Project"), -1, ($project->public ? 'projectpub' : 'project'), 0, '', 'reposition');
|
||||
print dol_get_fiche_head($head, $tab, $langs->trans("Project"), -1, (!empty($project->public) ? 'projectpub' : 'project'), 0, '', 'reposition');
|
||||
}
|
||||
}
|
||||
|
||||
@ -797,11 +797,11 @@ foreach ($object->fields as $key => $val) {
|
||||
if (!empty($arrayfields['t.'.$key]['checked'])) {
|
||||
print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'">';
|
||||
if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) {
|
||||
print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1);
|
||||
print $form->selectarray('search_'.$key, $val['arrayofkeyval'], (isset($search[$key]) ? $search[$key] : ''), $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1);
|
||||
} elseif ((strpos($val['type'], 'integer:') === 0) || (strpos($val['type'], 'sellist:')=== 0)) {
|
||||
print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth125', 1);
|
||||
print $object->showInputField($val, $key, (isset($search[$key]) ? $search[$key] : ''), '', '', 'search_', 'maxwidth125', 1);
|
||||
} elseif (!preg_match('/^(date|timestamp|datetime)/', $val['type'])) {
|
||||
print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'">';
|
||||
print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.(isset($search[$key]) ? dol_escape_htmltag($search[$key]) : "").'">';
|
||||
} elseif (preg_match('/^(date|timestamp|datetime)/', $val['type'])) {
|
||||
print '<div class="nowrap">';
|
||||
print $form->selectDate($search[$key.'_dtstart'] ? $search[$key.'_dtstart'] : '', "search_".$key."_dtstart", 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
|
||||
@ -872,6 +872,7 @@ if (isset($extrafields->attributes[$object->table_element]['computed']) && is_ar
|
||||
// --------------------------------------------------------------------
|
||||
$i = 0;
|
||||
$totalarray = array();
|
||||
$totalarray['nbfield'] = 0;
|
||||
while ($i < ($limit ? min($num, $limit) : $num)) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
if (empty($obj)) {
|
||||
@ -880,7 +881,6 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
|
||||
|
||||
// Store properties in $object
|
||||
$object->setVarsFromFetchObj($obj);
|
||||
|
||||
// Show here line of result
|
||||
print '<tr class="oddeven">';
|
||||
foreach ($object->fields as $key => $val) {
|
||||
|
||||
@ -793,7 +793,7 @@ foreach ($listofreferent as $key => $value) {
|
||||
for ($i = 0; $i < $num; $i++) {
|
||||
$tmp = explode('_', $elementarray[$i]);
|
||||
$idofelement = $tmp[0];
|
||||
$idofelementuser = $tmp[1];
|
||||
$idofelementuser = !empty($tmp[1]) ? $tmp[1] : "";
|
||||
|
||||
$element->fetch($idofelement);
|
||||
if ($idofelementuser) {
|
||||
|
||||
@ -46,6 +46,7 @@ $taskref = GETPOST("taskref", 'alpha'); // task ref
|
||||
$withproject = GETPOST('withproject', 'int');
|
||||
$project_ref = GETPOST('project_ref', 'alpha');
|
||||
$planned_workload = ((GETPOST('planned_workloadhour', 'int') != '' || GETPOST('planned_workloadmin', 'int') != '') ? (GETPOST('planned_workloadhour', 'int') > 0 ?GETPOST('planned_workloadhour', 'int') * 3600 : 0) + (GETPOST('planned_workloadmin', 'int') > 0 ?GETPOST('planned_workloadmin', 'int') * 60 : 0) : '');
|
||||
$mode = GETPOST('mode', 'alpha');
|
||||
|
||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||
$hookmanager->initHooks(array('projecttaskcard', 'globalcard'));
|
||||
|
||||
@ -45,6 +45,7 @@ $mode = GETPOST('mode', 'aZ');
|
||||
|
||||
$search_all = trim((GETPOST('search_all', 'alphanohtml') != '') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'));
|
||||
$search_group = GETPOST('search_group');
|
||||
$search = array();
|
||||
|
||||
// Load variable for pagination
|
||||
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user