| ';
- print $langs->trans("WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER").' |   | ';
+ print $langs->trans("WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER").' | | ';
if (! empty($conf->use_javascript_ajax))
{
print ajax_constantonoff('WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER');
diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php
index 9d715f92301..81e6bda40a0 100644
--- a/htdocs/admin/company.php
+++ b/htdocs/admin/company.php
@@ -215,8 +215,7 @@ if (($action == 'update' && !GETPOST("cancel", 'alpha'))
if ($_POST["optionlocaltax1"] == "localtax1on")
{
- if (!isset($_REQUEST['lt1']))
- {
+ if (!GETPOSTISSET('lt1')) {
dolibarr_set_const($db, "MAIN_INFO_VALUE_LOCALTAX1", 0, 'chaine', 0, '', $conf->entity);
} else {
dolibarr_set_const($db, "MAIN_INFO_VALUE_LOCALTAX1", GETPOST('lt1', 'aZ09'), 'chaine', 0, '', $conf->entity);
@@ -225,8 +224,7 @@ if (($action == 'update' && !GETPOST("cancel", 'alpha'))
}
if ($_POST["optionlocaltax2"] == "localtax2on")
{
- if (!isset($_REQUEST['lt2']))
- {
+ if (!GETPOSTISSET('lt2')) {
dolibarr_set_const($db, "MAIN_INFO_VALUE_LOCALTAX2", 0, 'chaine', 0, '', $conf->entity);
} else {
dolibarr_set_const($db, "MAIN_INFO_VALUE_LOCALTAX2", GETPOST('lt2', 'aZ09'), 'chaine', 0, '', $conf->entity);
@@ -236,7 +234,9 @@ if (($action == 'update' && !GETPOST("cancel", 'alpha'))
if (!$error)
{
- setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
+ if (GETPOST('save')) { // To avoid to show message when we juste switch the country that resubmit the form.
+ setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
+ }
$db->commit();
} else {
$db->rollback();
diff --git a/htdocs/admin/delais.php b/htdocs/admin/delais.php
index 2502a257ae7..90ea5f290b6 100644
--- a/htdocs/admin/delais.php
+++ b/htdocs/admin/delais.php
@@ -33,7 +33,9 @@ $langs->load("admin");
if (!$user->admin) accessforbidden();
$action = GETPOST('action', 'aZ09');
+if (empty($action)) $action = 'edit';
+// Define list of managed delays
$modules = array(
'agenda' => array(
array(
@@ -190,6 +192,10 @@ if ($action == 'update')
for ($i = 0; $i < 4; $i++) {
if (GETPOSTISSET('MAIN_METEO'.$plus.'_LEVEL'.$i)) dolibarr_set_const($db, 'MAIN_METEO'.$plus.'_LEVEL'.$i, GETPOST('MAIN_METEO'.$plus.'_LEVEL'.$i, 'int'), 'chaine', 0, '', $conf->entity);
}
+
+ setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
+
+ $action = 'edit';
}
diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php
index 80398531515..af4c2aa348e 100644
--- a/htdocs/admin/dict.php
+++ b/htdocs/admin/dict.php
@@ -799,11 +799,15 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
$keycode = $listfieldvalue[$i];
if (empty($keycode)) $keycode = $value;
- if ($value == 'price' || preg_match('/^amount/i', $value) || $value == 'taux') {
- $_POST[$keycode] = price2num($_POST[$keycode], 'MU');
- } elseif ($value == 'entity') {
- $_POST[$keycode] = getEntity($tabname[$id]);
- }
+ if ($value == 'price' || preg_match('/^amount/i', $value)) {
+ $_POST[$keycode] = price2num(GETPOST($keycode), 'MU');
+ }
+ elseif ($value == 'taux' || $value == 'localtax1' || $value == 'localtax2') {
+ $_POST[$keycode] = price2num(GETPOST($keycode), 8);
+ }
+ elseif ($value == 'entity') {
+ $_POST[$keycode] = getEntity($tabname[$id]);
+ }
if ($i) $sql .= ",";
@@ -823,11 +827,11 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
}
$sql .= ",1)";
- dol_syslog("actionadd", LOG_DEBUG);
- $result = $db->query($sql);
- if ($result) // Add is ok
- {
- setEventMessages($langs->transnoentities("RecordCreatedSuccessfully"), null, 'mesgs');
+ dol_syslog("actionadd", LOG_DEBUG);
+ $result = $db->query($sql);
+ if ($result) // Add is ok
+ {
+ setEventMessages($langs->transnoentities("RecordCreatedSuccessfully"), null, 'mesgs');
// Clean $_POST array, we keep only id of dictionary
if ($id == 10 && GETPOST('country', 'int') > 0) {
@@ -862,11 +866,15 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
$keycode = $listfieldvalue[$i];
if (empty($keycode)) $keycode = $field;
- if ($field == 'price' || preg_match('/^amount/i', $field) || $field == 'taux') {
- $_POST[$keycode] = price2num($_POST[$keycode], 'MU');
- } elseif ($field == 'entity') {
- $_POST[$keycode] = getEntity($tabname[$id]);
- }
+ if ($field == 'price' || preg_match('/^amount/i', $field)) {
+ $_POST[$keycode] = price2num(GETPOST($keycode), 'MU');
+ }
+ elseif ($field == 'taux' || $field == 'localtax1' || $field == 'localtax2') {
+ $_POST[$keycode] = price2num(GETPOST($keycode), 8);
+ }
+ elseif ($field == 'entity') {
+ $_POST[$keycode] = getEntity($tabname[$id]);
+ }
if ($i) $sql .= ",";
$sql .= $field."=";
diff --git a/htdocs/admin/emailcollector_card.php b/htdocs/admin/emailcollector_card.php
index e7149ece88d..9d3dfaaf09b 100644
--- a/htdocs/admin/emailcollector_card.php
+++ b/htdocs/admin/emailcollector_card.php
@@ -416,7 +416,10 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
if (function_exists('imap_open'))
{
- $connectstringserver = $object->getConnectStringIMAP();
+ // Note: $object->host has been loaded by the fetch
+ $usessl = 1;
+
+ $connectstringserver = $object->getConnectStringIMAP($usessl);
try {
if ($sourcedir) {
diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php
index 78f06b0ee2e..e6a85894fc4 100644
--- a/htdocs/admin/modules.php
+++ b/htdocs/admin/modules.php
@@ -472,22 +472,22 @@ if ($nbofactivatedmodules <= 1) {
print load_fiche_titre($langs->trans("ModulesSetup"), '', 'title_setup');
// Start to show page
+$deschelp = '';
if ($mode == 'common' || $mode == 'commonkanban') {
$desc = $langs->trans("ModulesDesc", '{picto}');
$desc = str_replace('{picto}', img_picto('', 'switch_off'), $desc);
- print ''.$desc."
\n";
+ $deschelp = ''.$desc."
\n";
}
if ($mode == 'marketplace') {
- print ''.$langs->trans("ModulesMarketPlaceDesc")."
\n";
+ $deschelp = ''.$langs->trans("ModulesMarketPlaceDesc")."
\n";
}
if ($mode == 'deploy') {
- print ''.$langs->trans("ModulesDeployDesc", $langs->transnoentitiesnoconv("AvailableModules"))."
\n";
+ $deschelp = ''.$langs->trans("ModulesDeployDesc", $langs->transnoentitiesnoconv("AvailableModules"))."
\n";
}
if ($mode == 'develop') {
- print ''.$langs->trans("ModulesDevelopDesc")."
\n";
+ $deschelp = ''.$langs->trans("ModulesDevelopDesc")."
\n";
}
-
$head = modules_prepare_head();
@@ -512,6 +512,8 @@ if ($mode == 'common' || $mode == 'commonkanban') {
print dol_get_fiche_head($head, 'modules', '', -1);
+ print $deschelp;
+
$moreforfilter = '';
$moreforfilter .= ' |