diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 170b400b2a0..cf512d5f173 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -8550,7 +8550,7 @@ class Form $tmpvalue = $value['label']; $tmpcolor = $value['color']; $tmppicto = $value['picto']; - $tmplabelhtml = $value['labelhtml']; + $tmplabelhtml = !empty($value['labelhtml']) ? $value['labelhtml'] : ''; } $newval = ($translate ? $langs->trans($tmpvalue) : $tmpvalue); $newval = ($key_in_label ? $tmpkey . ' - ' . $newval : $newval); diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 29b8a15564d..e2e10a8de48 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -1380,7 +1380,7 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '', $showuserl // Birthday if (!empty($arrayfields['t.birthday']['checked'])) { print ''; - print dol_print_date($obj->birthday); + print dol_print_date($db->jdate($obj->birthday)); print ''; } diff --git a/htdocs/expedition/stats/index.php b/htdocs/expedition/stats/index.php index 9213e2ca849..c14d8c6d3b2 100644 --- a/htdocs/expedition/stats/index.php +++ b/htdocs/expedition/stats/index.php @@ -65,7 +65,7 @@ llxHeader(); print load_fiche_titre($langs->trans("StatisticsOfSendings"), '', 'dolly'); - +$dir = (!empty($conf->expedition->multidir_temp[$conf->entity]) ? $conf->expedition->multidir_temp[$conf->entity] : $conf->service->multidir_temp[$conf->entity]); dol_mkdir($dir); $stats = new ExpeditionStats($db, $socid, '', ($userid > 0 ? $userid : 0)); @@ -84,6 +84,7 @@ if (empty($user->rights->societe->client->voir) || $user->socid) { $px1 = new DolGraph(); $mesg = $px1->isGraphKo(); +$fileurlnb = ''; if (!$mesg) { $px1->SetData($data); $i = $startyear; $legend = array(); diff --git a/htdocs/product/stock/class/productlot.class.php b/htdocs/product/stock/class/productlot.class.php index 6818c5b8335..49945a94027 100644 --- a/htdocs/product/stock/class/productlot.class.php +++ b/htdocs/product/stock/class/productlot.class.php @@ -895,10 +895,10 @@ class Productlot extends CommonObject //$datas['divopen'] = '
'; $datas['batch'] = '
'.$langs->trans('Batch').': '.$this->batch; if ($this->eatby && empty($conf->global->PRODUCT_DISABLE_EATBY)) { - $datas['eatby'] = '
'.$langs->trans('EatByDate').': '.dol_print_date($this->eatby, 'day'); + $datas['eatby'] = '
'.$langs->trans('EatByDate').': '.dol_print_date($this->db->jdate($this->eatby), 'day'); } if ($this->sellby && empty($conf->global->PRODUCT_DISABLE_SELLBY)) { - $datas['sellby'] = '
'.$langs->trans('SellByDate').': '.dol_print_date($this->sellby, 'day'); + $datas['sellby'] = '
'.$langs->trans('SellByDate').': '.dol_print_date($this->db->jdate($this->sellby), 'day'); } //$datas['divclose'] = '
'; diff --git a/htdocs/product/stock/movement_list.php b/htdocs/product/stock/movement_list.php index 422b1317672..09f1975bcb4 100644 --- a/htdocs/product/stock/movement_list.php +++ b/htdocs/product/stock/movement_list.php @@ -1481,7 +1481,7 @@ print ''; print ""; // Add number of product when there is a filter on period -if (count($arrayofuniqueproduct) == 1 && is_numeric($year)) { +if (count($arrayofuniqueproduct) == 1 && !empty($year) && is_numeric($year)) { print "
"; $productidselected = 0; diff --git a/htdocs/product/stock/productlot_card.php b/htdocs/product/stock/productlot_card.php index c33997010fb..0e00476455e 100644 --- a/htdocs/product/stock/productlot_card.php +++ b/htdocs/product/stock/productlot_card.php @@ -39,6 +39,7 @@ $langs->loadLangs(array('stocks', 'other', 'productbatch')); // Get parameters $id = GETPOST('id', 'int'); +$lineid = GETPOST('lineid', 'int'); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); $cancel = GETPOST('cancel', 'aZ09'); @@ -568,7 +569,7 @@ if ($action != 'presend') { $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id; $genallowed = $usercanread; // If you can read, you can build the PDF to read content $delallowed = $usercancreate; // If you can create/edit, you can remove a file on card - print $formfile->showdocuments('product_batch', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 0, 0, 0, 28, 0, '', 0, '', $langs->default_lang, '', $object); + print $formfile->showdocuments('product_batch', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 0, 0, 0, 28, 0, '', 0, '', (empty($object->default_lang) ? '' : $object->default_lang), '', $object); } print '
'; diff --git a/htdocs/reception/contact.php b/htdocs/reception/contact.php index 97d6d19a4f9..92b0dd2f1e8 100644 --- a/htdocs/reception/contact.php +++ b/htdocs/reception/contact.php @@ -71,7 +71,7 @@ if ($origin == 'reception') { $result = restrictedArea($user, $origin, $object->id); } else { if ($origin == 'supplierorder' || $origin == 'order_supplier') { - $result = restrictedArea($user, 'fournisseur', $origin_id, 'commande_fournisseur', 'commande'); + $result = restrictedArea($user, 'fournisseur', $object, 'commande_fournisseur', 'commande'); } elseif (!$user->hasRight($origin, "lire") && !$user->hasRight($origin, "read")) { accessforbidden(); } diff --git a/htdocs/reception/note.php b/htdocs/reception/note.php index 6546e839d03..6edb752ead8 100644 --- a/htdocs/reception/note.php +++ b/htdocs/reception/note.php @@ -90,7 +90,7 @@ if ($origin == 'reception') { $result = restrictedArea($user, $origin, $object->id); } else { if ($origin == 'supplierorder' || $origin == 'order_supplier') { - $result = restrictedArea($user, 'fournisseur', $origin_id, 'commande_fournisseur', 'commande'); + $result = restrictedArea($user, 'fournisseur', $object, 'commande_fournisseur', 'commande'); } elseif (empty($user->rights->{$origin}->lire) && empty($user->rights->{$origin}->read)) { accessforbidden(); } diff --git a/htdocs/user/agenda_extsites.php b/htdocs/user/agenda_extsites.php index b6a8e11ab15..7923a4127c4 100644 --- a/htdocs/user/agenda_extsites.php +++ b/htdocs/user/agenda_extsites.php @@ -259,7 +259,7 @@ while ($i <= $MAXAGENDA) { print ''; //print $formadmin->selectColor($conf->global->$color, "google_agenda_color".$key, $colorlist); $color_value = (GETPOST("AGENDA_EXT_COLOR_".$id.'_'.$key) ?GETPOST("AGENDA_EXT_COLOR_".$id.'_'.$key) : (empty($object->conf->$color) ? 'ffffff' : $object->conf->$color)); - print $formother->selectColor($color_value, "AGENDA_EXT_COLOR_".$id.'_'.$key, 'extsitesconfig', 1, '', 'hideifnotset'); + print $formother->selectColor($color_value, "AGENDA_EXT_COLOR_".$id.'_'.$key, '', 1, '', 'hideifnotset'); print ''; print ""; $i++;