Skip to content

Commit

Permalink
Fix multicurrency setup page
Browse files Browse the repository at this point in the history
  • Loading branch information
atm-maxime committed Jun 6, 2019
1 parent 36df2f1 commit 9c7c1dd
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions htdocs/admin/multicurrency.php
Expand Up @@ -49,15 +49,14 @@
if (preg_match('/set_([a-z0-9_\-]+)/i',$action,$reg))
{
$code=$reg[1];
$value=(GETPOST($code, 'alpha') ? GETPOST($code, 'alpha') : 1);
$value=GETPOST($code, 'alpha');
if (dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity) > 0)
{
header("Location: ".$_SERVER["PHP_SELF"]);
exit;
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
else
{
dol_print_error($db);
setEventMessages($langs->trans("Error"), null, 'errors');
}
}

Expand All @@ -66,12 +65,11 @@
$code=$reg[1];
if (dolibarr_del_const($db, $code, 0) > 0)
{
header("Location: ".$_SERVER["PHP_SELF"]);
exit;
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
else
{
dol_print_error($db);
setEventMessages($langs->trans("Error"), null, 'errors');
}
}

Expand Down

0 comments on commit 9c7c1dd

Please sign in to comment.