FIX WIP avoid warning with php 8.0
This commit is contained in:
parent
4a8e72c997
commit
6e0832fb38
@ -83,7 +83,7 @@ class box_commandes extends ModeleBoxes
|
||||
$societestatic = new Societe($this->db);
|
||||
$userstatic = new User($this->db);
|
||||
|
||||
$this->info_box_head = array('text' => $langs->trans("BoxTitleLast".($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE ? "" : "Modified")."CustomerOrders", $max));
|
||||
$this->info_box_head = array('text' => $langs->trans("BoxTitleLast".(!empty($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE) ? "" : "Modified")."CustomerOrders", $max));
|
||||
|
||||
if ($user->rights->commande->lire)
|
||||
{
|
||||
@ -108,7 +108,7 @@ class box_commandes extends ModeleBoxes
|
||||
if (!empty($conf->global->ORDER_BOX_LAST_ORDERS_VALIDATED_ONLY)) $sql .= " AND c.fk_statut = 1";
|
||||
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
|
||||
if ($user->socid) $sql .= " AND s.rowid = ".$user->socid;
|
||||
if ($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE) $sql .= " ORDER BY c.date_commande DESC, c.ref DESC ";
|
||||
if (!empty($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE)) $sql .= " ORDER BY c.date_commande DESC, c.ref DESC ";
|
||||
else $sql .= " ORDER BY c.tms DESC, c.ref DESC ";
|
||||
$sql .= $this->db->plimit($max, 0);
|
||||
|
||||
|
||||
@ -92,7 +92,7 @@ class box_contracts extends ModeleBoxes
|
||||
$sql .= " AND c.entity = ".$conf->entity;
|
||||
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
|
||||
if ($user->socid) $sql .= " AND s.rowid = ".$user->socid;
|
||||
if ($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE) $sql .= " ORDER BY c.date_contrat DESC, c.ref DESC ";
|
||||
if (! empty($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE)) $sql .= " ORDER BY c.date_contrat DESC, c.ref DESC ";
|
||||
else $sql .= " ORDER BY c.tms DESC, c.ref DESC ";
|
||||
$sql .= $this->db->plimit($max, 0);
|
||||
|
||||
|
||||
@ -81,7 +81,7 @@ class box_factures extends ModeleBoxes
|
||||
|
||||
$langs->load("bills");
|
||||
|
||||
$text = $langs->trans("BoxTitleLast".($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE ? "" : "Modified")."CustomerBills", $max);
|
||||
$text = $langs->trans("BoxTitleLast".(!empty($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE) ? "" : "Modified")."CustomerBills", $max);
|
||||
$this->info_box_head = array(
|
||||
'text' => $text,
|
||||
'limit'=> dol_strlen($text)
|
||||
@ -106,7 +106,7 @@ class box_factures extends ModeleBoxes
|
||||
$sql .= " AND f.entity IN (".getEntity('invoice').")";
|
||||
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
|
||||
if ($user->socid) $sql .= " AND s.rowid = ".$user->socid;
|
||||
if ($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE) $sql .= " ORDER BY f.datef DESC, f.ref DESC ";
|
||||
if (!empty($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE)) $sql .= " ORDER BY f.datef DESC, f.ref DESC ";
|
||||
else $sql .= " ORDER BY f.tms DESC, f.ref DESC ";
|
||||
$sql .= $this->db->plimit($max, 0);
|
||||
|
||||
|
||||
@ -81,7 +81,7 @@ class box_factures_fourn extends ModeleBoxes
|
||||
$thirdpartystatic = new Fournisseur($this->db);
|
||||
|
||||
$this->info_box_head = array(
|
||||
'text' => $langs->trans("BoxTitleLast".($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE ? "" : "Modified")."SupplierBills", $max)
|
||||
'text' => $langs->trans("BoxTitleLast".(!empty($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE) ? "" : "Modified")."SupplierBills", $max)
|
||||
);
|
||||
|
||||
if ($user->rights->fournisseur->facture->lire)
|
||||
@ -104,7 +104,7 @@ class box_factures_fourn extends ModeleBoxes
|
||||
$sql .= " AND f.entity = ".$conf->entity;
|
||||
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
|
||||
if ($user->socid) $sql .= " AND s.rowid = ".$user->socid;
|
||||
if ($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE) $sql .= " ORDER BY f.datef DESC, f.ref DESC ";
|
||||
if (!empty($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE)) $sql .= " ORDER BY f.datef DESC, f.ref DESC ";
|
||||
else $sql .= " ORDER BY f.tms DESC, f.ref DESC ";
|
||||
$sql .= $this->db->plimit($max, 0);
|
||||
|
||||
|
||||
@ -112,10 +112,10 @@ class box_graph_invoices_permonth extends ModeleBoxes
|
||||
$shownb = GETPOST($param_shownb, 'alpha');
|
||||
$showtot = GETPOST($param_showtot, 'alpha');
|
||||
} else {
|
||||
$tmparray = json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode], true);
|
||||
$endyear = $tmparray['year'];
|
||||
$shownb = $tmparray['shownb'];
|
||||
$showtot = $tmparray['showtot'];
|
||||
$tmparray = (!empty($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode]) ? json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode], true) : array());
|
||||
$endyear = (!empty($tmparray['year']) ? $tmparray['year'] : '');
|
||||
$shownb = (!empty($tmparray['shownb']) ? $tmparray['shownb'] : '');
|
||||
$showtot = (!empty($tmparray['showtot']) ? $tmparray['showtot'] : '');
|
||||
}
|
||||
if (empty($shownb) && empty($showtot)) { $shownb = 1; $showtot = 1; }
|
||||
$nowarray = dol_getdate(dol_now(), true);
|
||||
|
||||
@ -109,13 +109,14 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes
|
||||
$shownb = GETPOST($param_shownb, 'alpha');
|
||||
$showtot = GETPOST($param_showtot, 'alpha');
|
||||
} else {
|
||||
$tmparray = json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode], true);
|
||||
$endyear = $tmparray['year'];
|
||||
$shownb = $tmparray['shownb'];
|
||||
$showtot = $tmparray['showtot'];
|
||||
$tmparray = (!empty($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode]) ? json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode], true) : array());
|
||||
$endyear = (!empty($tmparray['year']) ? $tmparray['year'] : '');
|
||||
$shownb = (!empty($tmparray['shownb']) ? $tmparray['shownb'] : '');
|
||||
$showtot = (!empty($tmparray['showtot']) ? $tmparray['showtot'] : '');
|
||||
}
|
||||
if (empty($shownb) && empty($showtot)) { $shownb = 1; $showtot = 1; }
|
||||
$nowarray = dol_getdate(dol_now(), true);
|
||||
if (empty($year)) $year = $nowarray['year'];
|
||||
if (empty($endyear)) $endyear = $nowarray['year'];
|
||||
$startyear = $endyear - 1;
|
||||
$mode = 'supplier';
|
||||
|
||||
@ -112,10 +112,10 @@ class box_graph_orders_permonth extends ModeleBoxes
|
||||
$shownb = GETPOST($param_shownb, 'alpha');
|
||||
$showtot = GETPOST($param_showtot, 'alpha');
|
||||
} else {
|
||||
$tmparray = json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode], true);
|
||||
$endyear = $tmparray['year'];
|
||||
$shownb = $tmparray['shownb'];
|
||||
$showtot = $tmparray['showtot'];
|
||||
$tmparray = (!empty($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode]) ? json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode], true) : array());
|
||||
$endyear = (!empty($tmparray['year']) ? $tmparray['year'] : '');
|
||||
$shownb = (!empty($tmparray['shownb']) ? $tmparray['shownb'] : '');
|
||||
$showtot = (!empty($tmparray['showtot']) ? $tmparray['showtot'] : '');
|
||||
}
|
||||
if (empty($shownb) && empty($showtot)) { $shownb = 1; $showtot = 1; }
|
||||
$nowarray = dol_getdate(dol_now(), true);
|
||||
|
||||
@ -111,10 +111,10 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes
|
||||
$shownb = GETPOST($param_shownb, 'alpha');
|
||||
$showtot = GETPOST($param_showtot, 'alpha');
|
||||
} else {
|
||||
$tmparray = json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode], true);
|
||||
$endyear = $tmparray['year'];
|
||||
$shownb = $tmparray['shownb'];
|
||||
$showtot = $tmparray['showtot'];
|
||||
$tmparray = (!empty($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode]) ? json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode], true) : array());
|
||||
$endyear = (!empty($tmparray['year']) ? $tmparray['year'] : '');
|
||||
$shownb = (!empty($tmparray['shownb']) ? $tmparray['shownb'] : '');
|
||||
$showtot = (!empty($tmparray['showtot']) ? $tmparray['showtot'] : '');
|
||||
}
|
||||
if (empty($shownb) && empty($showtot)) { $shownb = 1; $showtot = 1; }
|
||||
$nowarray = dol_getdate(dol_now(), true);
|
||||
|
||||
@ -95,11 +95,11 @@ class box_graph_product_distribution extends ModeleBoxes
|
||||
$showpropalnb = GETPOST($param_showpropalnb, 'alpha');
|
||||
$showordernb = GETPOST($param_showordernb, 'alpha');
|
||||
} else {
|
||||
$tmparray = json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode], true);
|
||||
$year = $tmparray['year'];
|
||||
$showinvoicenb = $tmparray['showinvoicenb'];
|
||||
$showpropalnb = $tmparray['showpropalnb'];
|
||||
$showordernb = $tmparray['showordernb'];
|
||||
$tmparray = (!empty($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode]) ? json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode], true) : array());
|
||||
$year = (!empty($tmparray['year']) ? $tmparray['year'] : '');
|
||||
$showinvoicenb = (!empty($tmparray['showinvoicenb']) ? $tmparray['showinvoicenb'] : '');
|
||||
$showpropalnb = (!empty($tmparray['showpropalnb']) ? $tmparray['showpropalnb'] : '');
|
||||
$showordernb = (!empty($tmparray['showordernb']) ? $tmparray['showordernb'] : '');
|
||||
}
|
||||
if (empty($showinvoicenb) && empty($showpropalnb) && empty($showordernb)) { $showpropalnb = 1; $showinvoicenb = 1; $showordernb = 1; }
|
||||
if (empty($conf->facture->enabled) || empty($user->rights->facture->lire)) $showinvoicenb = 0;
|
||||
|
||||
@ -112,10 +112,10 @@ class box_graph_propales_permonth extends ModeleBoxes
|
||||
$shownb = GETPOST($param_shownb, 'alpha');
|
||||
$showtot = GETPOST($param_showtot, 'alpha');
|
||||
} else {
|
||||
$tmparray = json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode], true);
|
||||
$endyear = $tmparray['year'];
|
||||
$shownb = $tmparray['shownb'];
|
||||
$showtot = $tmparray['showtot'];
|
||||
$tmparray = (!empty($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode]) ? json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode], true) : array());
|
||||
$endyear = (!empty($tmparray['year']) ? $tmparray['year'] : '');
|
||||
$shownb = (!empty($tmparray['shownb']) ? $tmparray['shownb'] : '');
|
||||
$showtot = (!empty($tmparray['showtot']) ? $tmparray['showtot'] : '');
|
||||
}
|
||||
if (empty($shownb) && empty($showtot)) { $shownb = 1; $showtot = 1; }
|
||||
$nowarray = dol_getdate(dol_now(), true);
|
||||
@ -176,8 +176,10 @@ class box_graph_propales_permonth extends ModeleBoxes
|
||||
//$datatype2 = array('lines','bars');
|
||||
|
||||
$filenamenb = $dir."/".$prefix."propalsamountinyear-".$endyear.".png";
|
||||
if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstats&file=propalsamountinyear-'.$endyear.'.png';
|
||||
if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstatssupplier&file=propalsamountinyear-'.$endyear.'.png';
|
||||
if (!empty($mode)) {
|
||||
if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstats&file=propalsamountinyear-'.$endyear.'.png';
|
||||
if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstatssupplier&file=propalsamountinyear-'.$endyear.'.png';
|
||||
}
|
||||
|
||||
$px2 = new DolGraph();
|
||||
$mesg = $px2->isGraphKo();
|
||||
|
||||
@ -64,7 +64,7 @@ class box_produits_alerte_stock extends ModeleBoxes
|
||||
$this->db = $db;
|
||||
|
||||
$listofmodulesforexternal = explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL);
|
||||
$tmpentry = array('enabled'=>((!empty($conf->product->enabled) || !empty($conf->service->enabled)) && !empty($conf->stock->enabled)), 'perms'=>($user->rights->stock->lire), 'module'=>'product|service|stock');
|
||||
$tmpentry = array('enabled'=>((!empty($conf->product->enabled) || !empty($conf->service->enabled)) && !empty($conf->stock->enabled)), 'perms'=>!empty($user->rights->stock->lire), 'module'=>'product|service|stock');
|
||||
$showmode = isVisibleToUserType(($user->socid > 0 ? 1 : 0), $tmpentry, $listofmodulesforexternal);
|
||||
$this->hidden = ($showmode != 1);
|
||||
}
|
||||
|
||||
@ -81,7 +81,7 @@ class box_propales extends ModeleBoxes
|
||||
$propalstatic = new Propal($this->db);
|
||||
$societestatic = new Societe($this->db);
|
||||
|
||||
$this->info_box_head = array('text' => $langs->trans("BoxTitleLast".($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE ? "" : "Modified")."Propals", $max));
|
||||
$this->info_box_head = array('text' => $langs->trans("BoxTitleLast".(!empty($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE) ? "" : "Modified")."Propals", $max));
|
||||
|
||||
if ($user->rights->propale->lire)
|
||||
{
|
||||
@ -96,7 +96,7 @@ class box_propales extends ModeleBoxes
|
||||
$sql .= " AND p.entity IN (".getEntity('propal').")";
|
||||
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
|
||||
if ($user->socid) $sql .= " AND s.rowid = ".$user->socid;
|
||||
if ($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE) $sql .= " ORDER BY p.datep DESC, p.ref DESC ";
|
||||
if (!empty($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE)) $sql .= " ORDER BY p.datep DESC, p.ref DESC ";
|
||||
else $sql .= " ORDER BY p.tms DESC, p.ref DESC ";
|
||||
$sql .= $this->db->plimit($max, 0);
|
||||
|
||||
|
||||
@ -79,7 +79,7 @@ class box_supplier_orders extends ModeleBoxes
|
||||
include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
|
||||
$thirdpartystatic = new Fournisseur($this->db);
|
||||
|
||||
$this->info_box_head = array('text' => $langs->trans("BoxTitleLatest".($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE ? "" : "Modified")."SupplierOrders", $max));
|
||||
$this->info_box_head = array('text' => $langs->trans("BoxTitleLatest".(!empty($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE) ? "" : "Modified")."SupplierOrders", $max));
|
||||
|
||||
if ($user->rights->fournisseur->commande->lire)
|
||||
{
|
||||
@ -98,7 +98,7 @@ class box_supplier_orders extends ModeleBoxes
|
||||
$sql .= " AND c.entity IN (".getEntity('supplier_order').")";
|
||||
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
|
||||
if ($user->socid) $sql .= " AND s.rowid = ".$user->socid;
|
||||
if ($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE) $sql .= " ORDER BY c.date_commande DESC, c.ref DESC ";
|
||||
if (!empty($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE)) $sql .= " ORDER BY c.date_commande DESC, c.ref DESC ";
|
||||
else $sql .= " ORDER BY c.tms DESC, c.ref DESC ";
|
||||
$sql .= $this->db->plimit($max, 0);
|
||||
|
||||
|
||||
@ -964,7 +964,7 @@ class DolGraph
|
||||
$array_of_ykeys = array_keys($valarray);
|
||||
$alabelexists = 1;
|
||||
$tmpykey = explode('_', ($array_of_ykeys[$i + ($alabelexists ? 1 : 0)]), 3);
|
||||
if (!empty($tmpykey[2]) || $tmpykey[2] == '0') { // This is a 'Group by' array
|
||||
if (isset($tmpykey[2]) && (!empty($tmpykey[2]) || $tmpykey[2] == '0')) { // This is a 'Group by' array
|
||||
$tmpvalue = (array_key_exists('y_' . $tmpykey[1] . '_' . $tmpykey[2], $valarray) ? $valarray['y_' . $tmpykey[1] . '_' . $tmpykey[2]] : $valarray[$i + 1]);
|
||||
$values[$x] = (is_numeric($tmpvalue) ? $tmpvalue : null);
|
||||
$arrayofgroupslegend[$i] = array(
|
||||
@ -1203,7 +1203,7 @@ class DolGraph
|
||||
$foundnegativecolor = 0;
|
||||
$usecolorvariantforgroupby = 0;
|
||||
// We used a 'group by' and we have too many colors so we generated color variants per
|
||||
if (is_array($arrayofgroupslegend[$i]) && count($arrayofgroupslegend[$i]) > 0) { // If we used a group by.
|
||||
if (!empty($arrayofgroupslegend) && is_array($arrayofgroupslegend[$i]) && count($arrayofgroupslegend[$i]) > 0) { // If we used a group by.
|
||||
$nbofcolorneeds = count($arrayofgroupslegend);
|
||||
$nbofcolorsavailable = count($theme_datacolor);
|
||||
if ($nbofcolorneeds > $nbofcolorsavailable) {
|
||||
@ -1278,7 +1278,7 @@ class DolGraph
|
||||
$this->stringtoshow .= '{';
|
||||
$this->stringtoshow .= 'dolibarrinfo: \'y_' . $i . '\', ';
|
||||
$this->stringtoshow .= 'label: \'' . dol_escape_js(dol_string_nohtmltag($textoflegend)) . '\', ';
|
||||
$this->stringtoshow .= 'pointStyle: \'' . ($this->type[$i] == 'linesnopoint' ? 'line' : 'circle') . '\', ';
|
||||
$this->stringtoshow .= 'pointStyle: \'' . ((!empty($this->type[$i]) && $this->type[$i] == 'linesnopoint') ? 'line' : 'circle') . '\', ';
|
||||
$this->stringtoshow .= 'fill: ' . ($type == 'bar' ? 'true' : 'false') . ', ';
|
||||
if ($isfunnel) {
|
||||
$this->stringtoshow .= 'borderWidth: \'2\', ';
|
||||
@ -1287,7 +1287,7 @@ class DolGraph
|
||||
}
|
||||
$this->stringtoshow .= 'borderColor: \'' . $bordercolor . '\', ';
|
||||
$this->stringtoshow .= 'backgroundColor: \'' . $color . '\', ';
|
||||
if ($arrayofgroupslegend[$i]) $this->stringtoshow .= 'stack: \'' . $arrayofgroupslegend[$i]['stacknum'] . '\', ';
|
||||
if (!empty($arrayofgroupslegend) && !empty($arrayofgroupslegend[$i])) $this->stringtoshow .= 'stack: \'' . $arrayofgroupslegend[$i]['stacknum'] . '\', ';
|
||||
$this->stringtoshow .='data: [';
|
||||
if ($isfunnel) {
|
||||
$this->stringtoshow .= '['.-$serie[$i].','.$serie[$i].']';
|
||||
|
||||
@ -206,9 +206,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout =
|
||||
$menu_arr[] = array(
|
||||
'name' => 'Projet',
|
||||
'link' => '/projet/index.php?mainmenu=project&leftmenu=',
|
||||
'title' => (empty($conf->global->PROJECT_USE_OPPORTUNITIES) || $conf->global->PROJECT_USE_OPPORTUNITIES == 2)
|
||||
? (($conf->global->PROJECT_USE_OPPORTUNITIES == 2) ? "Leads" : "Projects")
|
||||
: "Projects",
|
||||
'title' => (! empty($conf->global->PROJECT_USE_OPPORTUNITIES) && $conf->global->PROJECT_USE_OPPORTUNITIES == 2 ? "Leads" : "Projects"),
|
||||
'level' => 0,
|
||||
'enabled' => $showmode = isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal),
|
||||
'target' => $atarget,
|
||||
@ -743,11 +741,11 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
||||
$newmenu->add("/admin/pdf.php?mainmenu=home", $langs->trans("PDF"), 1);
|
||||
|
||||
$warnpicto = '';
|
||||
if ($conf->global->MAIN_MAIL_SENDMODE == 'mail' && empty($conf->global->MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP)) {
|
||||
if (!empty($conf->global->MAIN_MAIL_SENDMODE) && $conf->global->MAIN_MAIL_SENDMODE == 'mail' && empty($conf->global->MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP)) {
|
||||
$langs->load("errors");
|
||||
$warnpicto = img_warning($langs->trans("WarningPHPMailD"));
|
||||
}
|
||||
if (in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmail')) && empty($conf->global->MAIN_MAIL_SMTP_SERVER)) {
|
||||
if (!empty($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmail')) && empty($conf->global->MAIN_MAIL_SMTP_SERVER)) {
|
||||
$langs->load("errors");
|
||||
$warnpicto = img_warning($langs->trans("ErrorSetupOfEmailsNotComplete"));
|
||||
}
|
||||
|
||||
@ -312,7 +312,7 @@ if (empty($user->socid) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS))
|
||||
$boxstatItem .= '<a href="'.$links[$val].'" class="boxstatsindicator thumbstat nobold nounderline">';
|
||||
$boxstatItem .= '<div class="boxstats">';
|
||||
$boxstatItem .= '<span class="boxstatstext" title="'.dol_escape_htmltag($text).'">'.$text.'</span><br>';
|
||||
$boxstatItem .= '<span class="boxstatsindicator">'.img_object("", $board->picto, 'class="inline-block"').' '.($board->nb[$val] ? $board->nb[$val] : 0).'</span>';
|
||||
$boxstatItem .= '<span class="boxstatsindicator">'.img_object("", $board->picto, 'class="inline-block"').' '.(!empty($board->nb[$val]) ? $board->nb[$val] : 0).'</span>';
|
||||
$boxstatItem .= '</div>';
|
||||
$boxstatItem .= '</a>';
|
||||
|
||||
@ -675,7 +675,7 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
|
||||
// get key index of stats used in $includes, $classes, $keys, $icons, $titres, $links
|
||||
$keyIndex = array_search($globalStatsKey, $keys);
|
||||
|
||||
$classe = $classes[$keyIndex];
|
||||
$classe = (!empty($classes[$keyIndex]) ? $classes[$keyIndex] : '');
|
||||
if (isset($boardloaded[$classe]) && is_object($boardloaded[$classe]))
|
||||
{
|
||||
$groupElement['globalStats']['total'] = $boardloaded[$classe]->nb[$globalStatsKey] ? $boardloaded[$classe]->nb[$globalStatsKey] : 0;
|
||||
@ -762,7 +762,7 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
|
||||
}
|
||||
|
||||
if ($showweather && !empty($isIntopOpenedDashBoard)) {
|
||||
$appendClass = $conf->global->MAIN_DISABLE_METEO == 2 ? ' hideonsmartphone' : '';
|
||||
$appendClass = (!empty($conf->global->MAIN_DISABLE_METEO) && $conf->global->MAIN_DISABLE_METEO == 2 ? ' hideonsmartphone' : '');
|
||||
$weather = getWeatherStatus($totallate);
|
||||
|
||||
$text = '';
|
||||
@ -889,7 +889,7 @@ print '<div class="fichecenter fichecenterbis">';
|
||||
* Show widgets (boxes)
|
||||
*/
|
||||
|
||||
$boxlist .= '<div class="twocolumns">';
|
||||
$boxlist = '<div class="twocolumns">';
|
||||
|
||||
$boxlist .= '<div class="firstcolumn fichehalfleft boxhalfleft" id="boxhalfleft">';
|
||||
if (!empty($nbworkboardcount))
|
||||
@ -914,7 +914,7 @@ if (empty($user->socid) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS))
|
||||
}
|
||||
|
||||
if (!empty($boxstatFromHook) || !empty($boxstatItems)) {
|
||||
$boxstat .= '<!-- Database statistics -->'."\n";
|
||||
$boxstat = '<!-- Database statistics -->'."\n";
|
||||
$boxstat .= '<div class="box">';
|
||||
$boxstat .= '<table summary="'.dol_escape_htmltag($langs->trans("DolibarrStateBoard")).'" class="noborder boxtable boxtablenobottom nohover widgetstats" width="100%">';
|
||||
$boxstat .= '<tr class="liste_titre box_titre">';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user