mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
fix php8 warnings
This commit is contained in:
@@ -142,7 +142,7 @@ if ($modulepart == 'produit' || $modulepart == 'product' || $modulepart == 'serv
|
||||
if ($result <= 0) {
|
||||
dol_print_error($db, 'Failed to load object');
|
||||
}
|
||||
$dir = $conf->project->multidir_output[$object->entity]; // By default
|
||||
$dir = $conf->projet->multidir_output[$object->entity]; // By default
|
||||
}
|
||||
} elseif ($modulepart == 'propal') {
|
||||
require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||
|
||||
@@ -99,7 +99,7 @@ if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||
$data1 = array(array(0=>$langs->trans("None"), 1=>1));
|
||||
}
|
||||
|
||||
$filenamenb = $conf->project->dir_output."/stats/projectbystatus.png";
|
||||
$filenamenb = $conf->projet->dir_output."/stats/projectbystatus.png";
|
||||
$fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=projectstats&file=projectbystatus.png';
|
||||
$px = new DolGraph();
|
||||
$mesg = $px->isGraphKo();
|
||||
@@ -150,7 +150,7 @@ if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||
$data = $stats_project->getNbByMonthWithPrevYear($endyear, $startyear);
|
||||
//var_dump($data);
|
||||
|
||||
$filenamenb = $conf->project->dir_output."/stats/projectnbprevyear-".$year.".png";
|
||||
$filenamenb = $conf->projet->dir_output."/stats/projectnbprevyear-".$year.".png";
|
||||
$fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=projectstats&file=projectnbprevyear-'.$year.'.png';
|
||||
|
||||
$px1 = new DolGraph();
|
||||
@@ -182,7 +182,7 @@ if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) {
|
||||
//var_dump($data);
|
||||
// $data = array(array('Lib',val1,val2,val3),...)
|
||||
|
||||
$filenamenb = $conf->project->dir_output."/stats/projectamountprevyear-".$year.".png";
|
||||
$filenamenb = $conf->projet->dir_output."/stats/projectamountprevyear-".$year.".png";
|
||||
$fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=projectstats&file=projectamountprevyear-'.$year.'.png';
|
||||
|
||||
$px2 = new DolGraph();
|
||||
@@ -217,14 +217,15 @@ if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) {
|
||||
//var_dump($data);
|
||||
// $data = array(array('Lib',val1,val2,val3),...)
|
||||
|
||||
$filenamenb = $conf->project->dir_output."/stats/projecttransrateprevyear-".$year.".png";
|
||||
$filenamenb = $conf->projet->dir_output."/stats/projecttransrateprevyear-".$year.".png";
|
||||
$fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=projectstats&file=projecttransrateprevyear-'.$year.'.png';
|
||||
|
||||
$px3 = new DolGraph();
|
||||
$mesg = $px3->isGraphKo();
|
||||
if (!$mesg) {
|
||||
$px3->SetData($data);
|
||||
$i = $startyear; $legend = array();
|
||||
$i = $startyear;
|
||||
$legend = array();
|
||||
while ($i <= $endyear) {
|
||||
$legend[] = $i;
|
||||
$i++;
|
||||
@@ -268,7 +269,7 @@ $head[$h][1] = $langs->trans("ByMonthYear");
|
||||
$head[$h][2] = 'byyear';
|
||||
$h++;
|
||||
|
||||
complete_head_from_modules($conf, $langs, null, $head, $h, $type);
|
||||
complete_head_from_modules($conf, $langs, null, $head, $h, 'projet_stats');
|
||||
|
||||
print dol_get_fiche_head($head, 'byyear', $langs->trans("Statistics"), -1, '');
|
||||
|
||||
@@ -337,9 +338,9 @@ foreach ($data_all_year as $val) {
|
||||
print '<td class="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.($socid > 0 ? '&socid='.$socid : '').($userid > 0 ? '&userid='.$userid : '').'">'.$year.'</a></td>';
|
||||
print '<td class="right">'.$val['nb'].'</td>';
|
||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) {
|
||||
print '<td class="right">'.($val['total'] ?price(price2num($val['total'], 'MT'), 1) : '0').'</td>';
|
||||
print '<td class="right">'.($val['avg'] ?price(price2num($val['avg'], 'MT'), 1) : '0').'</td>';
|
||||
print '<td class="right">'.($val['weighted'] ?price(price2num($val['weighted'], 'MT'), 1) : '0').'</td>';
|
||||
print '<td class="right">'.($val['total'] ? price(price2num($val['total'], 'MT'), 1) : '0').'</td>';
|
||||
print '<td class="right">'.($val['avg'] ? price(price2num($val['avg'], 'MT'), 1) : '0').'</td>';
|
||||
print '<td class="right">'.(isset($val['weighted']) ? price(price2num($val['weighted'], 'MT'), 1) : '0').'</td>';
|
||||
}
|
||||
print '</tr>';
|
||||
$oldyear = $year;
|
||||
@@ -350,7 +351,7 @@ print '</div>';
|
||||
|
||||
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||
|
||||
$stringtoshow .= '<table class="border centpercent"><tr class="pair nohover"><td class="center">';
|
||||
$stringtoshow = '<table class="border centpercent"><tr class="pair nohover"><td class="center">';
|
||||
if ($mesg) {
|
||||
print $mesg;
|
||||
} else {
|
||||
|
||||
@@ -90,7 +90,7 @@ if (!empty($year)) {
|
||||
$data = $stats_tasks->getNbByMonthWithPrevYear($endyear, $startyear);
|
||||
//var_dump($data);
|
||||
|
||||
$filenamenb = $conf->project->dir_output."/stats/tasknbprevyear-".$year.".png";
|
||||
$filenamenb = $conf->projet->dir_output."/stats/tasknbprevyear-".$year.".png";
|
||||
$fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=taskstats&file=tasknbprevyear-'.$year.'.png';
|
||||
|
||||
$px1 = new DolGraph();
|
||||
@@ -134,12 +134,12 @@ if (!count($arrayyears)) {
|
||||
|
||||
$h = 0;
|
||||
$head = array();
|
||||
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/stats/index.php?mode='.$mode;
|
||||
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/stats/index.php?';
|
||||
$head[$h][1] = $langs->trans("ByMonthYear");
|
||||
$head[$h][2] = 'byyear';
|
||||
$h++;
|
||||
|
||||
complete_head_from_modules($conf, $langs, null, $head, $h, $type);
|
||||
complete_head_from_modules($conf, $langs, null, $head, $h, 'projet_tasks_stats');
|
||||
|
||||
print dol_get_fiche_head($head, 'byyear', $langs->trans("Statistics"), -1, '');
|
||||
|
||||
@@ -191,13 +191,13 @@ foreach ($data_all_year as $val) {
|
||||
$oldyear--;
|
||||
|
||||
print '<tr class="oddeven" height="24">';
|
||||
print '<td><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.'&mode='.$mode.($socid > 0 ? '&socid='.$socid : '').($userid > 0 ? '&userid='.$userid : '').'">'.$oldyear.'</a></td>';
|
||||
print '<td><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.($socid > 0 ? '&socid='.$socid : '').($userid > 0 ? '&userid='.$userid : '').'">'.$oldyear.'</a></td>';
|
||||
print '<td class="right">0</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
print '<tr class="oddeven" height="24">';
|
||||
print '<td><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&mode='.$mode.($socid > 0 ? '&socid='.$socid : '').($userid > 0 ? '&userid='.$userid : '').'">'.$year.'</a></td>';
|
||||
print '<td><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.($socid > 0 ? '&socid='.$socid : '').($userid > 0 ? '&userid='.$userid : '').'">'.$year.'</a></td>';
|
||||
print '<td class="right">'.$val['nb'].'</td>';
|
||||
print '</tr>';
|
||||
$oldyear = $year;
|
||||
@@ -208,7 +208,7 @@ print '</div>';
|
||||
|
||||
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||
|
||||
$stringtoshow .= '<table class="border centpercent"><tr class="pair nohover"><td class="center">';
|
||||
$stringtoshow = '<table class="border centpercent"><tr class="pair nohover"><td class="center">';
|
||||
if ($mesg) {
|
||||
print $mesg;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user