diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php
index 4c13905c147..6e6fe073d5f 100644
--- a/htdocs/admin/dict.php
+++ b/htdocs/admin/dict.php
@@ -1726,6 +1726,9 @@ if ($id > 0) {
}
if (in_array($value, array('label', 'libelle', 'libelle_facture')) && empty($tabcomplete[$tabname[$id]]['help'][$value])) {
+ if (!is_array($tabcomplete[$tabname[$id]]['help'])) { // protection when $tabcomplete[$tabname[$id]]['help'] is a an empty string, we must force it into an array
+ $tabcomplete[$tabname[$id]]['help'] = array();
+ }
$tabcomplete[$tabname[$id]]['help'][$value] = $langs->trans('LabelUsedByDefault');
}
diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php
index b868a847e9e..6237e5912f0 100644
--- a/htdocs/admin/ihm.php
+++ b/htdocs/admin/ihm.php
@@ -308,7 +308,7 @@ if ($action == 'update') {
$_SESSION["mainmenu"] = ""; // The menu manager may have changed
if (GETPOST('dol_resetcache')) {
- dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", ((int) $conf->global->MAIN_IHM_PARAMS_REV) + 1, 'chaine', 0, '', $conf->entity);
+ dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", getDolGlobalInt('MAIN_IHM_PARAMS_REV') + 1, 'chaine', 0, '', $conf->entity);
}
header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup&mode=".$mode.(GETPOSTISSET('page_y') ? '&page_y='.GETPOST('page_y', 'int') : ''));
diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php
index 0242e021ab3..af7327dcf68 100644
--- a/htdocs/admin/modules.php
+++ b/htdocs/admin/modules.php
@@ -274,7 +274,7 @@ if ($action == 'set' && $user->admin) {
if ($csrfCheckOldValue != getDolGlobalInt('MAIN_SECURITY_CSRF_WITH_TOKEN')) {
setEventMessage($langs->trans('WarningModuleHasChangedSecurityCsrfParameter', $value), 'warnings');
}
- dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", (int) $conf->global->MAIN_IHM_PARAMS_REV + 1, 'chaine', 0, '', $conf->entity);
+ dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", getDolGlobalInt('MAIN_IHM_PARAMS_REV') + 1, 'chaine', 0, '', $conf->entity);
if (!empty($resarray['errors'])) {
setEventMessages('', $resarray['errors'], 'errors');
} else {
@@ -298,7 +298,7 @@ if ($action == 'set' && $user->admin) {
exit;
} elseif ($action == 'reset' && $user->admin && GETPOST('confirm') == 'yes') {
$result = unActivateModule($value);
- dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", (int) $conf->global->MAIN_IHM_PARAMS_REV + 1, 'chaine', 0, '', $conf->entity);
+ dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", getDolGlobalInt('MAIN_IHM_PARAMS_REV') + 1, 'chaine', 0, '', $conf->entity);
if ($result) {
setEventMessages($result, null, 'errors');
}
diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php
index 97ea30f394d..93a2db80072 100644
--- a/htdocs/comm/propal/list.php
+++ b/htdocs/comm/propal/list.php
@@ -1185,7 +1185,7 @@ if ($resql) {
$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
print '
';
- print '
'."\n";
+ print ''."\n";
print '';
diff --git a/htdocs/core/modules/export/export_csviso.modules.php b/htdocs/core/modules/export/export_csviso.modules.php
index 4e12c32f66c..d9976031686 100644
--- a/htdocs/core/modules/export/export_csviso.modules.php
+++ b/htdocs/core/modules/export/export_csviso.modules.php
@@ -21,7 +21,7 @@
* \brief File of class to build exports with CSV format
*/
-require_once DOL_DOCUMENT_ROOT.'/core/modules/export/exportcsv.modules.php';
+require_once DOL_DOCUMENT_ROOT.'/core/modules/export/exportcsv.class.php';
// avoid timeout for big export
set_time_limit(0);
diff --git a/htdocs/core/modules/export/export_csvutf8.modules.php b/htdocs/core/modules/export/export_csvutf8.modules.php
index a98f3f5f7f8..3fcf1db669c 100644
--- a/htdocs/core/modules/export/export_csvutf8.modules.php
+++ b/htdocs/core/modules/export/export_csvutf8.modules.php
@@ -16,12 +16,12 @@
*/
/**
- * \file htdocs/core/modules/export/export_csv.modules.php
+ * \file htdocs/core/modules/export/exportcsv.class.php
* \ingroup export
* \brief File of class to build exports with CSV format
*/
-require_once DOL_DOCUMENT_ROOT.'/core/modules/export/exportcsv.modules.php';
+require_once DOL_DOCUMENT_ROOT.'/core/modules/export/exportcsv.class.php';
// avoid timeout for big export
set_time_limit(0);
diff --git a/htdocs/core/modules/export/exportcsv.modules.php b/htdocs/core/modules/export/exportcsv.class.php
similarity index 99%
rename from htdocs/core/modules/export/exportcsv.modules.php
rename to htdocs/core/modules/export/exportcsv.class.php
index fd96bf468f3..674bbe71a9c 100644
--- a/htdocs/core/modules/export/exportcsv.modules.php
+++ b/htdocs/core/modules/export/exportcsv.class.php
@@ -16,7 +16,7 @@
*/
/**
- * \file htdocs/core/modules/export/exportcsv.modules.php
+ * \file htdocs/core/modules/export/exportcsv.class.php
* \ingroup export
* \brief File of class to build exports with CSV format
*/
diff --git a/htdocs/core/modules/export/modules_export.php b/htdocs/core/modules/export/modules_export.php
index 0ae9379c632..f59d50b34a6 100644
--- a/htdocs/core/modules/export/modules_export.php
+++ b/htdocs/core/modules/export/modules_export.php
@@ -62,8 +62,12 @@ class ModeleExports extends CommonDocGenerator // This class can't be abstrac
$i = 0;
if (is_resource($handle)) {
while (($file = readdir($handle)) !== false) {
+ $reg = array();
if (preg_match("/^export_(.*)\.modules\.php$/i", $file, $reg)) {
$moduleid = $reg[1];
+ if ($moduleid == 'csv') {
+ continue; // This may happen if on old file export_csv.modules.php was not correctly deleted
+ }
// Loading Class
$file = $dir."export_".$moduleid.".modules.php";
diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php
index 58501c07246..22599d9eaba 100644
--- a/htdocs/fourn/commande/list.php
+++ b/htdocs/fourn/commande/list.php
@@ -1332,7 +1332,7 @@ if ($resql) {
}
print '';
- print '
'."\n";
+ print ''."\n";
print '';
// Action column
diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php
index b0ff60032ec..9fd5d1d07d5 100644
--- a/htdocs/install/upgrade2.php
+++ b/htdocs/install/upgrade2.php
@@ -4133,6 +4133,8 @@ function migrate_delete_old_files($db, $langs, $conf)
'/core/modules/facture/pdf_crabe.modules.php',
'/core/modules/facture/pdf_oursin.modules.php',
'/core/modules/export/export_excel.modules.php',
+ '/core/modules/export/export_csv.modules.php',
+ '/core/modules/export/exportcsv.modules.php',
'/core/modules/export/export_excel2007new.modules.php',
'/core/boxes/box_members.php',
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index 35ba6c86eae..7e89129cdd7 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -1735,7 +1735,7 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
}
// Refresh value of MAIN_IHM_PARAMS_REV before forging the parameter line.
if (GETPOST('dol_resetcache')) {
- dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", ((int) $conf->global->MAIN_IHM_PARAMS_REV) + 1, 'chaine', 0, '', $conf->entity);
+ dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", getDolGlobalInt('MAIN_IHM_PARAMS_REV') + 1, 'chaine', 0, '', $conf->entity);
}
$themeparam = '?lang='.$langs->defaultlang.'&theme='.$conf->theme.(GETPOST('optioncss', 'aZ09') ? '&optioncss='.GETPOST('optioncss', 'aZ09', 1) : '').(empty($user->id) ? '' : ('&userid='.$user->id)).'&entity='.$conf->entity;
diff --git a/htdocs/product/card.php b/htdocs/product/card.php
index 28b30d38dc4..a10e9d1bb75 100644
--- a/htdocs/product/card.php
+++ b/htdocs/product/card.php
@@ -2063,7 +2063,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// Default warehouse
print ' '.$langs->trans("DefaultWarehouse").' ';
print img_picto($langs->trans("DefaultWarehouse"), 'stock', 'class="pictofixedwidth"');
- print $formproduct->selectWarehouses((GETPOSTISSET('fk_default_warehouse') ? GETPOST('fk_default_warehouse') : $object->fk_default_warehouse), 'fk_default_warehouse', 'warehouseopen', 1);
+ print $formproduct->selectWarehouses((GETPOSTISSET('fk_default_warehouse') ? GETPOST('fk_default_warehouse') : $object->fk_default_warehouse), 'fk_default_warehouse', 'warehouseopen', 1, 0, 0, '', 0, 0, array(), 'maxwidth500 widthcentpercentminusxx');
print ' ';
print ' ';
print ' ';
diff --git a/htdocs/projet/activity/perweek.php b/htdocs/projet/activity/perweek.php
index daf1dd0ac7b..d5108333f6d 100644
--- a/htdocs/projet/activity/perweek.php
+++ b/htdocs/projet/activity/perweek.php
@@ -760,7 +760,11 @@ if (count($tasksarray) > 0) {
$projectstatic->loadTimeSpent($firstdaytoshow, 0, $usertoprocess->id); // Load time spent from table element_time for the project into this->weekWorkLoad and this->weekWorkLoadPerTask for all days of a week
for ($idw = 0; $idw < 7; $idw++) {
$tmpday = dol_time_plus_duree($firstdaytoshow, $idw, 'd');
- $totalforeachday[$tmpday] += $projectstatic->weekWorkLoad[$tmpday];
+ if (empty($totalforeachday[$tmpday])) {
+ $totalforeachday[$tmpday] = empty($projectstatic->weekWorkLoad[$tmpday]) ? 0 : $projectstatic->weekWorkLoad[$tmpday];
+ } else {
+ $totalforeachday[$tmpday] += empty($projectstatic->weekWorkLoad[$tmpday]) ? 0 : $projectstatic->weekWorkLoad[$tmpday];
+ }
}
}
diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php
index 643c020cc50..985be60b138 100644
--- a/htdocs/projet/list.php
+++ b/htdocs/projet/list.php
@@ -992,12 +992,12 @@ $includeonly = '';
if (empty($user->rights->user->user->lire)) {
$includeonly = array($user->id);
}
-$moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$form->select_dolusers($search_project_user ? $search_project_user : '', 'search_project_user', $tmptitle, '', 0, $includeonly, '', 0, 0, 0, '', 0, '', 'maxwidth250 widthcentpercentminusx');
+$moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$form->select_dolusers($search_project_user ? $search_project_user : '', 'search_project_user', $tmptitle, '', 0, $includeonly, '', 0, 0, 0, '', 0, '', 'maxwidth300 widthcentpercentminusx');
$moreforfilter .= '';
$moreforfilter .= '';
$tmptitle = $langs->trans('ProjectsWithThisContact');
-$moreforfilter .= img_picto($tmptitle, 'contact', 'class="pictofixedwidth"').$form->selectcontacts(0, $search_project_contact ? $search_project_contact : '', 'search_project_contact', $tmptitle, '', '', 0, 'maxwidth250 widthcentpercentminusx');
+$moreforfilter .= img_picto($tmptitle, 'contact', 'class="pictofixedwidth"').$form->selectcontacts(0, $search_project_contact ? $search_project_contact : '', 'search_project_contact', $tmptitle, '', '', 0, 'maxwidth300 widthcentpercentminusx');
$moreforfilter .= '
';
// If the user can view thirdparties other than his'
@@ -1005,14 +1005,14 @@ if ($user->rights->user->user->lire) {
$langs->load("commercial");
$moreforfilter .= '';
$tmptitle = $langs->trans('ThirdPartiesOfSaleRepresentative');
- $moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, $tmptitle, 'maxwidth250 widthcentpercentminusx');
+ $moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, $tmptitle, 'maxwidth300 widthcentpercentminusx');
$moreforfilter .= '
';
}
// Filter on categories
if (isModEnabled('categorie') && $user->hasRight('categorie', 'lire')) {
$formcategory = new FormCategory($db);
- $moreforfilter .= $formcategory->getFilterBox(Categorie::TYPE_PROJECT, $search_category_array, 'minwidth300imp widthcentpercentminusx');
+ $moreforfilter .= $formcategory->getFilterBox(Categorie::TYPE_PROJECT, $search_category_array, 'minwidth300imp minwidth300 widthcentpercentminusx');
}
// Filter on customer categories
if (!empty($conf->global->MAIN_SEARCH_CATEGORY_CUSTOMER_ON_PROJECT_LIST) && isModEnabled("categorie") && $user->hasRight('categorie', 'lire')) {
@@ -1021,7 +1021,7 @@ if (!empty($conf->global->MAIN_SEARCH_CATEGORY_CUSTOMER_ON_PROJECT_LIST) && isMo
$moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"');
$categoriesArr = $form->select_all_categories(Categorie::TYPE_CUSTOMER, '', '', 64, 0, 1);
$categoriesArr[-2] = '- '.$langs->trans('NotCategorized').' -';
- $moreforfilter .= Form::multiselectarray('search_category_customer_list', $categoriesArr, $searchCategoryCustomerList, 0, 0, 'minwidth300', 0, 0, '', 'category', $tmptitle);
+ $moreforfilter .= Form::multiselectarray('search_category_customer_list', $categoriesArr, $searchCategoryCustomerList, 0, 0, 'minwidth300im minwidth300 widthcentpercentminusx', 0, 0, '', 'category', $tmptitle);
$moreforfilter .= ' ';
$moreforfilter .= $form->textwithpicto('', $langs->trans('UseOrOperatorForCategories') . ' : ' . $tmptitle, 1, 'help', '', 0, 2, 'tooltip_cat_cus'); // Tooltip on click
$moreforfilter .= '';