Merge pull request #23985 from Hystepik/develop#3
Fix : php 8.0 warnings
This commit is contained in:
commit
e29ee5ff6e
@ -149,8 +149,10 @@ $reshook = $hookmanager->executeHooks('completeFieldsToSearchAll', $parameters,
|
|||||||
if ($reshook > 0) {
|
if ($reshook > 0) {
|
||||||
$fieldstosearchall = $hookmanager->resArray['fieldstosearchall'];
|
$fieldstosearchall = $hookmanager->resArray['fieldstosearchall'];
|
||||||
} elseif ($reshook == 0) {
|
} elseif ($reshook == 0) {
|
||||||
|
if (!empty($hookmanager->resArray['fieldstosearchall'])) {
|
||||||
$fieldstosearchall = array_merge($fieldstosearchall, $hookmanager->resArray['fieldstosearchall']);
|
$fieldstosearchall = array_merge($fieldstosearchall, $hookmanager->resArray['fieldstosearchall']);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$arrayfields = array(
|
$arrayfields = array(
|
||||||
'c.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1, 'position'=>10),
|
'c.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1, 'position'=>10),
|
||||||
|
|||||||
@ -1121,8 +1121,11 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '', $showuserl
|
|||||||
if ($search_note_private != '') {
|
if ($search_note_private != '') {
|
||||||
$param .= '&search_note_private='.urlencode($search_note_private);
|
$param .= '&search_note_private='.urlencode($search_note_private);
|
||||||
}
|
}
|
||||||
if ($search_birthday != '') {
|
if ($search_birthday_dtstart != '') {
|
||||||
$param .= '&search_birthday='.urlencode($search_birthday);
|
$param .= '&search_birthday_dtstart='.urlencode($search_birthday_dtstart);
|
||||||
|
}
|
||||||
|
if ($search_birthday_dtend != '') {
|
||||||
|
$param .= '&search_birthday_dtend='.urlencode($search_birthday_dtend);
|
||||||
}
|
}
|
||||||
if ($optioncss != '') {
|
if ($optioncss != '') {
|
||||||
$param .= '&optioncss='.urlencode($optioncss);
|
$param .= '&optioncss='.urlencode($optioncss);
|
||||||
@ -2233,10 +2236,10 @@ function addOtherFilterSQL(&$sql, $donetodo, $now, $filters)
|
|||||||
} elseif ($donetodo == 'done') {
|
} elseif ($donetodo == 'done') {
|
||||||
$sql .= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep <= '".$db->idate($now)."'))";
|
$sql .= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep <= '".$db->idate($now)."'))";
|
||||||
}
|
}
|
||||||
if (is_array($filters) && $filters['search_agenda_label']) {
|
if (is_array($filters) && !empty($filters['search_agenda_label'])) {
|
||||||
$sql .= natural_search('a.label', $filters['search_agenda_label']);
|
$sql .= natural_search('a.label', $filters['search_agenda_label']);
|
||||||
}
|
}
|
||||||
if (is_array($filters) && $filters['search_rowid']) {
|
if (is_array($filters) && !empty($filters['search_rowid'])) {
|
||||||
$sql .= natural_search('a.id', $filters['search_rowid'], 1);
|
$sql .= natural_search('a.id', $filters['search_rowid'], 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -108,7 +108,7 @@ if ($action == 'presend') {
|
|||||||
$fileparams = dol_most_recent_file($diroutput.'/'.$ref, preg_quote($ref, '/').'[^\-]+');
|
$fileparams = dol_most_recent_file($diroutput.'/'.$ref, preg_quote($ref, '/').'[^\-]+');
|
||||||
}
|
}
|
||||||
|
|
||||||
$file = $fileparams['fullname'];
|
$file = isset($fileparams['fullname'])?$fileparams['fullname']:null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2740,7 +2740,7 @@ class FactureFournisseur extends CommonInvoice
|
|||||||
$alreadypaid = $this->alreadypaid;
|
$alreadypaid = $this->alreadypaid;
|
||||||
}
|
}
|
||||||
|
|
||||||
$$datas['picto'] .= ' '.$this->getLibStatut(5, $alreadypaid);
|
$datas['picto'] .= ' '.$this->getLibStatut(5, $alreadypaid);
|
||||||
}
|
}
|
||||||
if ($moretitle) {
|
if ($moretitle) {
|
||||||
$datas['picto'] .= ' - '.$moretitle;
|
$datas['picto'] .= ' - '.$moretitle;
|
||||||
|
|||||||
@ -146,6 +146,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x'
|
|||||||
$includeproductswithoutdesiredqty = '';
|
$includeproductswithoutdesiredqty = '';
|
||||||
$draftorder = '';
|
$draftorder = '';
|
||||||
}
|
}
|
||||||
|
$draftchecked = "";
|
||||||
if ($draftorder == 'on') {
|
if ($draftorder == 'on') {
|
||||||
$draftchecked = "checked";
|
$draftchecked = "checked";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -52,6 +52,7 @@ $backtopagejsfields = GETPOST('backtopagejsfields', 'alpha');
|
|||||||
$cancel = GETPOST('cancel', 'alpha');
|
$cancel = GETPOST('cancel', 'alpha');
|
||||||
$confirm = GETPOST('confirm', 'aZ09');
|
$confirm = GETPOST('confirm', 'aZ09');
|
||||||
|
|
||||||
|
$dol_openinpopup = 0;
|
||||||
if (!empty($backtopagejsfields)) {
|
if (!empty($backtopagejsfields)) {
|
||||||
$tmpbacktopagejsfields = explode(':', $backtopagejsfields);
|
$tmpbacktopagejsfields = explode(':', $backtopagejsfields);
|
||||||
$dol_openinpopup = $tmpbacktopagejsfields[0];
|
$dol_openinpopup = $tmpbacktopagejsfields[0];
|
||||||
|
|||||||
@ -1408,7 +1408,7 @@ while ($i < $imaxinloop) {
|
|||||||
$object->opp_percent = $obj->opp_percent;
|
$object->opp_percent = $obj->opp_percent;
|
||||||
$object->opp_status = $obj->fk_opp_status;
|
$object->opp_status = $obj->fk_opp_status;
|
||||||
$object->opp_status_code = $obj->opp_status_code;
|
$object->opp_status_code = $obj->opp_status_code;
|
||||||
$object->opp_amount = $obj->opp_ammount;
|
$object->opp_amount = !empty($obj->opp_ammount) ? $obj->opp_ammount : "";
|
||||||
$object->opp_weighted_amount = $obj->opp_weighted_amount;
|
$object->opp_weighted_amount = $obj->opp_weighted_amount;
|
||||||
$object->budget_amount = $obj->budget_amount;
|
$object->budget_amount = $obj->budget_amount;
|
||||||
$object->usage_opportunity = $obj->usage_opportunity;
|
$object->usage_opportunity = $obj->usage_opportunity;
|
||||||
@ -1646,8 +1646,12 @@ while ($i < $imaxinloop) {
|
|||||||
//if ($obj->opp_status_code)
|
//if ($obj->opp_status_code)
|
||||||
if (strcmp($obj->opp_amount, '')) {
|
if (strcmp($obj->opp_amount, '')) {
|
||||||
print '<span class="amount">'.price($obj->opp_amount, 1, $langs, 1, -1, -1, '').'</span>';
|
print '<span class="amount">'.price($obj->opp_amount, 1, $langs, 1, -1, -1, '').'</span>';
|
||||||
|
if (!isset($totalarray['val']['p.opp_amount'])) {
|
||||||
|
$totalarray['val']['p.opp_amount'] = $obj->opp_amount;
|
||||||
|
} else {
|
||||||
$totalarray['val']['p.opp_amount'] += $obj->opp_amount;
|
$totalarray['val']['p.opp_amount'] += $obj->opp_amount;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
@ -1690,8 +1694,12 @@ while ($i < $imaxinloop) {
|
|||||||
print '<td class="right">';
|
print '<td class="right">';
|
||||||
if ($obj->budget_amount != '') {
|
if ($obj->budget_amount != '') {
|
||||||
print '<span class="amount">'.price($obj->budget_amount, 1, $langs, 1, -1, -1).'</span>';
|
print '<span class="amount">'.price($obj->budget_amount, 1, $langs, 1, -1, -1).'</span>';
|
||||||
|
if (!isset($totalarray['val']['p.budget_amount'])) {
|
||||||
|
$totalarray['val']['p.budget_amount'] = $obj->budget_amount;
|
||||||
|
} else {
|
||||||
$totalarray['val']['p.budget_amount'] += $obj->budget_amount;
|
$totalarray['val']['p.budget_amount'] += $obj->budget_amount;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
|
|||||||
@ -770,7 +770,7 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third
|
|||||||
if (is_array($contactsofproject) && count($contactsofproject)) {
|
if (is_array($contactsofproject) && count($contactsofproject)) {
|
||||||
print $form->select_dolusers($user->id, 'userid', 0, '', 0, '', $contactsofproject, 0, 0, 0, '', 0, '', 'maxwidth300');
|
print $form->select_dolusers($user->id, 'userid', 0, '', 0, '', $contactsofproject, 0, 0, 0, '', 0, '', 'maxwidth300');
|
||||||
} else {
|
} else {
|
||||||
if ($projectid > 0 || $object->id > 0) {
|
if ((isset($projectid) && $projectid > 0) || $object->id > 0) {
|
||||||
print '<span class="opacitymedium">'.$langs->trans("NoUserAssignedToTheProject").'</span>';
|
print '<span class="opacitymedium">'.$langs->trans("NoUserAssignedToTheProject").'</span>';
|
||||||
} else {
|
} else {
|
||||||
print $form->select_dolusers($user->id, 'userid', 0, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
|
print $form->select_dolusers($user->id, 'userid', 0, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
|
||||||
@ -805,6 +805,7 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third
|
|||||||
// WYSIWYG editor
|
// WYSIWYG editor
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||||
$cked_enabled = (!empty($conf->global->FCKEDITOR_ENABLE_SOCIETE) ? $conf->global->FCKEDITOR_ENABLE_SOCIETE : 0);
|
$cked_enabled = (!empty($conf->global->FCKEDITOR_ENABLE_SOCIETE) ? $conf->global->FCKEDITOR_ENABLE_SOCIETE : 0);
|
||||||
|
$nbrows = 0;
|
||||||
if (!empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) {
|
if (!empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) {
|
||||||
$nbrows = $conf->global->MAIN_INPUT_DESC_HEIGHT;
|
$nbrows = $conf->global->MAIN_INPUT_DESC_HEIGHT;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user